fix(zarr): live colormap/clim for NetCDF/Zarr layers (maplibre-gl-components 0.25.4) - #1054
Conversation
Consumes opengeos/maplibre-gl-components#118: the Zarr layer control now applies colormap and Clim Min/Max changes to the already-added layers (previously only the preview swatch updated, and re-adding to apply them failed for store-backed layers like Cloud-Optimized NetCDF). Changing the colormap or color limits in the Zarr panel now restyles the layer live.
✅ Deploy Preview for geolibre-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change updates the ChangesDependency Bump
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates maplibre-gl-components to v0.25.4 to pick up an upstream fix that enables live restyling (colormap + clim min/max) for Zarr / Cloud-Optimized NetCDF layers after they’ve already been added to the map.
Changes:
- Bump
maplibre-gl-componentsfrom^0.25.3→^0.25.4in the desktop app workspace. - Bump
maplibre-gl-componentsfrom^0.25.3→^0.25.4in the plugins workspace. - Update
package-lock.jsonto reflect the new resolved tarball + integrity for0.25.4and propagate the dependency range updates.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/plugins/package.json |
Updates plugin workspace dependency to maplibre-gl-components@^0.25.4. |
apps/geolibre-desktop/package.json |
Updates desktop app workspace dependency to maplibre-gl-components@^0.25.4. |
package-lock.json |
Locks maplibre-gl-components to 0.25.4 and updates resolved/integrity entries accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
⚡ Cloudflare Pages preview
|
Code reviewReviewed via This PR is a pure dependency bump ( Bugs: None found. The GeoLibre wrapper ( Security: No issues. No new transitive dependencies were introduced — the Performance: Not applicable — no runtime code changed. Quality: Lockfile updates are consistent across both CLAUDE.md: No violations. This isn't a code change requiring Nothing else to flag — no inline comments posted. |
Summary
Bumps
maplibre-gl-componentsto 0.25.4, which fixes live restyling of Zarr / Cloud-Optimized NetCDF layers.Previously, changing the colormap or Clim Min/Max in the Zarr layer panel only updated the internal state and the colormap preview swatch — it never restyled the already-added layers. Only opacity was wired to update live. So the controls appeared to do nothing, and re-adding the layer to apply them fails for store-backed layers (Cloud-Optimized NetCDF, whose kerchunk store the panel's "Add Layer" button does not re-provide).
Upstream fix: opengeos/maplibre-gl-components#118 (released as v0.25.4). It adds
_updateColormap()/_updateClim()(mirroring the existing_updateOpacity()) that call the carbonplanZarrLayer'ssetColormap()/setClim()on every live layer, keep the per-layer props in sync, and trigger a repaint. It also preserves a valid clim value of0.Changes
maplibre-gl-components:^0.25.3→^0.25.4inapps/geolibre-desktop/package.jsonandpackages/plugins/package.json(+package-lock.json).Testing
Verified in the real app with the published 0.25.4: loaded the Cloud-Optimized NetCDF sample, then changed the colormap (blue → magma) and Clim Max in the Zarr panel — the layer now restyles live with no console errors.
npm run buildand pre-commit pass.Summary by CodeRabbit