-
Notifications
You must be signed in to change notification settings - Fork 96
schedule imbalance fix convert locales to dropdown #399
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
base: development
Are you sure you want to change the base?
schedule imbalance fix convert locales to dropdown #399
Conversation
Reviewer's GuideRefactors the locale switcher into a -based dropdown with new JS for outside-click handling, and updates layout.css to enforce nowrap flex layouts and style the dropdown menu.
Sequence diagram for locale dropdown interaction and outside click handlingsequenceDiagram
actor User
participant Header as Header (HTML)
participant Dropdown as Dropdown JS
participant System as Server
User->>Header: Clicks on locale dropdown
Header->>Dropdown: Dropdown opens
User->>Dropdown: Clicks outside dropdown
Dropdown->>Header: Dropdown closes
User->>Header: Selects a locale
Header->>System: Navigates to locale set URL
System-->>User: Page reloads with new locale
Class diagram for updated locale dropdown structureclassDiagram
class Header {
+locales : DetailsDropdown
}
class DetailsDropdown {
+summary : string
+dropdownContent : DropdownContent
}
class DropdownContent {
+dropdownItem : list<DropdownItem>
}
class DropdownItem {
+href : string
+active : bool
+name : string
}
Header --> DetailsDropdown
DetailsDropdown --> DropdownContent
DropdownContent --> DropdownItem
Class diagram for dropdown.js outside click handlerclassDiagram
class DropdownJS {
+initDropdowns()
+handleClickOutside(event)
}
DropdownJS : Listens for document click
DropdownJS : Closes open dropdowns if click is outside
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Saksham-Sirohi - I've reviewed your changes - here's some feedback:
- Enhance accessibility by toggling aria-expanded on the
element and adding a keydown handler (e.g. Escape) to close the dropdown for keyboard users. - Consider including a small polyfill or fallback for details/summary so the locale dropdown still works in browsers that don’t fully support those elements.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Enhance accessibility by toggling aria-expanded on the <summary> element and adding a keydown handler (e.g. Escape) to close the dropdown for keyboard users.
- Consider including a small polyfill or fallback for details/summary so the locale dropdown still works in browsers that don’t fully support those elements.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Please share a screenshot. |
@mariobehling Please see attached 2025-08-06.19-40-24.mov |
@mariobehling functionality has been updated to only use the dropdown when the number of available locales exceeds 3. Also, wrapping seemed to be breaking words have administered a fix for this |
Thanks. We are moving to enext. Please make the update there. Thanks! |
Fixes #386 as a high number of locales was the major cause of the breakdown, and it has been converted to a dropdown approach also some changes to flex have been made to keep it from breaking
Summary by Sourcery
Prevent header layout issues with many locales by converting locale links into a dropdown and tightening flex container settings.
Bug Fixes:
Enhancements: