Skip to content

Conversation

@KristjanESPERANTO
Copy link
Contributor

@KristjanESPERANTO KristjanESPERANTO commented Dec 26, 2025

This PR includes several improvements to code quality, accessibility, and documentation:

Landing Page Enhancements

  • Hero screencast: Added an screencast GIF to the landing page (and README)
  • Improved layout: Implemented two-column header layout with hero image, responsive design that stacks on mobile
  • Links: Moved links (npm, GitHub etc) from footer to header. They were too far out of focus in the footer.

Result: https://kristjanesperanto.github.io/leaflet.fullscreen/

Current version for comparison: https://brunob.github.io/leaflet.fullscreen/

Accessibility

  • ARIA support: Added aria-pressed attribute to fullscreen button to indicate active state for screen readers

Demo Improvements

  • Better dark mode: Replaced CARTO dark tiles with CSS filter approach (invert + hue-rotate) on standard OSM tiles
    • Avoids unclear licensing issues with third-party tile providers
    • Improves performance by loading tiles only once
    • Simpler implementation with pure CSS

Code Quality

Dependencies

  • Updated all devDependencies to latest versions

@brunob
Copy link
Owner

brunob commented Jan 5, 2026

Again, thx for that ! There is only a point that i would like to discuss : the hero screencast is not a good idea imho :

  • it makes people load almost 1M of data on the home page which is not insignificant
  • the content of the screencast doesn't provide any useful info to people, i think that someone searching for fullscreen plugin knows what this script will do :)

Without this, i'm ready to merge this one, and push a release to promote #244

PS : i've seen that e have a problem on demo page with small screen under 460px width, the main title s cropped and generate a horizontal scroll, this should be fixed by simple change the title to "Leaflet Control FullScreen". Any thought bout this ?

The toggleFullScreen() and toggleFullscreen() methods now return
Promise<void> instead of void to match the async implementation
introduced in the recent refactoring.
The fullscreenchange event only fires on document, not on individual
elements. Removed unnecessary event listeners on the container element
in both _createButton and onRemove methods.
Use flexbox layout to ensure the footer always stays at the bottom
of the viewport on large monitors. The main content area now expands
to fill available space, pushing the footer down.
Improves screen reader support by adding aria-pressed attribute that
indicates whether fullscreen mode is currently active or not. The
attribute toggles between "true" and "false" in _toggleState().
- Remove CARTO dark tiles due to unclear licensing
- Use CSS filter (invert + hue-rotate) on standard OSM tiles
- Improve performance by loading tiles only once
- Simplify dark mode implementation in demo
- Fix attribution background color in dark mode
@KristjanESPERANTO
Copy link
Contributor Author

the content of the screencast doesn't provide any useful info

Yes, I see that the screencast was too much of a plaything. I have removed it.

this should be fixed by simple change the title to "Leaflet Control FullScreen"

Done in the landing page. Should we do it also in the README for consitancy?

@brunob
Copy link
Owner

brunob commented Jan 7, 2026

Done in the landing page. Should we do it also in the README for consitancy?

Why not :)

@KristjanESPERANTO
Copy link
Contributor Author

Okay, done 🙂

Everywhere I removed Leaflet.Control.FullScreen with Leaflet Control FullScreen.

@brunob brunob merged commit 87642c2 into brunob:master Jan 7, 2026
2 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the refactor branch January 8, 2026 19:34
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