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

Bug 1870891 - Replace native <select> with custom element with search bar #2157

Merged
merged 14 commits into from
Jan 9, 2024

Conversation

kyoshino
Copy link
Collaborator

@kyoshino kyoshino commented Dec 20, 2023

Bug 1870891 - Replace native <select> with custom element with search bar

This PR replaces most of the native <select> elements on the enter_bug and show_bug pages with new custom elements. A search bar appears when there are 10 or more options for easier filtering. The component dropdown displays the component description in a popover.

Implementation note: These dropdown lists and popovers are created using <dialog> (modal top layer) instead of the Popover API (non-modal top layer) because the latter is not yet enabled in Firefox other than Nightly. It’s not a problem but just in case some wonder.

image image

@kyoshino
Copy link
Collaborator Author

kyoshino commented Dec 20, 2023

Hmm, all the Selenium tests failed. I assume the headless Firefox instance is too old to support some features:

  • <dialog> shipped with Firefox 98 in March 2022
  • ElementInternals shipped with Firefox 93 in October 2021

selenium/standalone-firefox:3.141.59 was released in September 2021.

@kyoshino kyoshino force-pushed the 1870891-component-dropdown branch from a3a6fbb to c713707 Compare December 21, 2023 16:12
@kyoshino kyoshino marked this pull request as draft December 21, 2023 16:28
@kyoshino
Copy link
Collaborator Author

Tests are still failing, of course — because I have replaced <select> and <option> with <bz-select> and <bz-option>. I’m updating relevant XPaths in the tests accordingly.

@kyoshino kyoshino force-pushed the 1870891-component-dropdown branch from 16f8d28 to fbf9dab Compare December 22, 2023 06:27
@kyoshino kyoshino marked this pull request as ready for review December 23, 2023 08:00
@kyoshino
Copy link
Collaborator Author

All tests passed 🟢

@dklawren
Copy link
Collaborator

dklawren commented Jan 5, 2024

Is this ready for review? I can start looking at it right away if so.

@kyoshino
Copy link
Collaborator Author

kyoshino commented Jan 5, 2024

Is this ready for review? I can start looking at it right away if so.

Yes!

@dklawren dklawren self-requested a review January 5, 2024 02:00
Copy link
Collaborator

@dklawren dklawren left a comment

Choose a reason for hiding this comment

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

Mostly everything checks out and looks great! I did see one issue that will need to be resolved. When changing the product on a current bug (show_bug.cgi) the component, version and milestone fields need to be highlighted the same way the current bug page does. This is not happening with the new select. For example:

image

I have installed your latest changes on bugzilla-dev.allizom.org if you want to see it in action with a large list of components, etc.

@kyoshino
Copy link
Collaborator Author

kyoshino commented Jan 9, 2024

Thanks @dklawren! I’ve added the fix for field highlights.

@kyoshino kyoshino requested a review from dklawren January 9, 2024 01:02
@dklawren dklawren self-requested a review January 9, 2024 21:00
@dklawren dklawren merged commit a8a2ae3 into mozilla-bteam:master Jan 9, 2024
14 of 15 checks passed
@kyoshino kyoshino deleted the 1870891-component-dropdown branch January 9, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants