GitHub user dosubot[bot] added a comment to the discussion: UI break when using chart description option in superset5.0
<!-- Answer --> This is a confirmed bug in Superset 5.0+ caused by a timing issue with how the chart description height is measured. The root cause is that `useEffect` is used to measure the description container's height, but it runs *after* the browser has already painted — so when you hide the description, the chart doesn't recalculate its dimensions correctly [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx#L193-L201). **PR [#38307](https://github.com/apache/superset/pull/38307)** addresses this by replacing `useEffect` with `useLayoutEffect`, which measures synchronously before the browser paints, ensuring the chart gets the correct height on every toggle [[2]](https://github.com/apache/superset/pull/38307). You may want to check whether your build includes that fix, or cherry-pick it if it hasn't landed in your version yet. As a workaround until you can apply the fix, avoiding the show/hide toggle (or refreshing the dashboard after hiding the description) should restore proper sizing. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=eaf8c31c-9652-4e3c-bde5-4be224d7c6c3) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) GitHub link: https://github.com/apache/superset/discussions/40491#discussioncomment-17087168 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
