Skip to content

Conversation

@melitele
Copy link
Contributor

@melitele melitele commented Nov 3, 2025

This PR adds support for global state visibility expressions.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (70ada51) to head (a50eb5c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6659      +/-   ##
==========================================
- Coverage   92.41%   92.14%   -0.27%     
==========================================
  Files         288      288              
  Lines       23813    23826      +13     
  Branches     5053     5054       +1     
==========================================
- Hits        22006    21955      -51     
- Misses       1807     1871      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@socket-security
Copy link

socket-security bot commented Dec 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​maplibre/​maplibre-gl-style-spec@​24.3.1 ⏵ 24.4.093 -610099 +295 +470

View full report

@melitele melitele marked this pull request as ready for review December 13, 2025 05:56
@melitele melitele force-pushed the global-state-visiblity branch 2 times, most recently from 5e3a15b to ab45f99 Compare December 13, 2025 09:36
@melitele
Copy link
Contributor Author

@HarelM ready for review

@HarelM
Copy link
Collaborator

HarelM commented Dec 13, 2025

I've added some minor comments, overall this looks good, thanks for pushing this forward!

dependabot bot and others added 4 commits December 14, 2025 04:42
Bumps [@maplibre/maplibre-gl-style-spec](https://github.com/maplibre/maplibre-style-spec) from 24.3.1 to 24.4.0.
- [Release notes](https://github.com/maplibre/maplibre-style-spec/releases)
- [Changelog](https://github.com/maplibre/maplibre-style-spec/blob/main/CHANGELOG.md)
- [Commits](maplibre/maplibre-style-spec@v24.3.1...v24.4.0)

---
updated-dependencies:
- dependency-name: "@maplibre/maplibre-gl-style-spec"
  dependency-version: 24.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@melitele melitele force-pushed the global-state-visiblity branch from ab45f99 to 086e9a5 Compare December 14, 2025 11:42
@melitele melitele force-pushed the global-state-visiblity branch from 086e9a5 to b38ce26 Compare December 14, 2025 12:13
@HarelM
Copy link
Collaborator

HarelM commented Dec 14, 2025

BTW, I'm planning to try out some CI changes I made so if you need to include a change in maplibre-style-spec do let me know.

@melitele melitele force-pushed the global-state-visiblity branch from b38ce26 to a50eb5c Compare December 14, 2025 21:18
Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

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

THANKS!!

@HarelM HarelM merged commit c8ee0e5 into maplibre:main Dec 15, 2025
26 checks passed
hiddewie added a commit to hiddewie/OpenRailwayMap-vector that referenced this pull request Dec 18, 2025
hiddewie added a commit to hiddewie/OpenRailwayMap-vector that referenced this pull request Dec 18, 2025
hiddewie added a commit to hiddewie/OpenRailwayMap-vector that referenced this pull request Dec 19, 2025
hiddewie added a commit to hiddewie/OpenRailwayMap-vector that referenced this pull request Dec 20, 2025
Usable since Maplibre GL JS 5.15, see
#722 and
maplibre/maplibre-gl-js#6659.

The same structure will be used for #600 to toggle layer visibility.
@melitele melitele deleted the global-state-visiblity branch January 8, 2026 23:39
melitele added a commit to melitele/maplibre-gl-js that referenced this pull request Jan 8, 2026
melitele added a commit to melitele/maplibre-gl-js that referenced this pull request Jan 8, 2026
* chore(deps): bump @maplibre/maplibre-gl-style-spec from 24.3.1 to 24.4.0

Bumps [@maplibre/maplibre-gl-style-spec](https://github.com/maplibre/maplibre-style-spec) from 24.3.1 to 24.4.0.
- [Release notes](https://github.com/maplibre/maplibre-style-spec/releases)
- [Changelog](https://github.com/maplibre/maplibre-style-spec/blob/main/CHANGELOG.md)
- [Commits](maplibre/maplibre-style-spec@v24.3.1...v24.4.0)

---
updated-dependencies:
- dependency-name: "@maplibre/maplibre-gl-style-spec"
  dependency-version: 24.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* increase bundle size to accomodate `@maplibre/maplibre-gl-style-spec` 24.4.0

* fix map center in `within-feature-collection-geojson` test that was causing timeout when length=2 is enforced

* use `isHidden` function instead of checking layer `visibility` property directly

* recalculate `visibility` when relevant global state properties change

maplibre#6495

* increase bundle size

* changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Support global state expression for layer visibility

2 participants