fix(ui): make the Pro Features dialog fit narrow screens
Summary
- The Pro Features dialog now fits narrow viewports. It forced a 744px width, so on a phone it ran off both edges of the screen and the Cancel and Get Paradev Pro buttons were cut off.
- Adds a Storybook story for the dialog.
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 md breakpoint (768px):
- The feature list becomes a horizontally scrolling tab row under the title. A tapped tab scrolls into view.
- The preview takes the full width below the tabs. Demo cards shrink to fit and the phone mock is centred.
- The dialog is capped at the viewport minus a 1rem margin on each side. The footer stays pinned and the body scrolls when the dialog is taller than the screen.
At md and 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.ts defines process.env. The dialog imports @superset/shared/constants, which reads process.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:
- No horizontal overflow of the document or the dialog
- Both footer buttons are inside the dialog at every width
- Demo card stays inside the preview (the phone mock is cropped by design)
- 1280px layout looks the same as before
Not checked: the real /integrations page 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/ui
Summary 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 md breakpoint 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. At md and 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 defines process.env in the Storybook config so the dialog's import of @superset/shared/constants renders instead of crashing.
Summary by CodeRabbit
- Bug Fixes
- The Pro Features dialog and its previews now adapt to smaller screens, stay within the viewport, and allow content to scroll.
- Feature navigation scrolls horizontally on smaller screens and switches to a vertical list on larger screens.