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

Improve Language Selector dropdowns #254

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

psychlone77
Copy link
Collaborator

Description

Type of Change

  • ✨ New snippet
  • πŸ›  Improvement to an existing snippet
  • 🐞 Bug fix
  • πŸ“– Documentation update
  • πŸ”§ Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Additional Context

This is an improvement to LanguageSelector dropdown and the SubLanguage dropdown. I have added some animations to the dropdowns using vanilla CSS. I have removed showing the dropdown using the state variable and used it to just change the CSS class. As a side effect this then renders the dropdowns and fetches SVG icons the background which also removes the weird state where the dropdown has the icons missing on the initial load (Recreated by disabling cache). (Shown below in the videos)

Demonstrations

Old Dropdown

dropdown-old.mp4

New Dropdown

dropdown-new.mp4

@technoph1le
Copy link
Owner

Hey, there! Awesome work. Love it πŸ‘

@psychlone77
Copy link
Collaborator Author

I just realised there is a small bug when using the keyboard navigation. The hidden - languages are also being selected since they are still part of the list.

Copy link
Owner

@technoph1le technoph1le left a comment

Choose a reason for hiding this comment

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

It looks good to me.

@psychlone77 psychlone77 merged commit 595186b into technoph1le:main Feb 6, 2025
1 check 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
Development

Successfully merging this pull request may close these issues.

2 participants