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

Added matching categories to the search results of ElementsPanel for better accessibility. #264

Merged

Conversation

Chandrachur67
Copy link
Contributor

Fixes #262

Describe the changes you have made in this PR -

Previously, when searching for something on the search bar of ElementsPanel, it used to give elements that contained the search input as a substring in the name of the element.

I have added a new section that will show the categories that match the search input. To do the same, I have added another v-expansion-panel below the one that shows matched elements.
I haven't changed the code that is used to show all categories. I did it because I believe it will increase the readability of the code.

This feature will improve the accessibility of the search option. It will be even more helpful if, at a later stage, more categories are added.

Search Algorithm:

The search algorithm finds categories, for which any word in the category name starts with the search input. (Comparision is done after converting everything to lowercase.)

For example:

  • search-input = "Inp" will match with category = "Input"
  • search-input = "Elemen" will match with category = "Sequential Elements"
  • search-input = "Plexe" will match with category = "Decoders & Plexers"

Screenshots of the changes (If any) -

Screenshot 2024-01-21 at 11 30 39 PM
Screenshot 2024-01-21 at 11 31 58 PM
Screenshot 2024-01-21 at 11 33 26 PM

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Copy link

netlify bot commented Jan 21, 2024

Deploy Preview for circuitverse ready!

Name Link
🔨 Latest commit d4ecf64
🔍 Latest deploy log https://app.netlify.com/sites/circuitverse/deploys/65cb06d3b3d1e1000820715b
😎 Deploy Preview https://deploy-preview-264--circuitverse.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.

@Chandrachur67
Copy link
Contributor Author

Hey @Arnabdaz , I have raised the pr. please take a look at this whenever possible. thank you.

@Arnabdaz Arnabdaz merged commit ebdbfd6 into CircuitVerse:main Feb 13, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants