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

#9092: slice 2.3 support deleting user deployment in extension console #9286

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Oct 15, 2024

What does this PR do?

Demo

Future Work

  • Handle updating/reactivating to a new version properly (shown in the loom, a work-around is to reactivate turning sync off, and then turning it back on with another reactivation).
  • Show a nicer modal when deactivating a mod to prompt the user if they also want to turn off personal deployment for the mod.
  • Improve the experience so that you don't have to click on activate deployment modal again right after activating.
  • Avoid refetching personal deployment if it's the reactivation case with keeping it on - ideally we could just use the deployment metadata on the existing modInstance, but we currently require the entire Deployment metadata which we need to fetch from the service when activating.

Checklist

Leave all that are relevant and check off as completed

  • This PR requires a security review
  • This PR introduces a new library: double check it's MIT/Apache2/permissively licensed
  • This PR requires a node/npm version update: let the team know on #engineering
  • This PR requires a documentation change (link to old docs)
  • This PR requires a tutorial update (link to old tutorials)
  • This PR requires a feature flag
  • This PR requires a environment variable change
  • Added jest or playwright tests and/or storybook stories

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

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 86.48649% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.16%. Comparing base (8318d74) to head (e1130e1).
Report is 374 commits behind head on main.

Files with missing lines Patch % Lines
src/activation/modOptionsHelpers.ts 81.48% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9286      +/-   ##
==========================================
+ Coverage   74.24%   75.16%   +0.91%     
==========================================
  Files        1332     1368      +36     
  Lines       40817    42243    +1426     
  Branches     7634     7866     +232     
==========================================
+ Hits        30306    31751    +1445     
+ Misses      10511    10492      -19     

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

Copy link

github-actions bot commented Oct 15, 2024

Playwright test results

passed  137 passed
flaky  3 flaky
skipped  2 skipped

Details

report  Open report ↗︎
stats  142 tests across 46 suites
duration  1 hour, 10 minutes, 6 seconds
commit  e1130e1
info  For more information on how to debug and view this report, see our readme

Flaky tests

msedge-setup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user
msedge-setup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user
chrome › tests/pageEditor/copyMod.spec.ts › run a copied mod with a built-in integration

Skipped tests

chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

* (no action is taken, and we return undefined)
* TODO: Handle activating a mod that is updating to a newer version and update the personal deployment to point to the new mod version
*/
export function useHandlePersonalDeploymentOption() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we choose a more informative name than "handle"? E.g.:

  • useUpdateOrDeletePersonalDeployment
  • useCreateDeletePersonalDeployment

Potentially even calling out that it's to sync that state with the backend, e.g., useUpdateOrDeletePersonalDeploymentOnServer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since it will create, delete, fetch and in the future update personal deployments, I think a more succinct name like: useManagePersonalDeployment works here.

@twschiller twschiller changed the title 9092 slice 23 support deleting user deployment in extension console #9092: slice 2.3 support deleting user deployment in extension console Oct 15, 2024
@twschiller twschiller added this to the 2.1.5 milestone Oct 15, 2024
Copy link
Contributor

@twschiller twschiller left a comment

Choose a reason for hiding this comment

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

LGTM - see suggestions on naming, dead code, and typescript failures

Copy link

When the PR is merged, the first loom link found on this PR will be posted to #sprint-demo on Slack. Do not edit this comment manually.

@fungairino fungairino enabled auto-merge (squash) October 16, 2024 20:12
@fungairino fungairino merged commit 011fc72 into main Oct 16, 2024
20 checks passed
@fungairino fungairino deleted the 9092-slice-23-support-deleting-user-deployment-in-extension-console branch October 16, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slice 2.3 Support deleting user deployment in extension console
3 participants