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

Unify dropdown functionality across all dropdowns #5587

Open
hom3mad3 opened this issue Apr 8, 2024 · 0 comments
Open

Unify dropdown functionality across all dropdowns #5587

hom3mad3 opened this issue Apr 8, 2024 · 0 comments
Assignees
Labels
Dev: A11y Accessability issue, e.g. screen reader, tabbing order Dev: Refactor issues to be fixed with code refactor Prio: Medium fixed and released with next scheduled release

Comments

@hom3mad3
Copy link
Contributor

hom3mad3 commented Apr 8, 2024

Issue:

dropdown.js lacks certain features found in user_indicator.js, such as keyboard navigation and close-on-click-outside functionality. However, user_indicator.js isn't easily modularized due to its design, which focuses on a single element without considering component reusability.

Proposal:

To address this, I'd suggest refactoring user_indicator.js onto dropdown.js to integrate the missing features, enhancing the overall reusability of dropdown functionality. This will ensure that all dropdowns use one JS file, even when multiple instances are present on the page.

Example:

1. dropdown.js

element triggered with dropdown.js and styled by scss/components_user_facing/_dropdown.scss:

item-detail-dropdown

2. user_indicator.js

event is triggered w/ user_indicator.js and styled by /scss/components_user_facing/_user_indicator.scss:

user-dropdown
@hom3mad3 hom3mad3 added Dev: Refactor issues to be fixed with code refactor Dev: A11y Accessability issue, e.g. screen reader, tabbing order Prio: Medium fixed and released with next scheduled release labels Apr 8, 2024
@hom3mad3 hom3mad3 changed the title Unify Dropdown Functionality Across All Dropdowns Unify dropdown functionality across all dropdowns Apr 8, 2024
@hom3mad3 hom3mad3 self-assigned this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev: A11y Accessability issue, e.g. screen reader, tabbing order Dev: Refactor issues to be fixed with code refactor Prio: Medium fixed and released with next scheduled release
Projects
None yet
Development

No branches or pull requests

1 participant