-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix: Fix auto-reversion of label/title in the Metrics popover #19889
fix: Fix auto-reversion of label/title in the Metrics popover #19889
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19889 +/- ##
==========================================
+ Coverage 66.46% 66.53% +0.06%
==========================================
Files 1714 1714
Lines 65031 65033 +2
Branches 6716 6717 +1
==========================================
+ Hits 43224 43269 +45
+ Misses 20100 20057 -43
Partials 1707 1707
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@rusackas Ephemeral environment spinning up at http://18.236.70.234:8080. Credentials are |
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.
Looks great, and seems to work great!
One weird thing that might be worth a follow-up task... when you customize the metric title, it's super annoying that you can't hit enter
to save it. You have to click outside the input somewhere to de-focus. That's annoying.
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
When editing a metric in the Explore, the title label that's automatically set when using the Custom SQL mode gets reset if you hover over it/change tabs/interact with the popover.
The reason is because the component is always being rerender, and in that case, the metric get's a new id and the label state is lost.
This PR caches the metric component so that it only rerenders when needed.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
old.mov
After:
new.mov
TESTING INSTRUCTIONS
Ensure the title changes to match the sql entered.
Ensure hovering the title doesn't reset it.
ADDITIONAL INFORMATION