Skip to content

fix(docs): keep the demo's full screen view in the browser window - #1275

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:bug-demo-fullscreen-in-window
Nov 2, 2026
Merged

lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:bug-demo-fullscreen-in-window

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

On macOS, the live demo's Full screen button used the browser Fullscreen API. The demo took over the whole desktop as a new Space, and the docs site navigation was no longer reachable.

The demo now fills the browser window below the docs navbar. The navbar stays on top and usable, and exit puts you back at the same scroll position.

🛠️ Changes made

  • Full screen toggles an in-page expanded state, not the Fullscreen API — the view stays in the browser window.
  • Only an inner panel goes position: fixed; the figure keeps its place in the page — otherwise scroll anchoring jumps the page about 870px on exit.
  • The announcement bar is hidden while expanded — the navbar then always sits at the top, so the panel can start at --ifm-navbar-height with no JS measurement.
  • Page scroll is locked while expanded — a wheel over the demo's bar can no longer move the hidden page.
  • The controls bar stays visible when an expanded demo is narrowed to 768px or less — before, Exit and Close disappeared.
  • The toggle carries aria-expanded.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

N/A

🔗 Related Issues

N/A

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

Anything else we need to know? [optional]

Test plan:

  • pnpm exec jest --selectProjects docs — 34 pass. New tests: Full screen does not call requestFullscreen, Exit returns to the page, and close then reopen starts at page size.
  • Manual, in Chrome on pnpm start in lana-docs: open the demo, then Full screen. The panel fills the window below the navbar and the Docs dropdown opens over it. Exit from scroll positions 0, 300, 600 and 900 returns to the same position. Narrow the window to 700px while expanded: Exit stays visible.

Pre-existing, not fixed here:

  • lana-docs/src/css/custom.css:90 matches the announcement bar by its hashed class (div[class^='announcementBar_']). The stable class is .theme-announcement-bar.
  • After Close demo, keyboard focus falls to <body> instead of the Open demo button.

On macOS, Full screen used the browser Fullscreen API, which took over the whole desktop. The demo now fills the browser window below the navbar, so the site navigation stays usable. The announcement bar is hidden and the page cannot scroll while the demo is expanded.
@lcottercertinia
lcottercertinia merged commit 451b94b into certinia:main Nov 2, 2026
9 checks passed
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.

2 participants