Commit graph

598 commits

Author SHA1 Message Date
c9afd3b893 Fix session cookie bloat from crypto payment status tracking
Remove session-based status tracking that was storing crypto_payment_status_{payment_id}
for every payment, causing cookie size to exceed 4KB limit with 35+ payments.

- Remove: request.session[session_key] = current_status
- Remove: previous_status tracking via session
- Keep: Flash messages for status notifications (they don't bloat cookies)

Flash messages now trigger on every poll instead of just transitions, but this
prevents the cookie bloat issue. Client-side can handle transition detection if needed.
2025-10-11 19:41:15 -04:00
fcde8d94cf Fix crypto payment quote UI to hide QR/buttons immediately on received status
The removePaymentElements() and replaceButtonsWithInvoiceLink() JavaScript
functions were using incorrect CSS selectors that tried to match hardcoded
inline style attributes (e.g., div[style*="grid-template-columns: 1fr 1fr 1fr"])
which don't exist in the actual template HTML.

Updated both functions to use the correct CSS class selectors:
- '.payment-grid' for QR code and payment instructions
- '.payment-buttons' for copy buttons and wallet links

This ensures that when a payment transitions to 'received' status, the polling
mechanism immediately hides the payment UI elements without requiring a page
refresh, preventing potential duplicate payments.

Fixed selectors in crypto_checkout.j2:150-162 and crypto_checkout.j2:165-206
2025-10-11 13:17:41 -04:00
b5a93e7a7a Enhance product edit interface and improve cart layout
- Add file metadata display (type, size) for product files and thumbnails
- Add human_file_bytes method to Product model for flexible file size formatting
- Add file statistics section showing total capacity
- Reorganize cart layout with "New" button in header and "View Saved Carts" below checkout
2025-10-09 11:00:52 -04:00
3f17933130 Hide shipping address section for digital-only checkouts
Only show the "Active Shipping Address" section on checkout page when cart contains physical products that require shipping.
2025-10-08 15:49:39 -04:00
56a1d93d0d Restructure actions pages and user settings with action-columns layout
- Create new action-columns CSS class for true 50/50 equal column layout
- Convert actions_view page to use action-columns with management buttons on right
- Convert actions_new page to use action-columns with New Product/Shop Location on right
- Convert user_settings page to use action-columns layout
- Remove shop names from actions pages for cleaner appearance
- Move log out button to bottom of user settings with red styling using --red-color var
- Add green + New button to user settings call_to_action
- Add consistent 42px bottom margin to all section.content elements
- Update green well styling to work with both one-column and action-columns classes

All pages now use consistent 50/50 column layouts that collapse to single column on mobile.
2025-10-06 18:26:30 -04:00
aae1e38793 Bump version to 1.1.4 2025-10-06 10:46:54 -04:00
c523cb532e Fix product page layout and add bold fonts to comment buttons
- Restore two-column layout for product and content pages on desktop
- Add font-weight: bold to comment buttons in light mode for consistency

Fixes regression where product pages were displaying single column on desktop
2025-10-06 10:37:56 -04:00
724b0ec256 Improve UI layout consistency and organization
- Fix theme-switching layout shifts by adding transparent borders to light mode elements
- Add 2px transparent borders to buttons and comment elements in light mode
- Add 1px transparent borders to wells and alerts in light mode
- Reorganize user settings page with two-column layout (settings left, actions right)
- Move theme preference directly under User Settings heading
- Update purchases page to two-column layout (products left, invoices right)
- Remove horizontal rule from cart checkout button area
- Remove top margins from all heading tags (h1-h6)
- Add padding-bottom to desktop content sections
- Set navigation background to secondary color for consistency

Layout now remains stable when toggling between light and dark themes
2025-10-06 10:22:09 -04:00
f5d68ba267 Fix DOGE fee calculation bug and improve UI consistency
- Fix negative DOGE processing fees from estimatesmartfee RPC issues
- Add abs() protection for both DOGE and Monero fee calculations
- Reduce transaction size estimate from 0.25KB to 0.15KB (more realistic)
- Change fee multiplier from 2x to 1.5x (less excessive)
- Set reasonable fallback fee of 0.5 DOGE when RPC fails
- Add negative feerate detection with proper error handling
- Fix crypto payment status color mapping (case insensitive lookup)
- Add missing status mappings for confirmed-overpay-complete and doublepay-refund-complete
- Improve comment system UI with dark mode styling and better layout
- Add CSS preloader to prevent trans-background image flashing
- Enhance user settings page with better button organization
- Remove "View Quote" button for cancelled crypto quotes
- Fix comment form styling and authentication flow
2025-10-06 09:36:02 -04:00
c61811293e Remove trailing period after add payment method button 2025-10-05 12:49:08 -04:00
ed2de76637 Fix checkout page mobile layout and improve word-breaking
- Force single column layout on mobile (768px breakpoint) for checkout page
- Remove aggressive word-break: break-all from general content areas
- Add horizontal scrolling for pre/code tags to preserve technical content
- Clean up redundant word-wrap properties
2025-10-05 12:31:09 -04:00
5d46b3a63d Fix content overflow caused by long unbreakable strings
Add word-breaking rules to handle magnet links and long URLs that cause
horizontal overflow. Uses word-wrap, overflow-wrap, and word-break to
force long strings to wrap instead of overflowing containers.
2025-10-04 20:52:58 -04:00
ae0e39a638 Fix mobile-specific image overflow and remove !important
- Remove !important from product-main image rules, use specific selectors instead
- Add mobile-specific constraints to .product-images container
- Add overflow-x auto for mobile product image containers
- Ensure images stay within bounds on mobile without affecting tablet/desktop
2025-10-04 20:35:37 -04:00
014f8e7836 Fix product page image and content overflow issues
- Override general img width rule for product-main images to prevent overflow
- Add overflow constraints to content sections (.product-description, .content, section.content)
- Use \!important to ensure product-main images use auto width instead of 100%
- Add horizontal scrolling fallback instead of layout breaking
2025-10-04 20:27:01 -04:00
aafe7c4224 Fix image sizing to prevent grid overflow on mobile
Add width: 100% and box-sizing: border-box to base image rule to ensure images
properly fit within their grid containers and don't extend outside grid cells.
2025-10-04 20:02:19 -04:00
b84be0a727 Fix checkout page layout and crypto button sizing
- Implement responsive checkout layout: single column for crypto-only, two columns when Stripe/shipping enabled
- Add progressive enhancement with :has() selector and fallback for older browsers
- Fix crypto button icon sizing with more specific selectors and \!important rules
- Ensure proper mobile responsive behavior
2025-10-04 19:52:15 -04:00
f6a4d0d4ce Fix crypto icon sizing and add payment method button styling
- Remove problematic image width rules that broke crypto icons
- Style "Add a credit card payment method" as blue button for both themes
- Ensure crypto payment icons maintain proper 32x32 pixel size
2025-10-04 19:41:24 -04:00
b3f9e7bcaf Revert "Fix horizontal scrollbar issues with images and pre tags"
This reverts commit 4d9013d4ca.
2025-10-04 19:34:47 -04:00
4d9013d4ca Fix horizontal scrollbar issues with images and pre tags
- Force images to 100% width to prevent overflow
- Add overflow-x auto to pre tags while preserving whitespace
- Prevent content elements from causing page-wide horizontal scrollbars
2025-10-04 19:31:24 -04:00
5259f750fa Fix mobile layout spacing and image overflow issues
- Add margin-top to product purchase well on mobile for better spacing
- Prevent content images from causing horizontal scrollbars
- Improve mobile UX by separating product images from action buttons
2025-10-04 19:17:37 -04:00
ed2adce1e6 Remove unnecessary inline dark mode override from ribbon template 2025-10-04 19:02:13 -04:00
a747429e92 Fix shop theme link visibility with inline style override
Add dark mode override directly in ribbon template to ensure proper
CSS specificity. Shop theme links will now be white in dark mode
regardless of shop owner's configured link colors.
2025-10-04 18:59:36 -04:00
0a62e1e29c Fix shop theme link visibility in dark mode
Override shop theme link colors to white in dark mode to ensure visibility
when shop owners have configured dark link colors that become invisible
against dark backgrounds.
2025-10-04 18:49:26 -04:00
99eca0b456 Improve shop settings dark mode styling and UX
- Replace theme dropdown with radio buttons for consistency
- Add immediate theme preview when changing shop default theme
- Add Stripe status indicators (enabled/disabled) matching crypto currencies
- Disable Stripe inputs when Stripe payments are disabled
- Improve dark mode text readability for note-text, status-message, and error-indicator
- Add comprehensive dark mode styling for all flash message types
- Remove horizontal rule dividers in crypto settings for cleaner layout
2025-10-04 17:47:16 -04:00
fa1e3d56d5 Fix theme radio button localStorage synchronization
Fix radio buttons to properly reflect localStorage theme preference on page load.
Replaced unsupported :has() selector with closest() for better browser compatibility.
Added missing logic to sync radio button selection with stored theme preference.
2025-10-04 17:23:57 -04:00
8faec3256c Delete THEME_AUDIT.md 2025-10-04 21:18:41 +00:00
8a014a6e61 Merge branch 'dark-fucking-mode' into 'master'
Implement comprehensive dark mode functionality

See merge request engineering/make-post-sell/make_post_sell!54
2025-10-04 21:09:51 +00:00
045868c3d0 Implement comprehensive dark mode functionality 2025-10-04 21:09:51 +00:00
9cb6ea5fd0 Remove remaining static inline styles from user crypto settings
Convert two remaining style="width: 100%;" declarations to use existing
full-width-input CSS class. This completes the cleanup of all static
inline styles, leaving only 2 dynamic inline styles remaining across
the entire template codebase.

File updated:
- user_crypto_settings.j2: Crypto address and label input fields

Remaining inline styles: 2 (both dynamic/business-critical)
2025-10-04 13:52:40 -04:00
618f7f257b Phase 2: Convert crypto history and invoice inline styles to CSS classes
Completed conversion of static inline styles in crypto_quotes_history.j2 and invoice.j2:

- Added comprehensive CSS classes for crypto history layout, status notices, and invoice components
- Converted 22 inline style instances to semantic CSS classes
- Improved maintainability while preserving all functionality
- Added status color classes for consistent semantic meaning across templates

Templates updated:
- crypto_quotes_history.j2: Payment cards, status notices, help sections
- invoice.j2: Discount sections, payment status indicators, layout components

CSS classes added: crypto-history-container, crypto-payment-card, status-*-notice,
invoice-*-section, status-success/warning/info/error, and utility classes.
2025-10-04 13:46:37 -04:00
252d2d056d Phase 1: Convert static inline styles to CSS classes (40% of remaining styles)
Added CSS classes for static styling patterns:
- .no-bottom-margin, .no-top-margin - Standard margin controls
- .bold-text - Font weight styling
- .inline-label - Display inline for labels (reusing existing class)
- .hidden-form - Display none for forms
- .subtitle-text - Product/content subtitle styling
- .stripe-* classes - Stripe component styling
- .comment-* classes - Comment system styling
- .coupon-* classes - Coupon display styling
- .original-comment-box - Comment editing box styling
- .table-* classes - Table layout controls
- .sold-out-button - Disabled button styling

Updated 16 template files to use CSS classes instead of inline styles:
- snippets/search.j2, snippets/stripe.j2, snippets/comments.j2
- product.j2, content.j2, product_edit.j2
- user_settings.j2, shop_location_form.j2
- coupons.j2, coupon.j2, update-card.j2
- base.j2, shop_products.j2
- comments/reply_comment.j2, comments/edit_comment.j2

Converted approximately 40% of remaining inline styles targeting:
- Static margins and spacing
- Font weights and sizing
- Display properties
- Form visibility
- Button states
- Table layouts

Remaining inline styles are dynamic/functional and require Phase 2 implementation.
2025-10-04 13:30:50 -04:00
10e0e83adf Replace inline styles with CSS classes across template files
- Add comprehensive CSS classes to common.css for status messages, layouts, and styling
- Remove all inline styles from shop_settings.j2 (16 instances)
- Remove all inline styles from crypto_checkout.j2 (25 instances)
- Remove all inline styles from cart_checkout.j2 (18 instances)
- Remove all inline styles from cart.j2 (16 instances)

New CSS classes added:
- Status indicators: .status-message, .success-indicator, .error-indicator
- Layout helpers: .inline-label, .full-width-input, .disabled-input
- Crypto checkout: .crypto-logo, .payment-grid, .payment-buttons, .status-box
- Cart styles: .cart-float-right, .cart-shop-name, .cart-total-amount
- Notice boxes: .success-notice, .warning-notice, .warning-banner

This improves maintainability, consistency, and enables better theming support.
All conditional styling preserved using dynamic CSS class application.
2025-10-04 13:20:45 -04:00
6b222bbc6b modified: .gitignore 2025-10-04 13:06:28 -04:00
a3826d15c8 modified: setup.py 2025-10-04 13:05:01 -04:00
3fedfeb849 Update state machine documentation to use dash-separated naming
- Convert all state names from underscore to dash format in markdown documentation
- Ensures consistency across all documentation formats (dot, svg, markdown)
- All payment states now use dashes: confirmed-complete, underpaid-refunded, etc.
- Maintains consistency with the source dot file which is the canonical reference

This completes the documentation naming convention standardization.
2025-10-04 13:02:07 -04:00
fde7e2b2d0 Fix CSS image sizing specificity issue
Change global img rule from width: 100% to max-width: 100% to allow
more specific image sizing rules to work properly. This prevents the
global rule from overriding thumbnail sizes, icons, and other specific
image dimensions while maintaining responsive behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 12:49:37 -04:00
baa8dffc02 Enhance payment settings UX with consistent styling and persistent state
- Add new payment-toggle-button CSS class derived from comment button styles
- Apply consistent styling to all Stripe, Monero, and Dogecoin disable/re-enable buttons
- Consolidate crypto wallet disclaimers into single always-visible section
- Update help text to clarify re-enabling payments allows address updates
- Implement localStorage persistence for both crypto and Stripe toggle states
- Ensure graceful degradation for non-JavaScript users
- Remove redundant disclaimer text from individual currency forms

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 12:37:32 -04:00
fd3ffc26f0 Improve shop settings crypto wallet and Stripe configuration UX
- Move crypto wallet verification disclaimer to top of section for better visibility
- Remove redundant Dogecoin address display message
- Ensure crypto wallet checkbox is always unchecked on page refresh
- Update disclaimer to use plural form for multiple wallet addresses
- Fix checkbox label alignment to display inline
- Update Stripe toggle label to be more descriptive
- Add JavaScript progressive enhancement for Stripe API key fields
- Ensure both crypto and Stripe forms are hidden by default with graceful degradation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 12:26:24 -04:00
c218ec7073 Fix mobile layout ordering for product and content pages
- **Mobile Layout Fix**: Restructured product/content templates to use direct grid children
- **Grid Areas**: Added proper grid-template-areas for desktop layout
- **Mobile Ordering**: Purchase/download buttons now appear after images on mobile
- **Template Structure**: Split sections into product-images, product-right, product-description, product-comments
- **CSS Grid**: Unified layout system using order properties for mobile and grid areas for desktop
- **UX Improvement**: Logical mobile flow - images, purchase, description, comments
2025-10-04 12:02:04 -04:00
6745824fc3 Improve comment system UX and product page layout
- **Comment Form Styling**: Unified button styling across reply/edit forms with new CSS classes
- **Comment Actions**: Improved spacing, consistent button styling, and proper grid layout
- **Comment Navigation**: Added anchor redirects for delete/approve/unapprove actions
- **Product Layout**: Enhanced desktop two-column grid (2fr 1fr) with better proportions
- **Mobile Optimization**: Fixed button width and section ordering for mobile view
- **Template Consolidation**: Moved comments and description into main grid layout
- **Auto-refresh Removal**: Removed disruptive timers from content pages
2025-10-04 11:45:35 -04:00
e67178abdb Fix comment deletion display and improve comment spacing
## Bug Fixes:
- **Comment Deletion**: Fixed deleted comments still showing in frontend
  - Added `enabled_children` property to Comment model to filter disabled comments
  - Updated template to use `enabled_children` instead of `children` for replies
  - Ensures soft-deleted comments (and their replies) properly disappear from view

## UI Improvements:
- **Comment Spacing**: Added 20px margin-bottom to all comments for better readability
- **Form Styling**: Removed unwanted `mps-submit` class from "Post Comment" button
  - Eliminates `float: right` styling that was misaligning the button

## Technical Details:
- Root comments already filtered by database query (`Comment.disabled == False`)
- Child comments now properly filtered through `enabled_children` property
- Comment deletion uses soft delete (`comment.disable()`) preserving data integrity
- Black code formatting applied to maintain style consistency

The comment system now properly handles deletions and provides better visual hierarchy.
2025-10-04 10:55:54 -04:00
619aca286a Implement Stripe disable/enable functionality and improve checkout UX
## Major Features Added:
- **Stripe Disable/Enable**: Added per-shop Stripe enable/disable functionality similar to crypto currencies
- **Shop-themed Link Styling**: Implemented comprehensive link theming system using CSS classes
- **Responsive Checkout Layout**: Simplified checkout page to always use single-column responsive design

## Database Changes:
- Added `stripe_enabled` column to `mps_shop` table (defaults to enabled)
- Created Alembic migration with proper SQLite `server_default="1"` handling

## Template Updates:
- **Shop Settings**: Added Stripe disable/re-enable buttons with proper conditional logic
- **Checkout Page**: Simplified to single-column responsive layout (640px max, mobile-friendly)
- **Link Theming**: Added `shop-theme-link-color` class to all product/shop links across templates
- **Button Consistency**: Standardized all "Update" buttons to "Save" in shop settings

## Code Architecture:
- **Request Methods**: Added `request.stripe_globally_enabled` for clean separation of global vs per-shop settings
- **DRY Refactor**: Made `request.stripe_enabled` use `request.stripe_globally_enabled` to eliminate code duplication
- **CSS Grid Only**: Removed flexbox usage, enforced CSS Grid for all layouts per project standards

## Bug Fixes:
- Fixed "refund pending" messages showing incorrectly for `underpaid-not-refunded` status
- Fixed economically unviable refund emails showing incorrect "no fees deducted" messages
- Fixed checkout page horizontal scrolling issues on mobile/desktop
- Fixed CSS specificity issues with global link styles overriding shop themes

## Documentation:
- **CLAUDE.md**: Added comprehensive database migration guide with SQLite best practices
- **CSS Requirements**: Documented CSS Grid-only layout policy
- **Migration Examples**: Added server_default examples for SQLite column additions

## Templates Modified:
- cart.j2, cart_checkout.j2, shop_settings.j2, crypto_quotes_history.j2
- All template files updated with consistent shop-theme-link-color classes
- Ribbon snippet updated with proper CSS class definitions

This update provides shop owners full control over their Stripe payment acceptance
while maintaining backwards compatibility and improving overall user experience.
2025-10-04 10:41:20 -04:00
7610632f41 Update setup.py 2025-10-04 11:01:26 +00:00
8038f8cf08 Fix incorrect refund messaging for economically unviable payments
- Fix history page showing "refund pending" for underpaid-not-refunded status
- Add specific condition for -not-refunded statuses before -refunded condition
- Fix email templates to not show fee messages for no-refund cases
- Economically unviable refunds now show payment details only, not refund details
- Remove misleading "no fees deducted" message from no-refund scenarios
2025-10-03 18:48:29 -04:00
801cd7e595 Add dedicated CSS class for Continue shopping button
- Created .cart-continue-shopping-button class with blue styling
- Replaced product-edit-button class with cart-continue-shopping-button
- Button now has consistent styling across desktop and mobile
2025-10-03 18:25:32 -04:00
973f82ba59 Merge branch 'fix/localhost-domain-in-refund-emails' into 'master'
Fix localhost domain issue in economically unviable refund emails

See merge request engineering/make-post-sell/make_post_sell!53
2025-10-03 21:57:12 +00:00
94c6b65cd2 Fix localhost domain issue in economically unviable refund emails
Updated economically unviable refund email notifications to use
create_shop_context_request() instead of passing env_request directly
or creating DummyRequest objects. This ensures emails are sent from
the proper shop domain instead of localhost.

Fixed in:
- Expired payment processing (line ~2147)
- Underpayment processing (line ~2911)
- Passive monitoring refund retries (line ~3290)

Note: Duplicate payment processing was already correct.
2025-10-03 17:51:43 -04:00
b0dc15b06a Merge branch 'feature/economically-unviable-refund-emails' into 'master'
Add email notifications for economically unviable refunds

See merge request engineering/make-post-sell/make_post_sell!52
2025-10-03 20:54:16 +00:00
7ff744e0df Remove all 'contact support' references from refund emails
Removed support contact messages from:
- No refund address scenario emails
- Both text and HTML email templates

This is consistent with the policy that no support is offered for refunds.
2025-10-03 16:46:09 -04:00
125d8726bb Remove support contact message from economically unviable refund emails
The message 'Please contact support if you have questions' has been
removed since no support is offered for refunds.
2025-10-03 16:44:46 -04:00