concord-consortium / codap

CODAP (Common Online Data Analysis Platform)
MIT License
94 stars 38 forks source link

fix: undo multiple y [PT-187833677] #1380

Closed kswenson closed 1 month ago

kswenson commented 1 month ago

[PT-187833677]

The crash occurred on undoing the drop of a second (or more) Y attribute because GraphDataConfigurationModel.filterCase can get called for the "missing" attribute and crashed when it encountered an undefined attribute description. Fixing that was straightforward, but revealed an underlying issue that the undo/redo of adding an additional y attribute still didn't work. The fix there was to add a MobX reaction to synchronize the filteredCases array with the attribute configuration. This meant that some bespoke code to manage that synchronization in response to particular events could be eliminated. The new reaction also relies on making filteredCases a MobX shallow-observable array so that additions/removals to/from it can trigger the necessary reaction(s).

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.72%. Comparing base (f5d06d0) to head (8133866). Report is 1 commits behind head on main.

Files Patch % Lines
...nts/graph/models/graph-data-configuration-model.ts 94.73% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1380 +/- ## ========================================== + Coverage 85.63% 85.72% +0.09% ========================================== Files 522 522 Lines 25582 25584 +2 Branches 6534 6967 +433 ========================================== + Hits 21906 21933 +27 + Misses 3522 3376 -146 - Partials 154 275 +121 ``` | [Flag](https://app.codecov.io/gh/concord-consortium/codap/pull/1380/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | Coverage Δ | | |---|---|---| | [cypress](https://app.codecov.io/gh/concord-consortium/codap/pull/1380/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `72.57% <70.00%> (+0.12%)` | :arrow_up: | | [jest](https://app.codecov.io/gh/concord-consortium/codap/pull/1380/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium) | `53.56% <95.45%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=concord-consortium#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cypress[bot] commented 1 month ago



Test summary

200 0 29 0Flakiness 1


Run details

Project codap-v3
Status Passed
Commit fbdd6f9263
Started Jul 30, 2024 12:26 AM
Ended Jul 30, 2024 12:35 AM
Duration 08:57 💡
OS Linux Ubuntu -
Browser Chrome 126

View run in Cypress Cloud ➡️


Flakiness

cypress/e2e/toolbar.spec.ts Flakiness
1 codap toolbar > will open a slider

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud