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

[Controls] Prevent the filter text field from being out of the window #2503

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Aug 16, 2024

Description

This PR fixes a UI issue that occurred for exclusive ChoiceParam attributes with large lists: when the node editor's height is bigger than the default one, the popup with the list of values was positioned at the top of the attribute's field, and its filtering text field was positioned outside of the application window.

The filtering text field is now always located at the attribute's place, meaning it can never be out of screen. The list of values is
then either dropped downwards or opened upwards depending on its size and where there is the most free space.

If we take the "Group Camera Fallback" attribute from the CameraInit node, instead of being displayed as such:

The filtering field text now looks like this, with the direction of the list of values depending on whether there is enough room downwards or not:

@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Aug 16, 2024
@cbentejac cbentejac self-assigned this Aug 16, 2024
@cbentejac cbentejac force-pushed the fix/editChoiceParam branch 2 times, most recently from d83e908 to 2349499 Compare August 19, 2024 14:48
@cbentejac cbentejac marked this pull request as ready for review August 19, 2024 14:58
@cbentejac cbentejac force-pushed the fix/editChoiceParam branch 2 times, most recently from fb2644e to 702868a Compare August 26, 2024 07:40
@cbentejac cbentejac marked this pull request as draft August 29, 2024 17:17
cbentejac and others added 3 commits September 3, 2024 18:01
The filter text field is now always placed at the position of the
attribute, meaning it is always in sight. The list of values is
then either dropped downwards or opened upwards depending on its
size and where there is the most free space.
Up until this commit, any action causing the filtering text field to lose
the focus was considered to be a valid edition, thus propagating the value
in the text field or the one highlighted to be propagated, even if the
user was clicking anywhere else in the application, or pressing the
`esc` key.

The distinction is now made between cases where the edition is finished
because it was validated (value clicked on, or selected with the `return`/
`enter` key), and not because it was cancelled (clicks outside of the
combobox or `esc` key pressed).
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.

2 participants