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: import of v2 documents with maps #1659

Merged
merged 3 commits into from
Dec 2, 2024
Merged

Conversation

kswenson
Copy link
Member

@kswenson kswenson commented Nov 27, 2024

[PT-188620026]
[PT-188614511]

Fixes several issues discovered while importing a number of legacy v2 documents with maps.

  • improves types for Map component
  • supports legacy Map component format

Note that it doesn't appear that v2 meaningfully supports the legacy v2 Map format, i.e. most of the properties are ignored and the Map reverts to its default behavior. We follow the same approach for v3, whereby the legacy types are acknowledged but not actually migrated.

Also fixes a v3 bug/limitation which prevented the Map component from supporting points and boundaries from the same data set.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.74%. Comparing base (4e85e70) to head (6d86b2d).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
v3/src/components/map/models/map-content-model.ts 75.00% 3 Missing ⚠️
v3/src/v2/codap-v2-types.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1659      +/-   ##
==========================================
+ Coverage   85.69%   85.74%   +0.04%     
==========================================
  Files         604      604              
  Lines       30740    30759      +19     
  Branches     7895     8430     +535     
==========================================
+ Hits        26344    26374      +30     
+ Misses       4241     4064     -177     
- Partials      155      321     +166     
Flag Coverage Δ
cypress 75.25% <65.71%> (-0.01%) ⬇️
jest 53.21% <67.56%> (+0.43%) ⬆️

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 Nov 27, 2024

codap-v3    Run #5426

Run Properties:  status check passed Passed #5426  •  git commit dc907fffed: Merge pull request #1659 from concord-consortium/188620026-fix-v2-map-importer
Project codap-v3
Branch Review main
Run status status check passed Passed #5426
Run duration 05m 55s
Commit git commit dc907fffed: Merge pull request #1659 from concord-consortium/188620026-fix-v2-map-importer
Committer Kirk Swenson
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 36
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 220
View all changes introduced in this branch ↗︎

@kswenson kswenson requested a review from scytacki November 27, 2024 22:06
@kswenson kswenson marked this pull request as ready for review November 27, 2024 22:19
Copy link
Member

@scytacki scytacki left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Would it be worth adding a test of this? I see there is a v2-graph-importer.test.ts which uses a special mammals-graph doc to test it. So perhaps something similar for the map importer would be worthwhile.

@kswenson
Copy link
Member Author

kswenson commented Dec 2, 2024

Looks good to me.

Would it be worth adding a test of this? I see there is a v2-graph-importer.test.ts which uses a special mammals-graph doc to test it. So perhaps something similar for the map importer would be worthwhile.

I added jest tests.

@kswenson kswenson merged commit dc907ff into main Dec 2, 2024
21 checks passed
@kswenson kswenson deleted the 188620026-fix-v2-map-importer branch December 2, 2024 19:47
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
Nice job, especially of making sense of ICodapV2MapLegacyStorage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants