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

feat(widget-builder): Add legend aliases to visualize #82313

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Dec 18, 2024

Supports aliases for fields. I do this by modifying the serialize/deserialize methods to allow for a JSON string that represents the field with the alias. It only applies the JSON string if it has an alias, otherwise we just put it in as normal. This is for convenience so we don't have to update all of the tests to account for this.

The deserialize method will try to parse the field as JSON, and if that doesn't work, fallback to the old method of exploding the string.

Also adds the correct handling to take a widget and turn it into params, or take the state and convert it into a widget (specifically, passing the aliases around in the WidgetQuery data structure)

Closes #82368

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 18, 2024
@narsaynorath narsaynorath mentioned this pull request Dec 18, 2024
4 tasks
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #82313      +/-   ##
==========================================
- Coverage   80.43%   80.43%   -0.01%     
==========================================
  Files        7303     7303              
  Lines      321961   321954       -7     
  Branches    20990    20989       -1     
==========================================
- Hits       258972   258966       -6     
+ Misses      62584    62583       -1     
  Partials      405      405              

@narsaynorath narsaynorath marked this pull request as ready for review December 19, 2024 17:01
@narsaynorath narsaynorath requested a review from a team as a code owner December 19, 2024 17:01
@narsaynorath narsaynorath changed the title wip: feat(widget-builder): Add legend aliases to visualize feat(widget-builder): Add legend aliases to visualize Dec 19, 2024
Copy link
Member

@nikkikapadia nikkikapadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@narsaynorath narsaynorath merged commit 00ffeb5 into master Dec 19, 2024
46 checks passed
@narsaynorath narsaynorath deleted the nar/feat/widget-builder-add-field-aliases branch December 19, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support aliases in the visualize field
2 participants