mirror of
https://github.com/apache/superset.git
synced 2026-05-29 20:29:34 +00:00
Master's class version passed the full <ControlHeader> as modalTitle via
`as any` to bypass ModalTrigger's `modalTitle?: string` typing. The FC
conversion narrowed that to `String(label || '')`, which dropped the
description tooltip, validation badges, and warning icons from the
"Edit X in modal" header.
- Widen `ModalTrigger.modalTitle` to `ReactNode` (the inner `Modal`'s
`title` already accepts ReactNode; only `name` needs to stay a string
for data-test/telemetry, so we pass `name` only when modalTitle is a
string).
- Replace TextAreaControl's 12-prop destructure-and-cast of restProps
with `<ControlHeader name={name} {...restProps} />`, matching the
spread pattern used by ViewportControl elsewhere in this PR.
- Pass `controlHeader` (now equivalent to master's behavior) back to
ModalTrigger.
Also: restore the SupersetClient.get spy in DatasourceControl.test.tsx's
afterAll so the module-scope spy doesn't leak into other test files in
the same Jest worker (per the Copilot bot suggestion).
Per @sadpandajoe's two review comments on TextAreaControl and the
Copilot bot's mock-restoration note on DatasourceControl.test.tsx.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>