Skip to content

fix(zarr): live colormap/clim for NetCDF/Zarr layers (maplibre-gl-components 0.25.4) - #1054

Merged
giswqs merged 1 commit into
mainfrom
fix/zarr-colormap-live-update
Jul 2, 2026
Merged

fix(zarr): live colormap/clim for NetCDF/Zarr layers (maplibre-gl-components 0.25.4)#1054
giswqs merged 1 commit into
mainfrom
fix/zarr-colormap-live-update

Conversation

@giswqs

@giswqs giswqs commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Bumps maplibre-gl-components to 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 carbonplan ZarrLayer's setColormap()/setClim() on every live layer, keep the per-layer props in sync, and trigger a repaint. It also preserves a valid clim value of 0.

Changes

  • maplibre-gl-components: ^0.25.3^0.25.4 in apps/geolibre-desktop/package.json and packages/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 build and pre-commit pass.

Summary by CodeRabbit

  • Chores
    • Updated a map rendering component to the latest patch release in the desktop app and plugin package.
    • This includes general compatibility and stability improvements from the dependency update.

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.
Copilot AI review requested due to automatic review settings July 2, 2026 16:00
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for geolibre-app ready!

Name Link
🔨 Latest commit 03035ae
🔍 Latest deploy log https://app.netlify.com/projects/geolibre-app/deploys/6a468b37f653ce0008abfabf
😎 Deploy Preview https://deploy-preview-1054--geolibre-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 761f44a3-7a18-4800-9fb8-e655253f8407

📥 Commits

Reviewing files that changed from the base of the PR and between 71258bd and 03035ae.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • apps/geolibre-desktop/package.json
  • packages/plugins/package.json

📝 Walkthrough

Walkthrough

This change updates the maplibre-gl-components dependency version constraint from ^0.25.3 to ^0.25.4 in two package.json files: apps/geolibre-desktop/package.json and packages/plugins/package.json. No other changes are included.

Changes

Dependency Bump

Layer / File(s) Summary
Bump maplibre-gl-components version
apps/geolibre-desktop/package.json, packages/plugins/package.json
Updated the maplibre-gl-components dependency version range from ^0.25.3 to ^0.25.4 in both files.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • opengeos/GeoLibre#206: Both PRs modify the maplibre-gl-components version in the same two package.json files.
  • opengeos/GeoLibre#418: Both PRs bump the same maplibre-gl-components dependency in the same files.
  • opengeos/GeoLibre#429: Both PRs bump maplibre-gl-components in the same files, just different version targets.

Poem

A tiny hop, a version bump so slight,
^0.25.4 now feels just right,
Two files updated, quick and neat,
This bunny's work is now complete,
🐇 Thump-thump — ship it, all is bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Zarr live colormap/clim fix and the dependency bump behind it.
Linked Issues check ✅ Passed The dependency bump to 0.25.4 matches the upstream fix for live colormap/clim updates on Zarr layers.
Out of Scope Changes check ✅ Passed Only the requested dependency version bumps are present; no unrelated changes are indicated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/zarr-colormap-live-update

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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 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-components from ^0.25.3^0.25.4 in the desktop app workspace.
  • Bump maplibre-gl-components from ^0.25.3^0.25.4 in the plugins workspace.
  • Update package-lock.json to reflect the new resolved tarball + integrity for 0.25.4 and 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.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

⚡ Cloudflare Pages preview

Item Value
Preview https://812c6143.geolibre-preview.pages.dev
Demo app https://812c6143.geolibre-preview.pages.dev/demo/
Commit 19ea946

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code review

Reviewed via gh pr diff/gh pr view plus the surrounding source (packages/plugins/src/plugins/maplibre-components.ts) that wraps ZarrLayerControl.

This PR is a pure dependency bump (maplibre-gl-components ^0.25.3^0.25.4) touching only apps/geolibre-desktop/package.json, packages/plugins/package.json, and package-lock.json. No application source changed.

Bugs: None found. The GeoLibre wrapper (maplibre-components.ts) already forwards colormap/clim state to ZarrLayerControl via its options/event handlers — the described live-restyle bug lived entirely upstream, so a version bump alone is a correct fix. Confidence: medium-high (didn't build/run the app to confirm the live restyle, but the code path is consistent with the PR's own testing notes).

Security: No issues. No new transitive dependencies were introduced — the dependencies sub-object for maplibre-gl-components in package-lock.json (peer deps like @developmentseed/deck.gl-raster) is unchanged, only version/resolved/integrity differ. Confidence: high.

Performance: Not applicable — no runtime code changed.

Quality: Lockfile updates are consistent across both node_modules/maplibre-gl-components entries (apps/geolibre-desktop and packages/plugins workspaces), same resolved version and integrity hash in both places — no dedupe/drift issue. Confidence: high.

CLAUDE.md: No violations. This isn't a code change requiring pre-commit run --files <paths> scoping beyond what's already been done per the PR description (build + pre-commit reported passing), and no new external hosts/CSP entries are introduced.

Nothing else to flag — no inline comments posted.

@giswqs
giswqs merged commit 5c3466d into main Jul 2, 2026
21 checks passed
@giswqs
giswqs deleted the fix/zarr-colormap-live-update branch July 2, 2026 16:05
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