Skip to content

fix: show post approve button properly on mobile (#720)#761

Open
shayesdevel wants to merge 3 commits into
themotte:frostfrom
shayesdevel:fix/720
Open

fix: show post approve button properly on mobile (#720)#761
shayesdevel wants to merge 3 commits into
themotte:frostfrom
shayesdevel:fix/720

Conversation

@shayesdevel
Copy link
Copy Markdown
Contributor

@shayesdevel shayesdevel commented Feb 26, 2026

Closes #720

Summary

  • Added inline filter approve/remove buttons to the mobile footer bar in both post listing and single post views, matching the desktop behavior where these buttons are directly visible for filtered posts
  • Fixed CSS classes on approve/remove buttons in the admin mobile modal (actions_admin_mobile.html) from dropdown-item list-inline-item to list-group-item to match the parent list-group container, giving proper padding and consistent styling

Changes

  • files/templates/submission_listing.html -- added filter approve/remove buttons to mobile footer when post is filtered
  • files/templates/submission.html -- same change for the single post view mobile bar
  • files/templates/component/post/actions_admin_mobile.html -- fixed CSS classes on mod approve/remove from dropdown-item to list-group-item, added icon margin
  • files/tests/test_admin.py -- added 3 page load tests for filtered post approve button rendering

Testing

  • Visual review of approve button placement on mobile-width viewports
  • Verified button styling matches existing patterns (btn-primary for Approve, btn-danger for Remove, same padding/font-size as the Reports button)
  • Verified admin modal approve/remove items now use list-group-item consistent with sibling elements
  • Automated tests added:
    • test_filtered_post_has_approve_button -- loads individual filtered post page as admin, verifies approve/remove button markup
    • test_filtered_post_listing_has_approve_button -- loads /admin/filtered/posts with a filtered post, verifies buttons
    • test_filtered_post_mobile_actions_load -- verifies mobile admin actions modal renders list-group-item styled buttons

Generated with Claude Code

shayesdevel and others added 2 commits February 27, 2026 11:31
Two issues fixed:

1. Filter approve/remove buttons (for posts with state_mod FILTERED)
   were only shown on desktop in the inline action bar. Added matching
   buttons to the mobile footer bar in both submission_listing.html and
   submission.html so admins can approve/remove filtered posts directly
   on mobile without needing to dig through modals.

2. In the admin mobile modal (actions_admin_mobile.html), the mod
   approve/remove buttons used dropdown-item classes but lived inside a
   list-group container, causing them to render without proper padding
   and spacing. Changed to list-group-item with mr-2 on icons to match
   the styling of other items in the same modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…#720)

Three tests verify the approve/remove button markup renders correctly:
- Individual filtered post page shows filter-approve/filter-remove buttons
- Filtered posts admin listing shows the buttons
- Mobile admin actions modal includes list-group-item styled buttons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename mobile filter button IDs from filter-approve/filter-remove to
filter-approve-mobile/filter-remove-mobile to avoid duplicate HTML IDs
when both desktop and mobile sections are in the DOM simultaneously.
Update filter_actions.js to also clean up the mobile buttons on action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zorbathut
Copy link
Copy Markdown
Contributor

Currently has a conflict; I think part of this might already be done, though? The user just hadn't realized it was in a dropdown. Look over this more closely if you would, this might just be a no-longer-relevant bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post "approve" button doesn't show up in a sensible place on mobile UI

2 participants