-
Notifications
You must be signed in to change notification settings - Fork 31
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: ChartBuilderPlugin fixes for charts built from PPQs in Enterprise #2167
fix: ChartBuilderPlugin fixes for charts built from PPQs in Enterprise #2167
Conversation
- Should be opening up correctly now...
- Wasn't working for charts created from Parameterized Queries
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2167 +/- ##
==========================================
+ Coverage 46.75% 46.78% +0.02%
==========================================
Files 694 694
Lines 38639 38627 -12
Branches 9785 9659 -126
==========================================
+ Hits 18065 18070 +5
- Misses 20521 20546 +25
+ Partials 53 11 -42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Is there a DHE ticket associated with this?
} | ||
|
||
export const ChartPanelPlugin = forwardRef( | ||
(props: WidgetPanelProps<DhType.plot.Figure>, ref: React.Ref<ChartPanel>) => { | ||
const dh = useApi(); | ||
const fetchObject = useObjectFetcher(); | ||
const deferredApi = useContext(DeferredApiContext); |
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 makes me wonder if we should still have useApi
. Could useApi
cause unknown bugs in DHE because we don't have the same complexity in DHC? I guess either way we would have to be cognizant of when to pass the metadata
Also, why not useDeferredApi(metadata)
here?
- Use useDeferredApi instead of fetching from context directly - Allow null to be passed in for descriptor in useDeferredApi and throw an error accordingly
- Don't return an error from makeModel until the API has loaded or an error has occurred - Allow ChartPanel to reload if makeModel has updated even if it hasn't loaded a model yet
AppDashboards
- the descriptor gets sanitized within the objectFetcher itselfpanelFetch
to get the underlying objectParameterizedQuery
on Enterprise, we only have the result of theParameterizedQuery
run in theParameterizedQueryPanel
ParameterizedQuery
support, we should complete DH-15760 (which would be breaking an internal API)