Skip to content

fix(a11y): cap ZoomSvg container height to viewport#3428

Open
bilal-karim wants to merge 1 commit into
mainfrom
a11y/zoomsvg-container-height
Open

fix(a11y): cap ZoomSvg container height to viewport#3428
bilal-karim wants to merge 1 commit into
mainfrom
a11y/zoomsvg-container-height

Conversation

@bilal-karim
Copy link
Copy Markdown
Member

@bilal-karim bilal-karim commented May 21, 2026

Summary

  • Caps the ZoomSvg container height to the lesser of containerHeight (default 600px) or 100dvh - 8rem using CSS min()
  • On a 320×500 landscape phone, the container shrinks from 600px to ~370px, fitting within the viewport instead of forcing unnecessary vertical scroll
  • On desktop (height > 728px), behavior is unchanged
  • This is an optional UX enhancement — not a strict WCAG 1.4.10 defect (vertical scrolling is allowed), but improves the experience on narrow viewports

Test plan

  • Open a workflow with a family tree (Relationships tab) on desktop — confirm no visual change
  • DevTools → device mode → 320×500 landscape — confirm the ZoomSvg container fits within the viewport
  • Verify the Center button and pan/zoom controls remain functional at both sizes

🤖 Generated with Claude Code

Uses CSS min() to limit the container to the lesser of containerHeight
(default 600px) or viewport height minus 8rem. On narrow landscape
viewports (e.g. 320x500) the container now fits within the screen
instead of overflowing. Desktop behavior is unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bilal-karim bilal-karim requested a review from a team as a code owner May 21, 2026 20:00
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment May 21, 2026 8:01pm

Request Review

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd Bot commented May 21, 2026

Warnings
⚠️

📊 Strict Mode: 4 errors in 1 file (0.4% of 914 total)

src/lib/holocene/zoom-svg.svelte (4)
  • L15:6: Variable 'svg' implicitly has type 'any' in some locations where its type cannot be determined.
  • L34:17: Variable 'svg' implicitly has an 'any' type.
  • L67:59: Variable 'svg' implicitly has an 'any' type.
  • L68:60: Variable 'svg' implicitly has an 'any' type.

Generated by 🚫 dangerJS against 265d997

@bilal-karim bilal-karim changed the title fix: cap ZoomSvg container height to viewport fix(a11y): cap ZoomSvg container height to viewport May 22, 2026
@bilal-karim bilal-karim marked this pull request as ready for review May 22, 2026 13:22
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