alex-poor commented on code in PR #40679:
URL: https://github.com/apache/superset/pull/40679#discussion_r4041125650
##########
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx:
##########
@@ -109,6 +109,10 @@ export interface SliceHeaderControlsProps {
description: string;
viz_type: string;
slice_name: string;
+ // The name as rendered in the header: the localized value, or the panel's
+ // own title override. Used for strings the viewer reads; slice_name stays
+ // the canonical value for edits, filenames and extension payloads.
+ display_name?: string;
Review Comment:
Fixed in 65cb03f — good catch. `display_name` is now declared on both
copies, each with a note pointing at the other.
Worth spelling out why it still worked: `sliceForHeader` is a variable
rather than an object literal at the call site, so TypeScript's excess-property
check never fires and the field rode through a type that did not describe it.
Fine at runtime, invisible in the declared contract — exactly the drift you are
describing.
Left the duplication itself alone: collapsing the component's copy onto the
`types.ts` one touches a shared dashboard component for no behavioural gain, so
it seems better as its own change than smuggled into this PR.
--
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]