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

UI: Redesign exclusive ChoiceParam UI component #2656

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

yann-lty
Copy link
Member

@yann-lty yann-lty commented Jan 23, 2025

Description

Re-design the UI control for editing an exclusive ChoiceParam.

Before

Behavior

combo_current

Custom Value indicator

image

After (this PR)

Behavior

combo_new

Custom value indicator

image

Features list

  • Make custom value setting from filter an explicit action.
  • Use a less error-looking UI for indicating the use of a custom value.
  • Fix value being changed on non explicit actions (eg: when clicking outside the selection popup to discard it).
  • Fix incorrect value being displayed in the UI compared to the actual attribute value (eg: after an undo).

Implementation remarks

Rely as much as possible on the behaviors provided by the default ComboBox component to avoid custom logic for e.g keyboard navigation.
Move away from imperative code for handling value binding, simplifying the usage of the FilterComboBox component and making sure that the displayed value is always reflecting the actual attribute's value.
Simplify the filtering logic.

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.93%. Comparing base (1f42ad3) to head (0d3a49d).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2656   +/-   ##
========================================
  Coverage    69.93%   69.93%           
========================================
  Files          121      121           
  Lines         7088     7088           
========================================
  Hits          4957     4957           
  Misses        2131     2131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Simplify the FilterComboBox to rely on the default behavior
provided by the ComboBox control.
Improve the filtering system and the ability to set a custom value.
Turn to a more declarative approach with regard to handling
value update and its mapping to the combobox's current index.
@yann-lty yann-lty marked this pull request as ready for review January 23, 2025 16:12
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.

1 participant