Skip to content

fix: hide zoom +/- with the fullscreen button via hide_self - #115

Merged
Zeroto521 merged 7 commits into
mainfrom
fullscreen
Aug 5, 2026
Merged

fix: hide zoom +/- with the fullscreen button via hide_self#115
Zeroto521 merged 7 commits into
mainfrom
fullscreen

Conversation

@Zeroto521

Copy link
Copy Markdown
Owner

No description provided.

hide_self only toggled the fullscreen button itself; zoom in/out
remained visible during fullscreen regardless of hide_self/hide_others.
Zoom buttons belong to the fullscreen control itself, so they are now
always hidden while fullscreen. The hidden class also needs !important
to win over inline display styles set by third-party Leaflet plugins.
- browser: zoom +/- hidden in fullscreen, restored after exit
- browser: hide_others overrides inline display set by third-party plugins
- rendering: sync classList.toggle assertions with CONST.CLASSES.HIDDEN
hide_self now controls the zoom +/- buttons together with the fullscreen
button, so hide_self=false keeps them visible in fullscreen.
Previously zoom +/- were always hidden in fullscreen. Now they follow
hide_self together with the fullscreen button, so hide_self=false keeps
the whole control visible. Tests updated to cover both hide_self states.
Copilot AI lite review requested due to automatic review settings August 5, 2026 03:56
@Zeroto521
Zeroto521 enabled auto-merge (squash) August 5, 2026 03:56
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.51%. Comparing base (2f937ca) to head (1f94a4c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #115   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files          11       11           
  Lines         201      201           
  Branches       15       15           
=======================================
  Hits          196      196           
  Misses          5        5           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zeroto521
Zeroto521 merged commit 30efc20 into main Aug 5, 2026
14 checks passed
@Zeroto521
Zeroto521 deleted the fullscreen branch August 5, 2026 03:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates FullscreenControl so that when hide_self is enabled, the zoom +/- buttons are hidden together with the fullscreen toggle while the map is in fullscreen, and strengthens the hiding behavior to override inline display styles.

Changes:

  • Hide zoom +/- buttons along with the fullscreen toggle when hide_self=true and drive hiding via the shared hidden-class constant.
  • Update fullscreen state tracking and UI updates to be event-driven (avoid double UI updates in native fullscreen promise callbacks).
  • Make the hidden class use display: none !important and add rendering/browser tests plus a changelog entry.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
foliplus/js/FullscreenControl.js Adds shared HIDDEN class constant, hides zoom +/- with hide_self, and refactors fullscreen state tracking.
foliplus/css/FullscreenControl.css Ensures hidden controls stay hidden even when sibling controls have inline display styles.
test/test_FullscreenControl.py Updates rendering assertions and adds browser tests validating zoom visibility behavior in fullscreen.
CHANGELOG.md Documents the updated hide_self behavior for FullscreenControl.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread foliplus/js/FullscreenControl.js
Comment thread test/test_FullscreenControl.py
Zeroto521 added a commit that referenced this pull request Aug 5, 2026
* fix: hide zoom +/- buttons when entering fullscreen (#114)

hide_self only toggled the fullscreen button itself; zoom in/out
remained visible during fullscreen regardless of hide_self/hide_others.
Zoom buttons belong to the fullscreen control itself, so they are now
always hidden while fullscreen. The hidden class also needs !important
to win over inline display styles set by third-party Leaflet plugins.

* test: cover fullscreen zoom hiding and inline-display override (#114)

- browser: zoom +/- hidden in fullscreen, restored after exit
- browser: hide_others overrides inline display set by third-party plugins
- rendering: sync classList.toggle assertions with CONST.CLASSES.HIDDEN

* docs: add FullscreenControl zoom hiding fix to changelog (#114)

* docs: correct FullscreenControl zoom hiding changelog entry (#115)

hide_self now controls the zoom +/- buttons together with the fullscreen
button, so hide_self=false keeps them visible in fullscreen.

* fix: hide zoom +/- with the fullscreen button via hide_self (#115)

Previously zoom +/- were always hidden in fullscreen. Now they follow
hide_self together with the fullscreen button, so hide_self=false keeps
the whole control visible. Tests updated to cover both hide_self states.

* fix: prevent duplicate fullscreen hint on toggle

* fix: use public map.isFullscreen instead of private _isFullscreen

* fix: allow exiting pseudo-fullscreen mode

toggleFullscreen decided to exit based solely on document.fullscreenElement,
which is always null in pseudo-fullscreen mode (native Fullscreen API
unavailable). The leaflet-pseudo-fullscreen class could never be removed.
The exit branch now also checks the internal map.isFullscreen flag.

* test: cover pseudo-fullscreen enter/exit and use real clicks

- new browser test: pseudo-fullscreen (native API disabled) can be entered
  and exited — regression guard for the exit-condition fix
- _enter_fullscreen now uses page.click() (real input event) because the
  Fullscreen API requires user activation; synthesized clicks may reject
- _exit_fullscreen keeps a JS click since the toggle is hidden (display:none)
  while fullscreen and Playwright cannot target it

* Update CHANGELOG.md
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