Skip to content

Improve sort order of Select component filtered results #1652

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

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

fturmel
Copy link
Collaborator

@fturmel fturmel commented Jul 11, 2024

closes #1264

Re-implements the react-select default filtering logic to be able to apply better ranked sorting on results. This applies to all instances of the Select component (tracks, challenges and showcase pages).

Sort priority:

  • Exact match
  • Exact word match + how close to start of string the match is
  • Partial match + how close to start of string the match is
Before This PR
CleanShot 2024-07-11 at 12 16 01@2x CleanShot 2024-07-11 at 12 16 37@2x

Copy link

netlify bot commented Jul 11, 2024

Deploy Preview for codingtrain ready!

Name Link
🔨 Latest commit 8cd9766
🔍 Latest deploy log https://app.netlify.com/sites/codingtrain/deploys/669007a75ad17c0008461e64
😎 Deploy Preview https://deploy-preview-1652--codingtrain.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shiffman
Copy link
Member

Tested and working beautifully! Reminds me that I should periodically do a round of cleanup and alignment of the topics/tags to be more consistent.

@shiffman shiffman merged commit fe4c44c into CodingTrain:main Jul 12, 2024
5 checks passed
@fturmel fturmel deleted the PR/select-filters-sort-order branch July 12, 2024 22:25
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.

bug/feat: exact match should be first result in search dropdown
2 participants