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

Staging sites: Update error notice message when Studio import is in progress #98216

Conversation

ivan-ottinger
Copy link
Contributor

@ivan-ottinger ivan-ottinger commented Jan 10, 2025

Resolves https://github.com/Automattic/dotcom-forge/issues/10008.

Proposed Changes

  • update error notice message when Studio import is in progress

Markup on 2025-01-10 at 14:40:12

Note

I originally aimed to adjust the error logic on a deeper level (as can be seen in #98156), but then decided to adjust the error message only.

The changes proposed in this PR are much simpler and solve the issue without touching the error logic.

Why are these changes being made?

Testing Instructions

  1. Create an Atomic site and ensure it also has a staging site attached (http://calypso.localhost:3000/staging-site/{site-slug}).
  2. Open the Studio app and connect the Atomic site to one of your local sites.
  3. Initiate the Push operation to your staging site and wait until the Applying changes... status message displays above the progress bar.
  4. Head over to the http://calypso.localhost:3000/staging-site/{site-slug} settings page and try to initiate the sync from production to the staging site.
  5. The process should fail with the new error message - as can be seen in the screenshot above.

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

@ivan-ottinger ivan-ottinger self-assigned this Jan 10, 2025
@matticbot
Copy link
Contributor

matticbot commented Jan 10, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~40 bytes added 📈 [gzipped])

name          parsed_size           gzip_size
staging-site        -50 B  (-0.0%)      +17 B  (+0.0%)
site-tools          -50 B  (-0.0%)      +23 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Jan 10, 2025

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

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

  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/staging-sync-error-message-on-studio-push-in-progress on your sandbox.

@ivan-ottinger ivan-ottinger force-pushed the update/staging-sync-error-message-on-studio-push-in-progress branch from 2512104 to 6165cb3 Compare January 10, 2025 13:43
@ivan-ottinger ivan-ottinger requested a review from a team January 10, 2025 14:04
@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 Jan 10, 2025
@wojtekn
Copy link
Contributor

wojtekn commented Jan 14, 2025

Looks good. Agreed on the proposed cleanup, though.

@ivan-ottinger ivan-ottinger force-pushed the update/staging-sync-error-message-on-studio-push-in-progress branch from 3cb58a5 to 83ff529 Compare January 14, 2025 11:52
@ivan-ottinger
Copy link
Contributor Author

Thank you for your review and feedback, @nightnei and @wojtekn. I have cleaned up the types in 3cb58a5.

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for cleaning it up 👍

@nightnei
Copy link
Contributor

@ivan-ottinger Only one thing - I did everything according to testing instruction and I got another error, is it ok?
Screenshot 2025-01-14 at 16 42 26

@ivan-ottinger
Copy link
Contributor Author

@ivan-ottinger Only one thing - I did everything according to testing instruction and I got another error, is it ok? Screenshot 2025-01-14 at 16 42 26

Thank you for testing this again, @nightnei.

Looks like some other error (other than studio_import_in_progress) got triggered there: fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Szh%2Qcyhtvaf%2Sfvgr%2Qfgntvat%2Spynff.fvgr%2Qfgntvat%2Qflap%2Qznantre.cuc%3Se%3Qp88s2260%26zb%3Q24002%26sv%3Q806%23782%2Q810-og (e.g. Sync already in progress.).

Are you getting that other error repeatedly when following the testing instructions? 🤔

@ivan-ottinger
Copy link
Contributor Author

Just noting that I have tested the PR again and it is working as expected. → Will merge and deploy the PR.

@ivan-ottinger ivan-ottinger merged commit e19a3ec into trunk Jan 16, 2025
12 checks passed
@ivan-ottinger ivan-ottinger deleted the update/staging-sync-error-message-on-studio-push-in-progress branch January 16, 2025 14:04
@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 Jan 16, 2025
@a8ci18n
Copy link

a8ci18n commented Jan 16, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17196136

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @ivan-ottinger for including a screenshot in the description! This is really helpful for our translators.

text={
error === 'studio_import_in_progress'
? translate(
'We couldn’t synchronize the %s environment. Studio push operation is currently in progress.',
Copy link
Contributor

Choose a reason for hiding this comment

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

For translation purposes, would it be possible to do 2 separate strings for each environment?

  1. We couldn’t synchronize the staging environment.
  2. We couldn’t synchronize the production environment.

In some languages, the variable will change the way "environment" needs to be translated, making it hard for translators to make sure both instances are grammatically correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thats is a good point. Thanks for bringing it up, @emilyaudela. I see the issue has been there before and will fix it in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@a8ci18n
Copy link

a8ci18n commented Jan 19, 2025

Translation for this Pull Request has now been finished.

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

Successfully merging this pull request may close these issues.

6 participants