refactor(ui-react): block-main layout and EmptyState splash#6395
Conversation
|
Claude finished @luizhf42's task in 1m 3s —— View job Code Review CompleteReviewed 11 files. 2 inline issues posted (1 high, 1 medium). Both stem from the same root cause:
If you've addressed the feedback and want a new review, tag |
The page `<main>` was a flex column with `overflow-y-auto`. A scrollable flex container drops its `padding-bottom` in Chrome, so page content was clipped flush against the bottom edge with no padding. Rework AppLayout and AdminLayout so `<main>` is a plain block absolutely positioned inside a `relative size-full` wrapper — its own scroll container, which honors `p-8 pb-4`. `<main>` now wraps only the routed `<Outlet>`, with the decorative grid-bg as a sibling, so the element has proper semantics. This also drops the `flex-1 flex flex-col min-h-0` chain pages inherited. WelcomeScreen fills with `min-h-full`; the old `flex-1` is inert under a block `<main>`.
The full-page onboarding / empty / locked / gated splash was duplicated with ad-hoc markup across Web Endpoints, Public Keys, Firewall Rules, Secure Vault (empty + locked), the admin Unauthorized page, and `FeatureGate`: a centered card over a full-bleed decorative background, an optional feature grid, and a call-to-action. Extract it into one `EmptyState` component — props for icon, overline, title, description, `accent`, optional `features` and `footnote`, plus a `children` CTA slot — and migrate every call site to it; `FeatureGate` now delegates to it as well. The component owns the full-bleed background, removing the per-page `min-h-[calc(100vh-3.5rem)]` and negative-margin hacks. This also closes a11y gaps surfaced by the consolidation: a `focus-visible` ring on the CTAs that lacked one, a real heading named via `aria-labelledby`, and the feature list marked up as a `<ul>`. Web Endpoints' lone cyan accent orb is unified to blue to match the others.
b8f114d to
5bc83c6
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 10s —— View job Code Review CompleteReviewed 16 files across code quality, security, testing, language patterns, and architecture — no issues found. The code looks good as-is. If you push additional changes and want a new review, tag |
What
Reworks the console page
<main>into a block scroll container, then extracts the full-page splash screen — duplicated across seven onboarding/empty/locked/gated states — into a single sharedEmptyStatecomponent.Why
Two problems, the first enabling the second:
<main>was a flex column withoverflow-y-auto. A scrollable flex container drops itspadding-bottomin Chrome, so page content was clipped flush against the bottom edge with no padding.min-h-[calc(100vh-3.5rem)]height hack to escape the layout.Changes
<main>is now a plain block, absolutely positioned inside arelative size-fullwrapper — its own scroll container, which honorsp-8 pb-4. It wraps only the routed<Outlet>; the decorative grid-bg moves to a sibling. AppLayout and AdminLayout share the identical structure, dropping theflex-1 flex flex-col min-h-0chain pages used to inherit.accent, optionalfeatures/footnote,childrenCTA slot) that owns the full-bleed background. Web Endpoints, Public Keys, Firewall Rules, Secure Vault (empty + locked), and admin Unauthorized migrate to it;FeatureGatedelegates to it. The per-pagecalc()and negative-margin hacks are gone.focus-visiblering now have one; the splash renders a real<h1>named viaaria-labelledbyand a<ul>feature list.<main>(min-h-full, sinceflex-1is now inert); kept separate as the richer dashboard hero.Testing
EmptyState.test.tsxcovers rendering, accent variants, the feature list, and thearia-labelledbywiring. Manually: open each migrated page in its empty state (clear/lock Secure Vault for both states; view a gated FeatureGate page on a CE build; hit admin Unauthorized as a non-admin). Confirm the centered card, full-bleed background, working CTAs, correct accent, and — the original bug — no bottom clipping. Also load a populated page to confirm normal content still renders correctly under the reworked<main>.