Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Conversation

kswenson
Copy link
Member

@kswenson kswenson commented Jul 27, 2024

[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).

Copy link

codecov bot commented Jul 27, 2024

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 ⚠️
Additional details and impacted files
@@            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 Coverage Δ
cypress 72.57% <70.00%> (+0.12%) ⬆️
jest 53.56% <95.45%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

cypress bot commented Jul 27, 2024



Test summary

200 0 29 0Flakiness 1


Run details

Project codap-v3
Status Passed
Commit fbdd6f9
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

@kswenson kswenson force-pushed the 187833677-fix-undo-multiple-y branch from 3085861 to 95f3251 Compare July 27, 2024 13:39
@kswenson kswenson force-pushed the 187833677-fix-undo-multiple-y branch from 95f3251 to 916463a Compare July 27, 2024 13:46
@kswenson kswenson marked this pull request as ready for review July 27, 2024 13:58
@kswenson kswenson requested a review from bfinzer July 27, 2024 13:58
@kswenson kswenson added the v3 CODAP v3 label Jul 27, 2024
Copy link
Contributor

@bfinzer bfinzer left a comment

Choose a reason for hiding this comment

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

👍🏻LGTM

@kswenson kswenson changed the title 187833677 fix undo multiple y fix: undo multiple y [PT-187833677] Jul 30, 2024
@kswenson kswenson merged commit fbdd6f9 into main Jul 30, 2024
10 of 11 checks passed
@kswenson kswenson deleted the 187833677-fix-undo-multiple-y branch July 30, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 CODAP v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants