PR #10181 review: Pro Features dialog on narrow screens

Summary

The shared ProFeaturesDialog (web /integrations paywall and desktop paywall) used a fixed 744px width, so on phones and on a desktop window near its 540px minimum it ran off both edges and cut off the Cancel and Get Paradev Pro buttons. Below md (768px) the PR turns the sidebar into a horizontal tab row, stacks the preview under it, caps the dialog at the viewport minus 1rem per side, and pins the footer while the body scrolls. At md+ the layout stays the same, with the preview column now flexing instead of a fixed 495px. It also adds a Storybook story and a process.env define so the story renders.

Verdict

Minor issues The fix works: measured at 320–768px the dialog and both footer buttons stay on screen and the wide layout is unchanged. Two small polish items remain (a visible horizontal scrollbar under the tabs on non-overlay-scrollbar browsers, and the description falling below the fold on a typical phone), plus one story nit.

Findings

Minor

packages/ui/src/components/ProFeaturesDialog/components/FeatureSidebar/FeatureSidebar.tsx:41 — tab row shows a full classic scrollbar on desktop browsers.

The tab row is overflow-x-auto with no scrollbar styling. On a non-touch Chromium (Windows/Linux web, or any browser with classic scrollbars) between 540 and 767px wide, a 15px light scrollbar track with arrows appears between the tabs and the preview (measured offsetHeight − clientHeight = 15 at 767px; see the 767px screenshot). The desktop app hides most of this because apps/desktop/src/renderer/globals.css:277 styles all scrollbars thin; the web app has no such rule, and the hide-scrollbar utility exists only in the desktop CSS, so it is not usable from packages/ui.

Fix: add [scrollbar-width:none] [&::-webkit-scrollbar]:hidden (or a thin styled scrollbar) to the tab row, optionally with an edge fade mask so the overflow still reads as scrollable.

Minor

packages/ui/src/components/ProFeaturesDialog/components/FeaturePreview/FeaturePreview.tsx:35 — on a 375×667 phone the feature description is below the fold.

The preview keeps its 346px height at every width. Stacked under the title and tab row, it leaves the feature title visible but the end of the description cut by the pinned footer at 375×667, and at 375×480 the user must scroll the body to read anything but the demo. Scrolling works correctly (footer stays pinned), so this is a layout tradeoff, not a breakage.

Fix (suggestion): use a shorter preview below md, e.g. h-[260px] md:h-[346px], after checking each demo card (Automations, Tasks are the tallest) still fits.

Nit

packages/ui/src/components/ProFeaturesDialog/ProFeaturesDialog.stories.tsx:36-39 — MobileApp story models a state production does not produce.

highlightedFeatureId: PRO_FEATURES[0]?.id ?? "mobile-app" evaluates to "remote-access", which is already the meta default, so the story opens with Mobile App selected but its tab last and off-screen at 375px (measured selectedTabVisible: false). Both callers (Paywall.tsx:128, ProFeaturesPaywall.tsx:58) always open with selected == highlighted, which sorts first. Nothing scrolls the selected tab into view on open, so if a future caller diverges, the selected tab can be hidden.

Fix: set highlightedFeatureId: "mobile-app" in the story (drop the PRO_FEATURES import), or scroll the selected tab into view in an effect on selectedFeatureId instead of only in onClick.

Checked and fine: "process.env": {} in .storybook/main.ts:35 (Storybook 10 builder-vite only defines process.env.NODE_ENV; the story renders and @superset/shared/constants falls back to default URLs); scrollIntoView({block:"nearest"}) does not move the page at md+; tailwind-merge resolves flex over the dialog's base grid. No new strings, so no i18n change. Pre-existing, not introduced: FeatureSidebar.tsx holds two components (FeatureButton), against AGENTS.md rule 3.

Evidence

Surface: Storybook (packages/ui, bun run storybook) driven over CDP in headless Chrome 158 with device-metrics emulation (DPR 2; touch/overlay scrollbars below 600px, classic scrollbars at 600px+). Each screenshot is paired with DOM measurements in measurements.json.

Before vs after at 375px (the bug)

Before at 375px
Before (base 1a097655): dialog spans x = −184…560 on a 375px viewport; Cancel sits at x = −163, off-screen.
After at 375px
After: dialog 16…359, both buttons inside; tabs scroll horizontally, body scrolls under the pinned footer.

Narrow widths (after)

320px
320×640: no document overflow; buttons inside the dialog.
540px
540×700 (desktop window minimum): stacked layout fits.
tap Slack tab
After clicking the off-screen “Slack Integration” tab: it scrolls into view and the preview switches.
Mobile app 375
MobileApp story at 375: phone mock centred and cropped by design; selected tab is off-screen (story nit).
375x480
375×480: dialog capped at viewport − 2rem, footer pinned.
375x480 scrolled
Same, body scrolled to the end: description reachable, footer still pinned.

Breakpoint edge

767px
767×800 with classic scrollbars: the 15px light scrollbar under the tabs (finding 1).
768px
768×800: two-column layout, dialog 736px wide (viewport − 2rem); the flexing preview column fits.

Wide layout unchanged (1280px)

before 1280
Before, Remote Access at 1280×800.
after 1280
After: same 744×526 box. The Get Pro button moved 2px left (848→846): before, the fixed 495px preview overflowed the 742px content box by about 2px and was clipped; now it fits.
before mobile 1280
Before, Mobile App at 1280×800.
after mobile 1280
After: phone mock keeps its right-12 position at md+.

Measurements (after, Remote Access story)

ViewportDialog xDialog w×hButtons insideDoc overflow-xTab scrollbar
320×64016–304288×608yesno0
375×66716–359343×635yesno0
390×84416–374358×645yesno0
540×70016–524508×625yesno0
767×80016–751735×640yesno15px
768×80016–752736×526yesno—
1280×800268–1012744×526yesno—

Surfaces not run

Questions for the author

Test / CI notes