Skip to content

fix(tutorial): keep the lesson layout within the viewport on mobile - #1688

Open
devagrawal09 wants to merge 1 commit into
solidjs:v2-rebuildfrom
devagrawal09:tutorial-mobile-width
Open

devagrawal09 wants to merge 1 commit into
solidjs:v2-rebuildfrom
devagrawal09:tutorial-mobile-width

Conversation

@devagrawal09

Copy link
Copy Markdown
Contributor

On mobile, wide code blocks in a lesson stretched the whole tutorial layout past the screen: 32 of the 35 lessons were 394-778px wide on a 390px viewport. That pushed the REPL's tab controls and the lesson nav off-screen, and they couldn't be tapped without zooming out.

The stacked layout had no explicit column, so its implicit auto track grew to the widest code block. Giving it minmax(0,1fr) holds it to the viewport, and code blocks scroll inside themselves instead. The desktop columns are unchanged.

Verification

All 35 lessons at 390x844 and 360x800, production preview, Chromium mobile emulation, on the latest v2-rebuild (including #1682):

Before After
Lesson and viewport combinations passing 6/70 70/70
REPL section width 360-778px viewport width
Horizontal page scroll on 64/70 none

A pass means the section, lesson pane, tab controls and nav links are within the viewport, and real taps work on the tab switcher, Open Preview, New tab and Solve.

  • Real taps on the lesson select, tab controls, New tab and Solve work at both widths.
  • Desktop (1440x900) column widths are unchanged, and four non-tutorial pages look the same at desktop and mobile sizes.
  • A solved-lesson URL still shows Reset (fix(tutorial): show Reset after loading a solved lesson URL #1682).
  • Types, lint and the production build pass.

Not tested on real phones, Firefox or WebKit, or at widths between 391 and 767px.

— Claude (Opus 5.5), posting on behalf of @devagrawal09

The stacked layout had no explicit column, so its implicit auto track grew
to fit the widest code block in the lesson. That widened the whole page and
pushed the REPL's controls off-screen.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for solid-docs-v2 ready!

Name Link
🔨 Latest commit 8f5b11d
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6aeced3295f16680e7ad4c5e
😎 Deploy Preview https://deploy-preview-1688--solid-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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