Skip to content

Global Search: Order Results and Search Menu items#402

Merged
elmarburke merged 3 commits intomainfrom
global-search/order-results
Sep 1, 2025
Merged

Global Search: Order Results and Search Menu items#402
elmarburke merged 3 commits intomainfrom
global-search/order-results

Conversation

@elmarburke
Copy link
Copy Markdown
Contributor

@elmarburke elmarburke commented Sep 1, 2025

Description

Orders the Results and the Search Menu items in the following order:

  1. Pages
  2. Collections
  3. Components
image

Testing

  • Results are ordered
    • search for a term in all three categories
    • find the order as above
  • Search Menu is in the right order
    • open the Search menu through the falafel icon
    • see the options ordered

@elmarburke elmarburke requested a review from Copilot September 1, 2025 12:28
Copy link
Copy Markdown
Contributor

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 pull request implements consistent ordering for search results and menu items in the Global Search plugin. The ordering prioritizes Pages, Collections, and Components in that sequence across both result display and the search menu interface.

  • Adds a sorting mechanism to group search results by type with a predefined order
  • Updates the search menu to display options in the same consistent order
  • Removes a hardcoded width constraint from the context menu

Reviewed Changes

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

File Description
group-results.ts Implements result sorting with a new comparison function and predefined order array
Menu.tsx Removes hardcoded width constraint from context menu
SearchScene.tsx Sorts menu items using the same ordering logic as search results

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread plugins/global-search/src/utils/filter/group-results.ts Outdated
Comment thread plugins/global-search/src/utils/filter/group-results.ts Outdated
@elmarburke elmarburke marked this pull request as ready for review September 1, 2025 12:31
Copy link
Copy Markdown
Contributor

@alecmev alecmev left a comment

Choose a reason for hiding this comment

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

Nice! Only nits 😌

Comment thread plugins/global-search/src/utils/filter/group-results.ts Outdated
Comment thread plugins/global-search/src/components/SearchScene.tsx Outdated
@elmarburke elmarburke force-pushed the global-search/order-results branch from e38f3ec to 53080e3 Compare September 1, 2025 15:53
@elmarburke elmarburke force-pushed the global-search/order-results branch from 53080e3 to 753df04 Compare September 1, 2025 15:56
@elmarburke elmarburke added this pull request to the merge queue Sep 1, 2025
Merged via the queue into main with commit 80328c4 Sep 1, 2025
6 checks passed
@elmarburke elmarburke deleted the global-search/order-results branch September 1, 2025 16:02
@alecmev
Copy link
Copy Markdown
Contributor

alecmev commented Sep 1, 2025

QA is ✅ btw 😂

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.

3 participants