Skip to content

docs: constrain the forms guide video embed on mobile - #2467

Merged
brandonroberts merged 2 commits into
betafrom
claude/mobile-video-embed-maxwidth-egplbo
Aug 7, 2026
Merged

docs: constrain the forms guide video embed on mobile#2467
brandonroberts merged 2 commits into
betafrom
claude/mobile-video-embed-maxwidth-egplbo

Conversation

@brandonroberts

Copy link
Copy Markdown
Member

PR Checklist

The video embed on /docs/guides/forms overflows the viewport on mobile. Two causes, both leftovers from the Docusaurus → Analog docs migration (#2453):

  1. The markup uses JSX className="video-container", which browsers ignore as an unknown attribute — no class is ever applied.
  2. apps/docs-analog/src/styles.css has no .video-container / .video-responsive-wrapper rules. Those only exist in the legacy apps/docs-app/src/css/custom.css.

With no class and no styles, the iframe falls back to its literal width="560" and overflows narrow viewports.

No linked issue — reported directly.

Affected scope

  • Primary scope: docs-analog (docs site, no npm package affected)
  • Secondary scopes: none

Recommended merge strategy for maintainer [optional]

  • Squash merge
  • Rebase merge
  • Other

What is the new behavior?

  • classNameclass in guides/forms.md across all four locales (en, es, pt-br, zh-hans).
  • Added responsive video styles to docs-analog/src/styles.css, using aspect-ratio: 16 / 9 rather than porting the old padding-bottom hack.
  • Added a per-locale title and allowfullscreen to the iframe (separate commit).
viewport before after
390px iframe 560px, scrollWidth 584 → horizontal overflow iframe 342px, scrollWidth 390 → no overflow
1440px iframe 750px, capped at the intended max-width

Note: the embed URL carries controls=0, so YouTube hides its player chrome including the fullscreen button. allowfullscreen enables fullscreen via the f shortcut and double-click, but there is no visible button to tap. Dropping controls=0 would be a follow-up content decision, left as-is here.

Test plan

  • nx format:check
  • pnpm build
  • pnpm test
  • Manual verification

Build and test were not run — this change is CSS and markdown content only, with no TypeScript touched.

Manual verification against nx serve docs-analog, measured with Playwright at a 390×844 viewport. All four locale routes return 200, render the localized title, resolve iframe.allowFullscreen to true, and lay out at 342px with no horizontal overflow.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The legacy apps/docs-app has no copy of this embed, so the change is confined to docs-analog, which is what serves analogjs.org per zerops.yaml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FyexV8dwYXFW8fPLBX1kZx


Generated by Claude Code

claude added 2 commits August 7, 2026 03:25
The video embed markup carried over from the Docusaurus site used JSX
`className`, which browsers ignore, and docs-analog had no matching
styles. The iframe fell back to its literal width="560", overflowing
narrow viewports.

Switch to `class` in all four locales and add responsive video styles
so the embed fills the content width up to 750px at a 16:9 ratio.
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit dbd04bf
🔍 Latest deploy log https://app.netlify.com/projects/analog-docs/deploys/6a75d395747828000897f36d
😎 Deploy Preview https://deploy-preview-2467--analog-docs.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.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit dbd04bf
🔍 Latest deploy log https://app.netlify.com/projects/analog-blog/deploys/6a75d39576d96d00089675d3
😎 Deploy Preview https://deploy-preview-2467--analog-blog.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.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit dbd04bf
🔍 Latest deploy log https://app.netlify.com/projects/analog-app/deploys/6a75d395fcbc170008e801ab
😎 Deploy Preview https://deploy-preview-2467--analog-app.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.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 59d00e0f-5f0c-4fc3-836f-2cd9bf259770

📥 Commits

Reviewing files that changed from the base of the PR and between 20ed5d4 and dbd04bf.

📒 Files selected for processing (5)
  • apps/docs-analog/src/content/es/guides/forms.md
  • apps/docs-analog/src/content/guides/forms.md
  • apps/docs-analog/src/content/pt-br/guides/forms.md
  • apps/docs-analog/src/content/zh-hans/guides/forms.md
  • apps/docs-analog/src/styles.css

📝 Walkthrough

Walkthrough

The forms guides now use standard HTML attributes for video embeds. Each iframe includes a descriptive title and fullscreen support. The English, Spanish, Portuguese, and Chinese guides retain their existing video sources and dimensions. The documentation stylesheet adds centered video containers, a 750px maximum width, 16:9 aspect-ratio wrappers, and full-size rounded iframes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the responsive video fix, affected locales, validation, and lack of breaking changes.
Title check ✅ Passed The title uses an acceptable unscoped docs prefix and accurately summarizes the mobile video embed fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the scope:docs Documentation changes label Aug 7, 2026
@nx-cloud

nx-cloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit dbd04bf

Command Status Duration Result
nx run-many --target build --all --parallel=1 -... ❌ Failed 1m 50s View ↗
nx run-many --target lint --all --exclude=conte... ✅ Succeeded 1m 41s View ↗
nx-cloud record -- pnpm prettier:check ✅ Succeeded 7s View ↗

💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.


☁️ Nx Cloud last updated this comment at 2026-08-07 12:51:12 UTC

@brandonroberts
brandonroberts merged commit d5be31b into beta Aug 7, 2026
19 of 21 checks passed
@brandonroberts
brandonroberts deleted the claude/mobile-video-embed-maxwidth-egplbo branch August 7, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:docs Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants