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

Strict null checks -- 90% #8863

Merged
merged 29 commits into from
Jul 17, 2024
Merged

Strict null checks -- 90% #8863

merged 29 commits into from
Jul 17, 2024

Conversation

grahamlangford
Copy link
Collaborator

What does this PR do?

  • Focuses on Page Editor files for strict null checks
  • Raises coverage to 90%
  • 1781/1978 files checked

For more information on our expectations for the PR process, see the
code review principles doc

@grahamlangford grahamlangford self-assigned this Jul 16, 2024
@grahamlangford grahamlangford added this to the 2.0.6 milestone Jul 16, 2024
Copy link

github-actions bot commented Jul 16, 2024

Playwright test results

passed  105 passed
flaky  1 flaky
skipped  4 skipped

Details

report  Open report ↗︎
stats  110 tests across 36 suites
duration  8 minutes, 8 seconds
commit  42e7b9e
info  For more information on how to debug and view this report, see our readme

Flaky tests

edgeSetup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user

Skipped tests

chrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
edge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor
chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 87.95181% with 10 lines in your changes missing coverage. Please review.

Project coverage is 74.38%. Comparing base (8318d74) to head (42e7b9e).
Report is 95 commits behind head on main.

Files Patch % Lines
src/pageEditor/fields/AssignModVariableOptions.tsx 25.00% 3 Missing ⚠️
...geEditor/tabs/effect/useDocumentPreviewRunBlock.ts 71.42% 2 Missing ⚠️
...pageEditor/documentBuilder/hooks/useMoveElement.ts 50.00% 1 Missing ⚠️
src/pageEditor/fields/AlertOptions.tsx 50.00% 1 Missing ⚠️
src/pageEditor/fields/RemoteMethodOptions.tsx 50.00% 1 Missing ⚠️
src/pageEditor/hooks/useSaveMod.ts 83.33% 1 Missing ⚠️
.../pageEditor/modals/addBrickModal/AddBrickModal.tsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8863      +/-   ##
==========================================
+ Coverage   74.24%   74.38%   +0.13%     
==========================================
  Files        1332     1340       +8     
  Lines       40817    41198     +381     
  Branches     7634     7710      +76     
==========================================
+ Hits        30306    30646     +340     
- Misses      10511    10552      +41     

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

@@ -149,13 +152,17 @@ function useSaveMod(): ModSaver {
(x) => x.name === newMod.metadata.id,
)?.id;

assertNotNullish(packageId, "Package ID is required to upsert a mod");
Copy link
Contributor

@BLoe BLoe Jul 16, 2024

Choose a reason for hiding this comment

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

Same question, are we sure we want this function to throw an error if the callback is used before the RTK Query request finishes, as opposed to silently returning early / no-op?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this case, I think we do want an error, because editablePackages would already be loaded by the time we get here. So the packageId generally can't be found

Copy link
Contributor

@BLoe BLoe left a comment

Choose a reason for hiding this comment

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

Just had a few nit picks 👍

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@grahamlangford grahamlangford merged commit ecd21ea into main Jul 17, 2024
22 checks passed
@grahamlangford grahamlangford deleted the strict-null-checks-16-jul branch July 17, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants