Skip to content

feat(portal): implement dynamic adaptive content zoom, stage width fitting, and Gate 16 audit - #7

Merged
vadde merged 8 commits into
mainfrom
feat/dynamic-adaptive-content-zoom-fit
Nov 3, 2026
Merged

vadde merged 8 commits into
mainfrom
feat/dynamic-adaptive-content-zoom-fit

Conversation

@vadde

@vadde vadde commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

🎯 Summary

This PR delivers the Dynamic Adaptive Content Zoom & Stage Width Fit Engine for the DSA Living Documentation portal:

  1. Screen-Width Bounded Zoom & Dynamic Fit Engine:
    • Dynamically calculates the available reading width and derives $Z_{\text{fit}} = W_{\text{avail}} / W_{\text{base}}$ ($100%$ on mobile, up to $175%$ on MacBook Pro, up to $200%$ on external 4K monitors).
    • Generates an adaptive ladder of 2 to 4 clean, punchy steps tailored to the active screen (e.g. 25% increments: $100% \to 125% \to 150% \to 175%$ on MacBook Pro; $100% \to 125% \to 150% \to 175% \to 200%$ on 4K display; 2 steps on compact laptops).
    • Dynamically adapts when moving between laptop displays and external monitors via debounced resize observers and sidebar toggle event synchronization.
  2. Top Navigation Floating Bar Integration:
    • Liquid-glass segmented stepper pill in the top header controls cluster (#hud-zoom-stepper) featuring −, current % badge (click to reset to 100%), +, and one-click ⤢ Fit.
    • Scaled exclusively to .content-area / .stage-wrapper while the top HUD, navigation sidebar, and search/theater modals remain crisp and unaffected at 100% native scale.
  3. Streamlined 38px Icon Squircle & Maximum Real Estate Recovery:
    • Stripped textual label (<span>Navigation</span>) from #floating-sidebar-toggle, converting it into an ultra-clean 38px × 38px cosmic glass squircle matching the top dock toggle.
    • Reduced collapsed left padding from 156px down to clamp(54px, 4vw, 72px), immediately reclaiming ~98px of horizontal width for the reading stage.
  4. Mobile & Tablet Safeguards:
    • Automatically hides or locks zoom to 100% on viewports $\le 768\text{px}$, eliminating accidental horizontal scrolling and preserving responsive layout integrity.
  5. Acoustic Haptics & Ergonomic Shortcuts:
    • Integrated with HapticAudio.tap() and HapticAudio.expand() on all zoom interactions.
    • Added keyboard shortcuts (Alt+= to zoom in, Alt+- to zoom out, Alt+0 to reset, Alt+F to fit).
    • State persisted in localStorage (dsa_content_zoom, dsa_content_fit).
  6. Automated Gate 16 Headless Audit:
    • Implemented scripts/audit_dynamic_zoom_engine.py asserting stepper controls, CSS design tokens, clearance gutters, and multi-viewport dynamic step calculations.
    • Integrated into scripts/test-docs.sh (16-Gate Suite), Makefile (make test-zoom), and .github/workflows/ci.yml.

@vadde
vadde merged commit 4e79b56 into main Nov 3, 2026
10 checks passed
@vadde
vadde deleted the feat/dynamic-adaptive-content-zoom-fit branch November 3, 2026 17:28
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