-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Variants: Implements validation hints to the variant selector (closes #19953) #20179
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
Conversation
… badge if there is a hint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the workspace split-view variant selector component by adding contextual hint badges that display validation errors and other statuses for inactive variants. This allows users to quickly identify which variants have issues without having to navigate to each variant individually.
Key changes:
- Integrates hint context consumption to track variant-specific hints
- Displays hint badges on inactive variants in both the main selector button and variant list
- Adds logic to prioritize hints by weight and filter for inactive variants
...e/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts
Show resolved
Hide resolved
...e/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts
Show resolved
Hide resolved
...e/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts
Show resolved
Hide resolved
leekelleher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested out, works as expected! 🚀
(Apart from the cosmetics of the badge being cut-off, but we'll resolve that in due course)
Description
Closes #19953
This pull request enhances the
umb-workspace-split-view-variant-selectorcomponent by integrating contextual hint badges for variants. The main improvements involve consuming the hint context, mapping variant-specific hints, and displaying badges for relevant variants in the UI.Hint context integration and display:
UMB_HINT_CONTEXTand observes descending hints, populating a_hintMapofvariantIdtoUmbVariantHintfor efficient lookup. [1] [2]#renderHintBadgemethod. [1] [2] [3] [4]Supporting logic and refactoring:
#isVariantHintto distinguishUmbVariantHintobjects from other hints.Screenshots
The validation hint happened on another variant than the active

Go to the variant with a hint
