Skip to content

Conversation

@iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Sep 18, 2025

Description

Closes #19953

This pull request enhances the umb-workspace-split-view-variant-selector component 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:

  • Consumes the UMB_HINT_CONTEXT and observes descending hints, populating a _hintMap of variantId to UmbVariantHint for efficient lookup. [1] [2]
  • Adds logic to display the highest-priority hint badge for inactive variants in both the main selector button and the variant list, using the new #renderHintBadge method. [1] [2] [3] [4]
  • Ensures that each variant option in the list shows its associated hint badge when not active, improving user awareness of variant-specific issues or statuses.

Supporting logic and refactoring:

  • Implements a type guard #isVariantHint to distinguish UmbVariantHint objects from other hints.
  • Refactors rendering logic to use the hint map and active state consistently.

Screenshots

The validation hint happened on another variant than the active
image


image

Go to the variant with a hint
image

Copilot AI review requested due to automatic review settings September 18, 2025 06:41
Copy link
Contributor

Copilot AI left a 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

@iOvergaard iOvergaard changed the title V16/feature/variant hints Variants: Implements validation hints to the variant selector Sep 18, 2025
@iOvergaard iOvergaard changed the title Variants: Implements validation hints to the variant selector Variants: Implements validation hints to the variant selector (closes #19953) Sep 18, 2025
Copy link
Member

@leekelleher leekelleher left a 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)

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.

v16 - No UI feedback if a block property on a different culture fails validation

3 participants