Skip to content

Add search field to Followers, Following, and Mutual pages#658

Merged
akirk merged 2 commits into
mainfrom
feat/search-followers-following-mutual
Apr 21, 2026
Merged

Add search field to Followers, Following, and Mutual pages#658
akirk merged 2 commits into
mainfrom
feat/search-followers-following-mutual

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Apr 21, 2026

Summary

  • Adds a ?q= search field to /friends/followers/, /friends/following/, and /friends/mutual/ with the same UI pattern.
  • Followers (and Mutual, which reuses the followers template): searches display name, handle/URL, and summary.
  • Following: searches display name, user_login, user_url, and description.
  • Search runs in-memory after the category filter so the top-of-page totals stay accurate; pagination and filter/sort selections are preserved when searching. Block-theme renderer in includes/class-blocks.php mirrors the same behavior.

Test plan

  • /friends/followers/?q=alice narrows the list to matching followers and shows a match count.
  • /friends/following/?q=alice narrows subscriptions to matching people/feeds.
  • /friends/mutual/?q=alice narrows mutuals (uses followers template with filter=following).
  • Filter and sort selections stay active when typing into the search field and submitting.
  • The "Clear" link returns to the current filter/sort without the search term.
  • Pagination links for searched results include the q parameter.
  • composer check-cs passes.

Test in WordPress Playground

akirk added 2 commits April 21, 2026 13:13
Search matches against display name, handle/URL, and description
(summary for followers). Filters the in-memory list before category
filter/sort/pagination so counts and pagination reflect the search.
The existing filter and sort selections are preserved when searching.
Flatten the search markup (drop the inner <p>) and switch to a shared
.friends-search class with element-level hooks (label/input/submit/clear).
Add matching rules in friends.css and in the Mastodon, Twitter, and
Google Reader theme stylesheets so the form blends in instead of using
browser defaults.
@akirk akirk merged commit dc40e3e into main Apr 21, 2026
26 checks passed
@akirk akirk deleted the feat/search-followers-following-mutual branch April 21, 2026 11:30
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