Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort groups in addition to items #255

Open
rorhug opened this issue May 8, 2024 · 3 comments
Open

Sort groups in addition to items #255

rorhug opened this issue May 8, 2024 · 3 comments
Labels

Comments

@rorhug
Copy link

rorhug commented May 8, 2024

The default search function is fuzzy (which makes sense #55) however the order could still be improved. In this example, maybe Figma is a good suggestion for ex but the ones containing "Extension" should definitely rank first.

image
@Jamess-Lucass
Copy link

I believe this is expected functionality due to the fact they are separate sections and defined by two different Command.Group components in code.

<Command.Group heading="Suggestions">
<Item value="Linear" keywords={['issue', 'sprint']}>
<Logo>
<LinearIcon
style={{
width: 12,
height: 12,
}}
/>
</Logo>
Linear
</Item>
<Item value="Figma" keywords={['design', 'ui', 'ux']}>
<Logo>
<FigmaIcon />
</Logo>
Figma
</Item>
<Item value="Slack" keywords={['chat', 'team', 'communication']}>
<Logo>
<SlackIcon />
</Logo>
Slack
</Item>
<Item value="YouTube" keywords={['video', 'watch', 'stream']}>
<Logo>
<YouTubeIcon />
</Logo>
YouTube
</Item>
<Item value="Raycast" keywords={['productivity', 'tools', 'apps']}>
<Logo>
<RaycastIcon />
</Logo>
Raycast
</Item>
</Command.Group>
<Command.Group heading="Commands">
<Item isCommand value="Clipboard History" keywords={['copy', 'paste', 'clipboard']}>
<Logo>
<ClipboardIcon />
</Logo>
Clipboard History
</Item>
<Item isCommand value="Import Extension" keywords={['import', 'extension']}>
<HammerIcon />
Import Extension
</Item>
<Item isCommand value="Manage Extensions" keywords={['manage', 'extension']}>
<HammerIcon />
Manage Extensions
</Item>
</Command.Group>

I don't think ranking groups and changing their order based on the item's rank would be a good idea as I believe the intention for the group is to allow the user to define static ordering and separation.

I personally would prefer the ordering of groups I have defined in my codebase to always be in that order, upon multiple uses I believe this improves user experience as the groups are always in the same order and "place".

@pacocoursey
Copy link
Owner

Groups should be sorted. Not sure why they're not… will take a look!

@pacocoursey pacocoursey changed the title Search function puts less irrelevant results first Order groups in addition to items May 19, 2024
@pacocoursey pacocoursey changed the title Order groups in addition to items Sort groups in addition to items May 19, 2024
@Acring
Copy link

Acring commented Jun 3, 2024

try fix in #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants