korbit-ai[bot] commented on code in PR #34678:
URL: https://github.com/apache/superset/pull/34678#discussion_r2274067396
##########
superset-frontend/packages/superset-ui-core/src/ui-overrides/types.ts:
##########
@@ -251,4 +252,16 @@ export type Extensions = Partial<{
ComponentType<SQLTablePreviewExtensionProps>,
][];
'filter.dateFilterControl': ComponentType<DateFilterControlProps>;
+ 'explore.chart.header': ComponentType<{
+ chartId: number;
+ queriesResponse: QueryData[] | null;
+ sliceFormData: QueryFormData | null;
+ queryFormData: QueryFormData;
+ lastRendered: number;
+ latestQueryFormData: LatestQueryFormData;
+ chartUpdateEndTime: number | null;
+ chartUpdateStartTime: number;
+ queryController: AbortController | null;
+ triggerQuery: boolean;
+ }>;
Review Comment:
### Missing Essential Header Action Callbacks <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The chart header extension point lacks props for header customization
callbacks (e.g., onRefresh, onDownload, etc.), which are essential for header
functionality.
###### Why this matters
Without these callback props, custom header implementations won't be able to
trigger standard chart actions, limiting the practical usefulness of the
extension point.
###### Suggested change ∙ *Feature Preview*
Add necessary callback props to the chart header component type:
```typescript
'explore.chart.header': ComponentType<{
chartId: number;
queriesResponse: QueryData[] | null;
sliceFormData: QueryFormData | null;
queryFormData: QueryFormData;
lastRendered: number;
latestQueryFormData: LatestQueryFormData;
chartUpdateEndTime: number | null;
chartUpdateStartTime: number;
queryController: AbortController | null;
triggerQuery: boolean;
// Add essential callbacks
onRefresh?: () => void;
onDownload?: () => void;
onExplore?: () => void;
onShare?: () => void;
}>
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7bb7021b-249a-40bb-9f9a-4c079e0abe03/upvote)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7bb7021b-249a-40bb-9f9a-4c079e0abe03?what_not_true=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7bb7021b-249a-40bb-9f9a-4c079e0abe03?what_out_of_scope=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7bb7021b-249a-40bb-9f9a-4c079e0abe03?what_not_in_standard=true)
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7bb7021b-249a-40bb-9f9a-4c079e0abe03)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:033ecb80-c4cb-4b09-9dd3-4a9de849bd80 -->
[](033ecb80-c4cb-4b09-9dd3-4a9de849bd80)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]