CartoDB / carto-react

CARTO for React packages
https://docs.carto.com/react/
MIT License
38 stars 16 forks source link

Fix LegendWidget update logic for multiple legends case #889

Closed juandjara closed 3 months ago

juandjara commented 3 months ago

Description

Shortcut: https://app.shortcut.com/geographica/story/425245

Fix react-redux action updateLayer to account for the case of multiple legend objects per layer, keeping array object reference.

Type of change

Acceptance

Please describe how to validate the feature or fix

  1. Render a in which one layer has multiple legends
  2. Collapse or hide one of those legends
  3. Uncollapse or show the same legend
  4. It should be back to its original state

This feature is not used in cloud-native but it is used in various PS projects such as Groupauto, DHL, and more

Basic checklist

github-actions[bot] commented 3 months ago

Pull Request Test Coverage Report for Build 10006952761

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/react-redux/src/slices/cartoSlice.js 2 3 66.67%
<!-- Total: 2 3 66.67% -->
Totals Coverage Status
Change from base Build 9805322941: -0.004%
Covered Lines: 2816
Relevant Lines: 3642

💛 - Coveralls
github-actions[bot] commented 3 months ago

Visit the preview URL for this PR (updated for commit 8bc630a):

https://cartodb-fb-storybook-react-dev--pr889-fix-legend-widge-8371ldbn.web.app

(expires Fri, 26 Jul 2024 11:04:45 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c