Repository navigation
fix(ui): make the Pro Features dialog fit narrow screens - #10181
Conversation
The dialog forced a 744px width, so it ran off both edges on a phone and in a desktop window near the 540px minimum. Below the md breakpoint the feature list is now a scrolling tab row above the preview, the dialog is capped to the viewport, and the footer stays pinned while the body scrolls. Adds a Storybook story for the dialog. Storybook defines process.env so components that read @superset/shared constants render.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review verdict: minor issues. The fix works: in Storybook at 320–768px the dialog and both footer buttons stay on screen (before: the dialog spanned x = −184…560 at 375px). The 1280px layout is unchanged. CI is green at Findings:
The web Full report with screenshots and measurements: https://app.superset.sh/page/pr-10181-review-pro-features-dialog-on-narrow-scre-6xw7wa |
Summary
Why / Context
The dialog is shared by the web integrations page paywall and the desktop paywall. Web is reachable on a phone, and the desktop window can shrink to 540px, so both overflowed.
How It Works
Below the
mdbreakpoint (768px):At
mdand above the layout is the same as before. The preview column flexes instead of using a fixed 495px, so the row fits in the 768px to 775px range where the dialog is narrower than 744px..storybook/main.tsdefinesprocess.env. The dialog imports@superset/shared/constants, which readsprocess.env, and the story crashed with "process is not defined" without it.Manual QA
Checked in Storybook through a browser pane with device metrics emulation, on the Remote Access and Mobile App stories, at 320, 375, 390, 600, 767 and 768px:
Not checked: the real
/integrationspage and the desktop paywall. Both render the same shared component with no layout props.Testing
bunx biome check packages/ui/src/components/ProFeaturesDialog packages/ui/.storybookbunx tsc --noEmit -p packages/uiSummary by cubic
Fixes the Pro Features dialog overflowing on narrow screens. It forced a 744px width, so on phones and desktop windows near the 540px minimum it ran off both edges and the Cancel and Get Paradev Pro buttons were cut off.
Below the
mdbreakpoint the feature list becomes a horizontally scrolling tab row, the preview fills the width below it, the dialog is capped at the viewport minus a 1rem margin on each side, and the footer stays pinned while the body scrolls. Atmdand above the layout is unchanged; the preview column now flexes instead of using a fixed 495px width so the 768–775px range fits. Adds a Storybook story for the dialog and definesprocess.envin the Storybook config so the dialog's import of@superset/shared/constantsrenders instead of crashing.Written for commit 995f04e. Summary will update on new commits.
Summary by CodeRabbit