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

[PW-11902] Improve auto-hide behavior with active dropdown menus #650

Merged

Conversation

HalfbyteHeroes
Copy link
Member

Description

This PR improves the auto-hide behavior of the UI when the dropdown menu of a SelectBox is shown.

Before the UI would auto-hide after the specified timeout regardless of whether a dropdown menu was currently shown or not. With the changes introduced in this PR, the UI will now stay visible and auto-hiding will be disabled whenever a dropdown is shown.

In order to do so, the following changes were implemented:

  • allowed Timeout execution to be suspended, meaning all calls to start and reset will be ignored until timeout execution is resumed
  • added a ViewMode to Component with the following values:
    • Persistent: the component shall be visible at all times and UI auto-hiding shall be disabled
    • Temporary: the component may be hidden at any time
  • modified the SelectBox to set its ViewMode to Persistent whenever and as long as the dropdown of the associated select tag is shown
  • modified both UIContainer and SettingsPanel to suspend hide-timeout execution as long as there is at least one component with a Persistent view mode
  • fixed a bug in Safari were the dropdown menu of a SelectBox would stay visible when the UI is hidden

Checklist (for PR submitter and reviewers)

  • CHANGELOG entry

@HalfbyteHeroes HalfbyteHeroes marked this pull request as ready for review September 5, 2024 12:22
Copy link
Contributor

@wasp898 wasp898 left a comment

Choose a reason for hiding this comment

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

Tested on Safari, Firefox and Chrome. New behavior makes more sense. 👍

@wasp898 wasp898 merged commit b93fcd3 into develop Sep 6, 2024
3 checks passed
@wasp898 wasp898 deleted the feature/PW-11902/improved-drop-down-list-auto-hide-behavior branch September 6, 2024 16:48
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.

2 participants