-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Panel Header Fix: Implement new Panel Header on Angular Panels #66826
Conversation
Hello @axelavargas!
Please, if the current pull request addresses a bug fix, label it with the |
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.
@axelavargas tested this with http://localhost:3000/d/pttable/panel-tests-table?orgId=1 and http://localhost:3000/d/5SdHCadmz/panel-tests-graph?orgId=1 I couldn't find any issues so far.
data-testid={selectors.components.Panels.Panel.title(panel.title)} | ||
aria-label={selectors.components.Panels.Panel.containerByTitle(panel.title)} |
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.
Wonder if lack of these when using the new PanelChrome wouldn't cause some test to fail?
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.
Yes, in the past we got some failed tests when we enabled the newPanelChromeUI
feature flag by default, not only because of these selectors but also because we changed the flow of opening a menu. Marcus helped us in implementing code to maintain backward compatibility between the old angular panels and new panels PR. But, I think this code is not needed anymore as we will have the same flow for angular panels and react panels.
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.
This looks really good but looks like you can move a lot more of the props to getPanelChromeProps
I can see some issues related to updating the panel when changing its settings: Change of the DS, description, links, transparency, etc. do not change the data or look of the panel until after the dashboard is saved and the page reloaded. Screen.Recording.2023-04-20.at.14.01.24.movChanging the transparency, for example, is effective "immediately" if you change the panel type to a non-angular one and go back to the angular one: Video: From angular panel to react panel, transparency udpateScreen.Recording.2023-04-20.at.13.56.22.movNB! However, I can also see those problems on Ops right now: Video: reproducing in opsScreen.Recording.2023-04-20.at.13.59.20.mov |
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Thank you @polibb 🙌🏾, I've tested locally and confirmed that these are indeed bugs. As you mentioned, they also exist in the current implementation (I tested them in ops). For now, I won't address them in this PR since they are out of scope. We can discuss this problem with the team and evaluate whether we should fix these issues, keeping in mind that Angular panels are deprecated. |
@torkelo I applied all the suggestions 😄 |
import { PanelPadding } from '@grafana/ui'; | ||
import { InspectTab } from 'app/features/inspector/types'; | ||
import { getPanelLinksSupplier } from 'app/features/panel/panellinks/linkSuppliers'; | ||
import { plugin } from 'app/plugins/panel/alertGroups/module'; |
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.
@axelavargas I discovered a bug, the panel padding is not working / correctly set for panels that have the "noPadding" option set (Stat panel, old angular table panel).
The problem is that your importing plugin from here instead of accessing it from props :)
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.
oh! will fix it :)
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.
Manually tested with CarpetPlot and d3 - LGTM! Beautiful!
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> (cherry picked from commit 2a67b8a)
https://ops.grafana-ops.net/d/eef643/mimir-reads?orgId=1&refresh=10s I get nearly 100 of these |
Hey @gtk-grafana, thank you so much for pointing out this issue 🙌🏾 . Unfortunately, I overlooked the message 😢 and only became aware of the problem when it was brought up again today in our Slack channel. I have opened a PR to address this, as it isn't the expected behavior. |
What is this feature?
Use the new panel header on angular panels.
PanelChrome
onPanelChromeAngular
PanelChrome
on angular panelsgetPanelChromeProps
onPanelStateWrapper
Why do we need this feature?
Prevent a mix of UI on dashboards that have angular and react panels
Who is this feature for?
everyone
Which issue(s) does this PR fix?:
Fixes #66282
Special notes for your reviewer:
v10
? or9.5.x
?Please check that: