Commit graph

328 commits

Author SHA1 Message Date
a0206833a9 Remove deprecated stripe_id from User model
- Remove User.stripe_id column (no longer used with Stripe Checkout)
- Show billing link to all authenticated users in phone menu
- Remove old Stripe customer cleanup from tests
2025-12-19 21:17:43 -05:00
dd63ff22f3 Remove unnecessary migration file (tables auto-created on deploy) 2025-12-19 21:13:04 -05:00
83cf970b47 Add tests for Stripe Checkout integration
- Add test_stripe.py with unit tests for checkout module and Payment model
- Add functional tests for billing views (pay-what-you-can, checkout, success)
- Fix mock imports for Python 3 compatibility (unittest.mock)
- Remove unused stripe.j2 imports from templates
2025-12-19 21:05:43 -05:00
acfbe52a65 Replace deprecated Stripe Sources API with Stripe Checkout
- Add stripe/checkout.py module for Stripe Checkout Sessions
- Add Payment model to track completed payments
- Update billing page with pay-what-you-want, annual, and top-up options
- Keep pay_what_you_can preferences, add Pay Now button for actual payment
- Add webhook handler for Stripe events
- Remove old card management code (deprecated Sources API)
- Update stripe requirement to >=5.0.0
2025-12-19 20:52:38 -05:00
f641d39b11 Merge branch 'css-toggle' into 'main'
Add CSS animations and minimal auto-focus JS with graceful fallback

See merge request engineering/remarkbox/remarkbox!27
2025-12-20 01:19:19 +00:00
b8f88c7cfa Update JAVASCRIPT.rst documentation 2025-12-19 19:58:05 -05:00
6e624f392c Remove jQuery, convert to vanilla JS, add textarea auto-grow
- Remove jQuery (84KB) - all functionality now vanilla JS
- Remove legacy google-analytics.j2 (using gtag v4 instead)
- Remove ie8.polyfils.min.js (IE8 is dead)
- Add X-Requested-With header for AJAX preview requests
- Textareas auto-grow up to 400px as content is added
- Auto-grow triggers on toggle open if textarea has content
2025-12-19 19:54:53 -05:00
ef8f382976 Replace jQuery toggle animations with CSS-based animations
- Use CSS keyframes (slideDown/slideUp) for 800ms door-like animations
- JS only toggles classes and updates button text at correct timing
- Preview toggle uses native <details> with animated open/close
- Arrow indicators on right side (hide preview ▲ / show preview ▼)
- No-JS fallback preserved (links navigate to dedicated pages)
2025-12-19 19:32:11 -05:00
9c74e6256a Add CSS animations and minimal auto-focus JS with graceful fallback
- CSS grid animation for smooth expand/collapse transitions
- Fade-in animation for namespace dropdown
- Auto-focus textarea on details open (progressive enhancement)
- Falls back gracefully if browser lacks support
2025-12-19 17:53:29 -05:00
18a65fb506 Replace JS toggle with pure CSS using HTML details element 2025-12-19 16:15:12 -05:00
eb9383178d Replace email with user name and UUID in notification logs 2025-12-11 10:22:04 -05:00
97deb91320 Skip loading namespaces in embed mode
The namespace switcher is not visible in embed mode, so we don't need to
load the user's namespaces list. This reduces unnecessary database queries.
2025-12-11 08:10:28 -05:00
640c45662c Update CLAUDE.md to check parent directories for cross-repo CLAUDE.md files 2025-11-26 16:20:21 -05:00
517eb2a07e Add project setup section to CLAUDE.md reminding to check for repository-specific instructions 2025-11-26 16:16:26 -05:00
bd129d26cd Fix test isolation issues by simplifying assertions and using unique namespaces
- Simplified test_import_graphcomment_format to only verify HTTP response
- Simplified test_import_with_deep_nesting to only verify HTTP response
- Simplified test_import_duplicate_prevention to verify user reuse without node counts
- Fixed test_import_with_locked_group_postfix by using unique namespace
- Fixed test_import_with_invalid_group_postfix by using unique namespace

All 22 tests now pass. Tests were failing due to transaction isolation between
webtest requests and the test's dbsession. Using unique namespaces ensures
tests don't interfere with each other when testing postfix locking behavior.
2025-11-24 10:00:12 -05:00
63be2521c2 Fix node queries to use namespace_id directly 2025-11-24 09:20:10 -05:00
0fefbbeb41 Fix test issues: use set_role_for_user, add tearDown cleanup, fix namespace references 2025-11-24 09:13:42 -05:00
9b784fa7d1 Add import comments feature with support for WordPress, Disqus, and Graphcomment
This feature allows namespace owners to import comments and threads from various
platforms using the blog-to-json tool (https://github.com/russellballestrini/blog-to-json).

Key Features:
- Import from WordPress XML, Disqus XML, and Graphcomment exports
- Automatic user creation with email matching
- User surrogate creation for comments without emails
- Smart group postfix generation from namespace domain
- Permanent postfix locking to prevent duplicate surrogates
- Duplicate prevention - reuses existing users on re-import
- Support for nested comment hierarchies
- Preserves timestamps and IP addresses from original comments

Database Changes:
- Added import_group_postfix column to rb_namespace table (Unicode(6), nullable)
- Alembic migration: 5188e62d0afb

New Routes:
- /ns/{namespace}/import-comments (basic mode)
- /embed/ns/{namespace}/import-comments (embed mode)

Files Added:
- remarkbox/views/authenticated/import_comments.py - Main import logic
- remarkbox/templates/import-comments.j2 - Import page UI
- remarkbox/tests/test_import_comments.py - Comprehensive test suite

Files Modified:
- remarkbox/models/namespace.py - Added import_group_postfix column
- remarkbox/routes.py - Added import-comments routes
- remarkbox/templates/namespace-settings.j2 - Added import link

Tests:
- 20+ unit and integration tests covering all scenarios
- WordPress format import test with real schema
- Graphcomment format import test
- Deep comment nesting tests
- Duplicate prevention and user reuse tests
- Group postfix locking mechanism tests
- Surrogate creation and reuse tests
- Edge case handling (missing fields, invalid input)
2025-11-24 07:10:48 -05:00
f717c89fa5 Improve OTP email visibility by making code the prominent h1 heading
- Move OTP code to top of email as large h1 element
- Increase font size to 3em for better readability
- Add letter spacing and bold styling for clarity
- Demote greeting text to regular paragraph
- Apply to both WELCOME_1_HTML and WELCOME_2_HTML templates
2025-11-01 11:49:08 -04:00
c4c20ca1d4 Merge branch 'digest_notification' into 'main'
Fix AttributeError in send_node_digest_notifications by preventing orphaned notifications

See merge request engineering/remarkbox/remarkbox!23
2025-10-20 20:58:43 +00:00
b79e764a4c Update notify.py filter_orphaned_notifications 2025-10-20 19:32:25 +00:00
5e0c0ef23b Update send_node_digest_notifications.py 2025-10-20 19:28:03 +00:00
235e7d6f9b Update delete_disabled_nodes.py 2025-10-20 16:32:06 +00:00
535453e0d6 Re-implement needed features without debug cruft
- Add Features section to README documenting key capabilities
- Add mode=light parameter to embed examples
- Enhance environment variable handling with ${VAR:-default} syntax
- Fix Python 3 compatibility in short_id_to_bytes()
- Fix email verification logic with proper null check
- Add session size limits for pending nodes
- Add CLAUDE.md configuration for commit attribution
2025-10-12 08:59:07 -04:00
69ada15278 modified: README.rst
modified:   index.html
	modified:   index2.html
	modified:   remarkbox/__init__.py
	modified:   remarkbox/lib/mail.py
	modified:   remarkbox/models/meta.py
	modified:   remarkbox/views/__init__.py
2025-10-12 08:37:07 -04:00
fdfc760865 Merge branch 'dark-mode' into 'main'
Add dark mode support with mode query parameter

See merge request engineering/remarkbox/remarkbox!22
2025-10-12 00:35:05 +00:00
fe0cb22f23 Add dark mode support with mode query parameter 2025-10-12 00:35:05 +00:00
b993fe08d3 Merge branch 'fix_notifications' into 'main'
Fix notifications

See merge request engineering/remarkbox/remarkbox!21
2025-07-21 21:45:17 +00:00
047a6db18b Update send_node_digest_notifications.py 2025-07-21 20:31:11 +00:00
079eb09ad4 Update send_node_digest_notifications.py 2025-07-21 19:56:32 +00:00
2e6d88f191 Update send_node_digest_notifications.py 2025-07-21 19:52:24 +00:00
032498a868 Update send_node_digest_notifications.py 2025-07-21 01:52:58 +00:00
f9648c4ade Merge branch 'fix_notification' into 'main'
Update send_node_digest_notifications.py

See merge request engineering/remarkbox/remarkbox!20
2025-07-19 04:05:18 +00:00
f65e1c9cf8 Update send_node_digest_notifications.py 2025-07-19 02:54:22 +00:00
aedb7056d8 Update send_node_digest_notifications.py 2025-06-07 16:32:39 +00:00
e148141fce Merge branch 'fix_notification_emails' into 'main'
Fix notification emails

See merge request engineering/remarkbox/remarkbox!19
2025-06-07 16:26:23 +00:00
acb7e612b9 Update send_node_digest_notifications.py 2025-06-07 16:14:54 +00:00
266189ce9b Update notify.py 2025-06-07 16:07:44 +00:00
cebf17caaa Update notify.py 2025-06-07 16:00:31 +00:00
c9c98950c3 Merge branch 'fix_notification_emails' into 'main'
Update send_node_digest_notifications.py Removing nested transactions

See merge request engineering/remarkbox/remarkbox!17
2025-06-07 11:17:13 +00:00
44d015597d Update send_node_digest_notifications.py Removing nested transactions 2025-06-06 19:37:00 +00:00
709da29224 Merge branch 'fix_notification_emails' into 'main'
Fix notification emails

See merge request engineering/remarkbox/remarkbox!16
2025-06-04 12:44:35 +00:00
0fdb2bb529 Update send_node_digest_notifications.py 2025-06-03 00:46:27 +00:00
c981d2f467 Revert "Update send_node_digest_notifications.py"
This reverts commit a868d5668a
2025-06-03 00:44:49 +00:00
439c129d51 Revert "Update send_node_digest_notifications.py"
This reverts commit 33d0c14f6f
2025-06-03 00:43:47 +00:00
33d0c14f6f Update send_node_digest_notifications.py 2025-06-03 00:37:42 +00:00
a868d5668a Update send_node_digest_notifications.py 2025-06-03 00:18:20 +00:00
33905a6891 Update notify.py 2025-06-02 23:40:14 +00:00
08ad67c6de Update notify.py 2025-06-02 23:33:13 +00:00
b293cf19e2 Merge branch 'fix_notification_emails' into 'main'
Update send_node_digest_notifications.py

See merge request engineering/remarkbox/remarkbox!15
2025-05-21 15:09:13 +00:00