Skip to content

Conversation

@kh-ub-ayb
Copy link
Contributor

@kh-ub-ayb kh-ub-ayb commented Jan 29, 2026

Description

Currently, when clicking on the language select icon (#languageSelectIcon) and opening the language dropdown, users cannot visually identify which language is currently selected. This PR adds a clear visual indicator to highlight the currently selected language.

Changes Made

CSS (css/themes.css)

  • Added .selected-language class with blue left border and subtle background highlight
  • Includes dark mode styling for better visibility

JavaScript (js/toolbar.js)

  • Updated renderLanguageSelectIcon() to:
    • Highlight the current language when dropdown opens
    • Update highlight immediately when a new language is selected
    • Map browser language codes (e.g., en-USenUS) for first-time users

BEFORE

image

AFTER

image

Testing

  • Verified highlight appears for stored language preference
  • Verified highlight appears for browser language (first-time users)
  • Verified highlight updates on language selection
  • Verified works in both light and dark modes
  • ESLint passes with npm run lint

Related Issue

Fixes #5410

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

toolbar.test.js

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

1 similar comment
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@kh-ub-ayb
Copy link
Contributor Author

@walterbender @omsuneri please review.
I’ve tested and verified all the changes included here.

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.

[UI/UX] No visual indicator for currently selected language in dropdown

1 participant