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

Site migration: Show warning when user try to exit the instructions while the process is still happening #95465

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

gabrielcaires
Copy link
Contributor

@gabrielcaires gabrielcaires commented Oct 17, 2024

Closes #93557

Proposed Changes

  • Show a warning message if user tries to close the page while the migration is still happening

Why are these changes being made?

  • Nowadays, the site preparation for migration requires the user to wait until all processes are finished.

Note

We can't customize the message or show a custom UI due to browser security restrictions

Testing Instructions

  • Go to any of the migration flow (E.g /setup/migration)
  • Follow all steps for "I ll do for myself" until you reach the instructions page
  • Try to reload the page while the migration spinner is still happening
  • Check if you can see a message (We CAN"T customize the message due to browser security restrictions)
  • Wait until the migration processing is completed
  • Try to reload the page again and check if there is no message
image

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@gabrielcaires gabrielcaires requested a review from a team October 17, 2024 11:30
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 17, 2024
@gabrielcaires gabrielcaires added [Feature] Site Migration Features related to site migrations to WPcom and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 17, 2024
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 17, 2024
@gabrielcaires gabrielcaires self-assigned this Oct 17, 2024
@gabrielcaires gabrielcaires marked this pull request as ready for review October 17, 2024 11:30
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/show-warm-message-unload on your sandbox.

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@gabrielcaires gabrielcaires changed the title Site migration: Prevent user to unload the page while the migration is happening Site migration: Show warning when user try to exit the instructions while the process is still happening Oct 21, 2024
Copy link
Contributor

@fditrapani fditrapani left a comment

Choose a reason for hiding this comment

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

Looks great on the front-end. Thanks for the update!

@gabrielcaires gabrielcaires merged commit 7ca5a84 into trunk Oct 22, 2024
18 of 19 checks passed
@gabrielcaires gabrielcaires deleted the update/show-warm-message-unload branch October 22, 2024 09:10
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Migration Features related to site migrations to WPcom
Projects
None yet
3 participants