Skip to content

fix(ui): use variation name as label in evaluation chart for YAML/JSON type#2573

Open
steveninhle wants to merge 1 commit into
mainfrom
fix/evaluation-chart-yaml-json-variation-label
Open

fix(ui): use variation name as label in evaluation chart for YAML/JSON type#2573
steveninhle wants to merge 1 commit into
mainfrom
fix/evaluation-chart-yaml-json-variation-label

Conversation

@steveninhle
Copy link
Copy Markdown
Collaborator

Summary

  • Evaluation chart legend was showing raw YAML/JSON blob content as the
    variation label, making it unreadable for those variation types
  • Fix: resolve variation label using variation.name || variation.value,
    which prefers the human-readable name when set and falls back to value
    otherwise
  • This aligns the chart legend with the evaluation table, which already
    uses the same name || value fallback pattern

Copy link
Copy Markdown

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

Updates the feature-flag evaluation chart legend to display human-readable variation labels for JSON/YAML (and other) variation types by preferring a variation’s name and falling back to value, matching the behavior already used in the evaluation table.

Changes:

  • Resolve each chart legend label via variation.name || variation.value (with fallback to "default value" for the default bucket).
  • Refactor label resolution to avoid repeating the find call inline and improve readability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@steveninhle steveninhle marked this pull request as ready for review May 12, 2026 06:41
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