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

feat(web): fixed combobox positioning #12848

Merged
merged 23 commits into from
Sep 25, 2024
Merged

feat(web): fixed combobox positioning #12848

merged 23 commits into from
Sep 25, 2024

Conversation

ben-basten
Copy link
Member

@ben-basten ben-basten commented Sep 22, 2024

Description

Dropdown options can appear above all other page content and expand outside of modals, making them easier to use. When there is limited space to show the dropdown menu below the text input, it will move to top positioning. This is similar to the solution proposed in #11810.

The dropdown menu is automatically closed if the input box is hidden by another element.

Also in this change:

  • Reworking the scroll container in full screen modals, to prevent an issue where the bottom buttons scroll with modal content incorrectly.
  • Fix the "Edit date and time" + "Tag assets" modals being obscured in Safari. Applied the same fix as fix(web): add location modal invisible on safari #9756.
  • Expand the link text in the "Tag assets" modal to include more context than just "here".

How Has This Been Tested?

Testing matrix

Above/below refer to the position of the dropdown menu, relative to the input box.

Due to poor results with the dropdown menu appearing "above" on mobile devices, it will only appear below when a mobile virtual keyboard or zoom is applied.

OS/Browser Virtual keyboard open Pinch zoom in Default zoom support
iOS/Safari Below: ✅ Above: ❌ Slight zoom when an input field is clicked breaks positioning above Below: ✅ Above: ❌ Below/Above: ✅
iPadOS/Safari Below: ✅ Above: ❌ Below/Above: ✅
Android/Chrome 🟡 Works if dropdown is triggered in a position that is above where the virtual keyboard appears Below/Above: ❌ Loses position tracking Below/Above: ✅
Android/Firefox Below/Above: ❌ Loses position tracking Below/Above: ✅
MacOS/Safari N/A 🟡 Untested - do not have a trackpad to test pinch zoom in Safari Below/Above: ✅
MacOS/Chrome+Firefox N/A N/A Below/Above: ✅

Combobox locations

  • Search options: city, country, state, camera make, camera model
  • App settings: language
  • App settings: time locale
  • Change date modal
  • Tag asset modal
  • Admin job status: create job modal

Testing considerations

  • Dropdown with no scrolling options, above and below
  • Dropdown with scrolling options, above and below
  • Dropdown moves as the page scrolls, repositions to top if not enough room
  • Dropdown moves as the page vertically resizes, repositions to top if not enough room

Screenshots

responsive-dropdown.mp4
Expand for screenshots

create-job
edit-date-and-time
tag-assets

@ben-basten ben-basten marked this pull request as ready for review September 22, 2024 17:00
@danieldietzler
Copy link
Member

Fixes #12839

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

The code looks good to me!

@jrasm91 jrasm91 merged commit 8d515ad into main Sep 25, 2024
35 checks passed
@jrasm91 jrasm91 deleted the feat/combobox-positioning branch September 25, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants