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

fix(CommandPalette): Results groups order based on initial groups order #1457

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

maximepvrt
Copy link
Contributor

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Currently, in CommandPalette, the order of groups is determined based on the processing type (search or useFuse) rather than maintaining the initial order of groups. This can lead to confusion and inconsistency, especially when users expect groups to remain in the order they were initially arranged.

To address this issue, I propose implementing a fix that ensures the order of groups is preserved based on their initial arrangement. By prioritizing the original order, users will have a more intuitive experience.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@benjamincanac
Copy link
Member

I hear you but this was actually intended, the groups are computed in the order of the results so the command with the biggest score is on top.

@maximepvrt
Copy link
Contributor Author

maximepvrt commented Mar 4, 2024

I understand your perspective, but it seems that maintaining the initial order of groups could enhance user experience, especially in scenarios where users anticipate consistency in group arrangement. Currently, however, it appears that Fuse results consistently precede group async search results. For instance, in UDashboardSearch, the theme group consistently returns as the top result when utilizing a group that utilizes search functionality.

While I acknowledge the intention behind prioritizing results based on score, it might be worth considering a balance where the initial order of groups is preserved, ensuring a more predictable and intuitive experience for users. Would it be possible to explore a solution that retains this balance?

@benjamincanac
Copy link
Member

Of course I'm open to suggestions but your current implementation breaks the search on the documentation.

@maximepvrt
Copy link
Contributor Author

maximepvrt commented Mar 5, 2024

@benjamincanac I propose to add a props which takes an array of string ['fuse', 'search', 'static'] to order the results. What do you think ? static for my other PR #1458

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.

None yet

2 participants