Skip to content

Conversation

@obenland
Copy link
Member

@obenland obenland commented Dec 4, 2025

Before After
Screenshot 2025-12-04 at 3 53 12 PM Screenshot 2025-12-04 at 3 51 59 PM

Proposed changes:

  • Wrap blocked domains and keywords tables in collapsible <details> elements.
  • Display count in summary (e.g., "82 blocked domains") so users know how many items exist.
  • Keep add form always visible outside the collapsible section.
  • Reduces visual clutter when many domains/keywords are blocked.

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to Settings → ActivityPub → Moderation tab.
  • Add several blocked domains or keywords.
  • Verify the table is collapsed by default showing "X blocked domains/keywords".
  • Click the summary to expand and see the full list.
  • Verify the add form remains visible when collapsed.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Wrap blocked domains and keywords tables in collapsible details element.

Copilot AI review requested due to automatic review settings December 4, 2025 21:51
@obenland obenland self-assigned this Dec 4, 2025
@obenland obenland requested a review from a team December 4, 2025 21:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the user experience in the ActivityPub moderation settings by making blocked domains and keywords lists collapsible. Users can now see at a glance how many items are blocked without being overwhelmed by long lists, while still having easy access to the full list when needed.

Key Changes:

  • Wrapped blocked domains and keywords tables in HTML <details> elements with summary text showing the count
  • Added count display using WordPress i18n plural functions
  • Kept add forms visible outside collapsible sections to maintain easy access

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
includes/wp-admin/class-settings-fields.php Added collapsible <details> wrapper with count display for both blocked domains and keywords tables
.github/changelog/2591-from-description Added changelog entry documenting the UI improvement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@obenland obenland requested a review from pfefferle December 5, 2025 14:34
Move the inline styles for the collapsible details/summary elements
to activitypub-admin.css instead of using inline styles in PHP.
@obenland obenland force-pushed the update/collapsible-moderation-tables branch from 4d67dae to 6205b3c Compare December 5, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants