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

Export game view #1690

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Export game view #1690

merged 4 commits into from
Dec 20, 2024

Conversation

scytacki
Copy link
Member

@scytacki scytacki commented Dec 17, 2024

This makes isPlugin a serialized field in V3. That is necessary so we can keep track of which WebViews are v2 GameViews and which are v2 WebViews.
The setIsPlugin is marked as withoutUndo so when a plugin is added and it sets up the iframe phone this change of the document state doesn't add an action to the undo stack.

The contextStorage field is added to the DataSet conversion. This was necessary to get a document to load with a plugin that had created a data table. However this document is still broken because it data context collections seem to be reversed and disconnected.

Name handling in GameViews adds more complexity to the already complex name and title handling. GameViews store their name in componentStorage.currentGameName instead of componentStorage.name

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.82%. Comparing base (d705d34) to head (ad52a2d).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
v3/src/components/web-view/web-view-model.ts 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1690      +/-   ##
==========================================
- Coverage   85.89%   85.82%   -0.08%     
==========================================
  Files         607      607              
  Lines       31133    31154      +21     
  Branches     8665     8663       -2     
==========================================
- Hits        26743    26739       -4     
- Misses       4068     4091      +23     
- Partials      322      324       +2     
Flag Coverage Δ
cypress 74.51% <50.00%> (-0.13%) ⬇️
jest 54.05% <91.89%> (+0.04%) ⬆️

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 Dec 17, 2024

codap-v3    Run #5616

Run Properties:  status check passed Passed #5616  •  git commit 35b7376c27: Merge pull request #1690 from concord-consortium/188616810-export-gameview
Project codap-v3
Branch Review main
Run status status check passed Passed #5616
Run duration 06m 01s
Commit git commit 35b7376c27: Merge pull request #1690 from concord-consortium/188616810-export-gameview
Committer Kirk Swenson
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
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 ↗︎

@scytacki scytacki marked this pull request as ready for review December 17, 2024 18:20
@scytacki scytacki requested a review from kswenson December 17, 2024 18:20
@kswenson kswenson added the v3 CODAP v3 label Dec 17, 2024
Copy link
Member

@kswenson kswenson 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 -- I added a commit which fixed the game view name issue you pointed out.

Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

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

Two thoughts occurred to me this morning:

  1. Instead of a Boolean isPlugin property, it should be a subType property with value plugin. That way when DG.GuideView is implemented, it can be subType guide. I would leave it undefined for standard web views.
  2. The importer for DG.GameView should set the subType property to plugin.

Base automatically changed from 188616792-export-webview to main December 18, 2024 14:21
@kswenson
Copy link
Member

Two thoughts occurred to me this morning:

  1. Instead of a Boolean isPlugin property, it should be a subType property with value plugin. That way when DG.GuideView is implemented, it can be subType guide. I would leave it undefined for standard web views.
  2. The importer for DG.GameView should set the subType property to plugin.

After consultation with @scytacki, I added a commit which implemented #1 above. Turns out #2 was already implemented in what @scytacki had done.

Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

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

After consultation with @scytacki, I addressed my concerns in a follow-up commit.

Copy link
Member Author

@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.

I can't officially approve but it looks good to me.

My only comment is about allowing the v3 WebView to be turned back into a v2 WebView via the subType setter.

v3/src/components/web-view/web-view-model.ts Outdated Show resolved Hide resolved
@kswenson
Copy link
Member

I can't officially approve but it looks good to me.

My only comment is about allowing the v3 WebView to be turned back into a v2 WebView via the subType setter.

Good catch -- I meant to do that. I'll update before merging.

scytacki and others added 4 commits December 20, 2024 11:16
This makes `isPlugin` a serialized field in V3. That is necessary so we can keep track of which WebViews are v2 GameViews and which are v2 WebViews.
The `setIsPlugin` is marked as `withoutUndo` so when a plugin is added and it sets up the iframe phone this change of the document state doesn't add an action to the undo stack.

The `contextStorage` field is added to the DataSet conversion. This was necessary to get a document to load with a plugin that had created a data table. However this document is still broken because it data context collections seem to be reversed and disconnected.

Name handling in GameViews adds more complexity to the already complex name and title handling. GameViews store their name in componentStorage.currentGameName instead of componentStorage.gameName
@kswenson kswenson force-pushed the 188616810-export-gameview branch from a2c0015 to ad52a2d Compare December 20, 2024 19:52
@kswenson kswenson merged commit 35b7376 into main Dec 20, 2024
20 of 21 checks passed
@kswenson kswenson deleted the 188616810-export-gameview branch December 20, 2024 21:43
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.

2 participants