Skip to content

[Docs] Fix cramped docs layout on mobile and tablet viewports#443

Open
pedromenezes1 wants to merge 8 commits intomainfrom
pmenezes/docs-responsive-improvements
Open

[Docs] Fix cramped docs layout on mobile and tablet viewports#443
pedromenezes1 wants to merge 8 commits intomainfrom
pmenezes/docs-responsive-improvements

Conversation

@pedromenezes1
Copy link
Copy Markdown
Collaborator

@pedromenezes1 pedromenezes1 commented Apr 23, 2026

The docs had a flat 48px padding at every viewport, leaving phones with cramped content, and the desktop sidebar rendered on tablets too, further crowding the layout.

This introduces a tiered horizontal padding scale (px-3md:px-6lg:p-12) and gates the desktop sidebar at lg: (≥1024px), so tablets now use the same mobile drawer UX as phones. Chrome bars (hamburger, sticky doc header, TOC select) share the same tiers. Verified at 475/767/768/1023/1024/1920px.

Resolution Before After
475px Screenshot 2026-04-23 at 04 09 23 Screenshot 2026-04-23 at 04 08 49
768px Screenshot 2026-04-23 at 04 15 47 Screenshot 2026-04-23 at 04 08 54
1023px Screenshot 2026-04-23 at 04 09 49 Screenshot 2026-04-23 at 04 09 02
1024px Screenshot 2026-04-23 at 04 20 38 Screenshot 2026-04-23 at 04 20 29
1920px Screenshot 2026-04-23 at 04 10 00 Screenshot 2026-04-23 at 04 08 39

  • Reviews
  • bonk has reviewed the change
  • automated review not possible because: pure CSS/breakpoint refactor with no logic changes — visual review is the correct check and was done manually
  • Tests
  • Tests included/updated
  • Automated tests not possible - manual testing has been completed as follows:
  • Additional testing not necessary because: visual-only responsive CSS changes verified across 4 viewport widths; no logic, API, or behavioral changes

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@443

commit: c1ec1bb

@pedromenezes1 pedromenezes1 force-pushed the pmenezes/docs-responsive-improvements branch from 3ddff2f to d8dfb5f Compare April 23, 2026 03:11
@pedromenezes1 pedromenezes1 changed the title docs: improve mobile and tablet responsive layout Fix cramped docs layout on mobile and tablet Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Docs Preview

View docs preview

Commit: 0bc0d7a

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Visual Regression Report — 25 changed, 13 unchanged

25 screenshot(s) with visual changes:

Button / Variant: Secondary

314 px (0.31%) changed

Before After Diff
Before After Diff

Button / Variant: Ghost

175 px (0.17%) changed

Before After Diff
Before After Diff

Button / Variant: Destructive

585 px (0.58%) changed

Before After Diff
Before After Diff

Button / Sizes

860 px (0.85%) changed

Before After Diff
Before After Diff

Button / Icon Only

32 px (0.03%) changed

Before After Diff
Before After Diff

Button / Loading State

195 px (0.19%) changed

Before After Diff
Before After Diff

Button / Title

272 px (0.27%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Actions

200 px (0.2%) changed

Before After Diff
Before After Diff

Dialog / Dialog Basic

114 px (0.11%) changed

Before After Diff
Before After Diff

Dialog / Dialog Alert

2,499 px (2.46%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Combobox

244 px (0.24%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Dropdown

236 px (0.23%) changed

Before After Diff
Before After Diff

Dialog (Open)

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Basic

486 px (0.48%) changed

Before After Diff
Before After Diff

Select / Select Sizes

901 px (0.48%) changed

Before After Diff
Before After Diff

Select / Select Without Label

183 px (0.18%) changed

Before After Diff
Before After Diff

Select / Select With Field

795 px (0.67%) changed

Before After Diff
Before After Diff

Select / Select Placeholder

418 px (0.41%) changed

Before After Diff
Before After Diff

Select / Select With Tooltip

294 px (0.29%) changed

Before After Diff
Before After Diff

Select / Select Custom Rendering

611 px (0.6%) changed

Before After Diff
Before After Diff

Select / Select Loading

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Multiple

556 px (0.55%) changed

Before After Diff
Before After Diff

Select / Select Grouped

194 px (0.19%) changed

Before After Diff
Before After Diff

Select / Select Grouped With Disabled

450 px (0.44%) changed

Before After Diff
Before After Diff

Select (Open)

538 px (0%) changed

Before After Diff
Before After Diff
13 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Primary
  • Button / Variant: Outline
  • Button / Variant: Secondary Destructive
  • Button / With Icon
  • Button / Disabled State
  • Button / Link as Button
  • Dialog / Dialog Confirmation
  • Dialog / Dialog With Select
  • Select / Select Complex
  • Select / Select Disabled Options
  • Select / Select Disabled Items
  • Select / Select Long List

Generated by Kumo Visual Regression

@pedromenezes1 pedromenezes1 marked this pull request as ready for review April 23, 2026 03:21
@pedromenezes1 pedromenezes1 marked this pull request as draft April 23, 2026 03:21
@pedromenezes1 pedromenezes1 marked this pull request as ready for review April 23, 2026 03:21
@pedromenezes1 pedromenezes1 self-assigned this Apr 23, 2026
@pedromenezes1 pedromenezes1 changed the title Fix cramped docs layout on mobile and tablet Fix cramped docs layout on mobile and tablet viewports Apr 23, 2026
@pedromenezes1
Copy link
Copy Markdown
Collaborator Author

/bonk

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

I've reviewed all the changes in PR #443. This is a well-executed responsive layout improvement that follows the project's conventions. Here's my analysis:

Summary

The PR improves the documentation site's mobile and tablet experience by:

  1. Tiered padding scale: px-3 (mobile) → md:px-6 (tablet) → lg:p-12 (desktop)
  2. Sidebar breakpoint change: Moved from xl: (≥1280px) to lg: (≥1024px), so tablets now use the mobile drawer UX
  3. Consistent chrome bar alignment: Header, sticky doc header, and TOC select all share the same padding tiers

Code Review

Follows Conventions

Convention Status Notes
Semantic tokens only ✅ Pass All use kumo-* tokens (bg-kumo-canvas, border-kumo-hairline, etc.)
No dark: variants ✅ Pass Relies on CSS light-dark() as expected
Breakpoint consistency ✅ Pass All xl: changed to lg: uniformly
Tiered padding ✅ Pass px-3md:px-6lg:p-12 pattern applied consistently

Files Changed Analysis

File Key Changes Assessment
Header.astro hidden xl:flexhidden lg:flex ✅ Correct - header now shows at 1024px+
SidebarNav.tsx Multiple xl:lg: + padding tiers ✅ Correct - consistent breakpoint shift
StickyDocHeader.tsx px-4 xl:border-rpx-3 md:px-6 lg:px-4 lg:border-r ✅ Correct - follows tiered scale
DocLayout.astro Multiple padding + border breakpoint updates ✅ Correct - comprehensive coverage
MainLayout.astro xl:ml-12lg:ml-12 ✅ Correct - aligns with sidebar
index.astro xl:pr-12lg:pr-12 ✅ Correct - homepage consistency

Visual Regression Results

The visual regression shows 18 changed screenshots with minor pixel changes (0.13% - 1.03% differences). These are expected and correct - they're side effects of the padding changes affecting component demos that render within the docs layout. The changes are primarily in Button, Dialog, and Select components which appear in documentation examples.

Conclusion

This is a well-crafted PR that:

  • Solves the stated problem (cramped mobile/tablet layouts)
  • Follows all project styling conventions
  • Applies changes consistently across all affected files
  • Includes an appropriate changeset

LGTM 👍 - The responsive improvements are solid and the implementation is clean.

github run

@pedromenezes1 pedromenezes1 changed the title Fix cramped docs layout on mobile and tablet viewports [Docs] Fix cramped docs layout on mobile and tablet viewports Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant