yousoph opened a new pull request, #42491:
URL: https://github.com/apache/superset/pull/42491

   ### SUMMARY
   
   When a chart fails to render **inside a dashboard**, the error is shown as a 
flat, truncated alert with no way to expand it for more detail. The same chart 
error in **Explore** still shows an expandable **"See more"** with the full 
stack trace.
   
   This is a regression from #31858 (*"chore: refactor Alert-related 
components"*), which reworked `ErrorAlert` so the "See more" toggle only 
renders when `descriptionDetails` is truthy. `descriptionDetails` is derived 
from `link || stackTrace`. Explore's `ExploreChartPanel` forwards 
`chartStackTrace`, so its toggle renders; the dashboard chart wrapper 
(`gridComponents/Chart/Chart.tsx`) never forwarded `chartStackTrace`, so 
`descriptionDetails` was `undefined` and no expand affordance appeared.
   
   ### Changes
   
   - **`dashboard/components/gridComponents/Chart/Chart.tsx`** — forward 
`chartStackTrace` into `<ChartContainer>`, mirroring `ExploreChartPanel`. 
Restores "See more" / stack-trace parity for the common case (chart errors that 
carry a stack trace).
   - **`components/ErrorMessage/ErrorMessageWithStackTrace.tsx`** — when the 
only detail available is the subtitle (no stack trace, link, or explicit 
`descriptionDetails`), surface it inside the collapsible "See more" section 
instead of inline. This guarantees an expand affordance rather than a flat, 
unexpandable card even when there is no stack trace. Note this path is shared 
by all `ErrorMessageWithStackTrace` consumers, not just dashboard charts.
   
   ### TESTING INSTRUCTIONS
   
   - Added a regression guard in `Chart.test.tsx`: the dashboard chart wrapper 
forwards `chartStackTrace` to `ChartContainer`.
   - Added a regression guard in `ChartErrorMessage.test.tsx`: an error with no 
stack trace still exposes a "See more" toggle.
   - Manual: open a dashboard containing a chart that errors (e.g. renders in 
Explore but fails in-dashboard) and confirm the error card now expands via "See 
more" and shows the detail/stack trace, matching Explore.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue
   - [x] Required feature flags: n/a
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
   - [ ] Migration is atomic, supports rollback & is backwards-compatible
   - [ ] Confirm DB migration upgrade and downgrade tested
   - [ ] Runtime checks for object existence
   - [ ] Introduces new feature or API
   - [x] Removes existing feature or API
   


-- 
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]

Reply via email to