Skip to content

Mastodon theme: fix search, add cmd-k, style messages#651

Merged
akirk merged 2 commits into
mainfrom
fix/mastodon-theme-search-and-messages
Apr 10, 2026
Merged

Mastodon theme: fix search, add cmd-k, style messages#651
akirk merged 2 commits into
mainfrom
fix/mastodon-theme-search-and-messages

Conversation

@akirk

@akirk akirk commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix search returning all WP users: User_Query::search(), all_subscriptions(), and starred_friends_subscriptions() were using new self(array('number' => 0)) which ran a WP_User_Query with no role filter, returning all WordPress users alongside virtual subscriptions. Changed to array('include' => array(0)) to suppress the parent query.
  • Add cmd-k/ctrl-k shortcut to focus the search input in the Mastodon theme, matching the main theme behavior. Escape blurs it. Added to the ? help overlay.
  • Fix search autocomplete styling: Override spectre CSS display: flex and gap: 10px on .menu-item a that broke inline <mark> highlighting (text appeared spaced out). Fix hover/focus artifacts from spectre's padding/margin/background rules. Fix search input resizing during loading spinner.
  • Style messages for Mastodon theme: Conversation list, message bubbles, reply form, and unread indicators now match the Mastodon visual language.
Changelog
  • Automatically create a changelog entry from the details below

Type

  • Fixed

Message

Fix Mastodon theme search autocomplete styling and prevent User_Query from returning non-subscription WordPress users.

Test plan

  • Search for a subscription in the Mastodon theme — only subscriptions should appear, no admin users
  • Press cmd-k (Mac) or ctrl-k — search input should focus
  • Press Escape while search is focused — should blur
  • Type a query — autocomplete results should show names with highlighted matches inline (no extra spacing)
  • Arrow-down through results — focus highlight should be subtle purple, no blue outlines
  • Search input should not resize while loading spinner is active
  • Visit a friend's page with messages — messages should be styled in the Mastodon theme

- Fix User_Query returning all WP users instead of only subscriptions by
  using `include => array(0)` to suppress the parent WP_User_Query
- Add cmd-k/ctrl-k keyboard shortcut to focus the search input
- Fix search autocomplete dropdown: override spectre flex/gap styles that
  broke inline <mark> highlighting and caused visual artifacts on hover/focus
- Fix search input resizing during loading spinner animation
- Add Mastodon-themed styling for the messages display
@github-actions

Copy link
Copy Markdown
Contributor

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

@akirk akirk merged commit 0a9d0b5 into main Apr 10, 2026
@akirk akirk deleted the fix/mastodon-theme-search-and-messages branch April 10, 2026 10:40
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.

1 participant