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

Update account deleted page to allow restore behind feature flag #96446

Merged
merged 9 commits into from
Dec 7, 2024

Conversation

candy02058912
Copy link
Contributor

@candy02058912 candy02058912 commented Nov 15, 2024

Related to https://github.com/Automattic/dotcom-forge/issues/9460

Note

To keep this PR contained as it's already changing 10 files, let's focus on the functional aspects. If you notice any design improvements, please comment in the original issue

Proposed Changes

Update: I've also updated the deleting state screen to this:

Before After

Original flow (without restore function)

normal.flow.mp4

With the feature flag ?flags=me/account-restore

feature.mp4

Testing Instructions

Make sure we didn't break anything on production:

  • Go to /me/account/close and delete the account
  • it should be the same as production except we have a new layout for the deleted screen

Enable the feature flag

  • Go to /me/account/close?flags=me/account-restore
  • Go through the process and check for account restoration

Note

Currently after refreshing /me/account/closed, it will redirect back to a login screen as we haven't yet allowed that page to be accessed in a logged out state. This will be addressed in https://github.com/Automattic/dotcom-forge/issues/9909

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)?

@candy02058912 candy02058912 added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Nov 15, 2024
@matticbot
Copy link
Contributor

matticbot commented Nov 15, 2024

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

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

  • blaze-dashboard
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/account-deleted-page on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Nov 15, 2024

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

App Entrypoints (~236 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-stepper              -3322 B  (-0.1%)     -236 B  (-0.0%)
entry-main                 -3299 B  (-0.2%)     -235 B  (-0.0%)
entry-domains-landing        -58 B  (-0.0%)      -84 B  (-0.0%)
entry-browsehappy            -58 B  (-0.0%)      -84 B  (-0.1%)
entry-subscriptions          +53 B  (+0.0%)      -52 B  (-0.0%)
entry-login                  +53 B  (+0.0%)      -52 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~42230 bytes added 📈 [gzipped])

name                               parsed_size           gzip_size
account-close                         +10081 B  (+1.3%)    +2735 B  (+1.3%)
site-purchases                          +299 B  (+0.0%)    +1517 B  (+0.3%)
purchases                               +299 B  (+0.0%)    +1593 B  (+0.3%)
jetpack-cloud-features-comparison       +299 B  (+0.0%)    +1042 B  (+0.5%)
site-blocks                             -196 B  (-0.0%)     -815 B  (-0.4%)
settings-writing                        -196 B  (-0.0%)     -825 B  (-0.5%)
me                                      -196 B  (-0.0%)     -544 B  (-0.3%)
import-hosted-site-flow                 +173 B  (+0.0%)     +866 B  (+0.3%)
people                                  +150 B  (+0.0%)     -104 B  (-0.1%)
settings                                -123 B  (-0.0%)     -247 B  (-0.1%)
jetpack-cloud-settings                  +109 B  (+0.0%)    +1457 B  (+0.7%)
write-flow                              +103 B  (+0.0%)      +15 B  (+0.0%)
themes                                  +103 B  (+0.0%)      +15 B  (+0.0%)
theme                                   +103 B  (+0.0%)      +15 B  (+0.0%)
staging-site                            +103 B  (+0.0%)      +21 B  (+0.0%)
sites-dashboard                         +103 B  (+0.0%)      +15 B  (+0.0%)
site-tools                              +103 B  (+0.0%)      +15 B  (+0.0%)
site-performance                        +103 B  (+0.0%)      +15 B  (+0.0%)
site-overview                           +103 B  (+0.0%)     -166 B  (-0.0%)
site-monitoring                         +103 B  (+0.0%)      +15 B  (+0.0%)
site-marketing                          +103 B  (+0.0%)     +289 B  (+0.1%)
site-logs                               +103 B  (+0.0%)      +15 B  (+0.0%)
settings-reading                        +103 B  (+0.0%)     +306 B  (+0.2%)
settings-jetpack                        +103 B  (+0.0%)     +862 B  (+0.5%)
security                                -103 B  (-0.0%)     +102 B  (+0.0%)
promote-post-i2                         +103 B  (+0.0%)      +15 B  (+0.0%)
privacy                                 -103 B  (-0.0%)      +76 B  (+0.0%)
preview                                 +103 B  (+0.0%)      +15 B  (+0.0%)
posts-custom                            +103 B  (+0.0%)      +22 B  (+0.0%)
posts                                   +103 B  (+0.0%)      +22 B  (+0.0%)
plans                                   +103 B  (+0.0%)      +54 B  (+0.0%)
migrate                                 +103 B  (+0.0%)      +15 B  (+0.0%)
marketplace                             +103 B  (+0.0%)      +15 B  (+0.0%)
marketing                               +103 B  (+0.0%)     +289 B  (+0.1%)
link-in-bio-tld-flow                    +103 B  (+0.0%)      +15 B  (+0.0%)
jetpack-social                          +103 B  (+0.0%)     -156 B  (-0.1%)
jetpack-search                          +103 B  (+0.0%)     -178 B  (-0.1%)
jetpack-connect                         +103 B  (+0.0%)     -111 B  (-0.0%)
jetpack-cloud-pricing                   +103 B  (+0.0%)      +60 B  (+0.0%)
jetpack-cloud-partner-portal            +103 B  (+0.0%)      +15 B  (+0.0%)
jetpack-cloud-overview                  +103 B  (+0.0%)      +15 B  (+0.0%)
jetpack-cloud                           +103 B  (+0.0%)      +15 B  (+0.0%)
hosting-features                        +103 B  (+0.0%)      +15 B  (+0.0%)
hosting                                 +103 B  (+0.0%)     -160 B  (-0.0%)
help                                    -103 B  (-0.0%)      +88 B  (+0.0%)
github-deployments                      +103 B  (+0.0%)      +15 B  (+0.0%)
email                                   +103 B  (+0.0%)     +417 B  (+0.2%)
domains                                 +103 B  (+0.0%)     +588 B  (+0.1%)
developer                               -103 B  (-0.0%)      +86 B  (+0.0%)
customize                               +103 B  (+0.0%)      +15 B  (+0.0%)
concierge                               +103 B  (+0.0%)      +15 B  (+0.0%)
checkout                                +103 B  (+0.0%)     -349 B  (-0.1%)
build-flow                              +103 B  (+0.0%)      +15 B  (+0.0%)
woocommerce-installation                 -93 B  (-0.0%)     -703 B  (-0.6%)
site-settings                            -93 B  (-0.0%)     -808 B  (-0.2%)
settings-security                        -93 B  (-0.0%)     -917 B  (-0.6%)
settings-discussion                      -93 B  (-0.0%)     -431 B  (-0.4%)
reader                                   -93 B  (-0.0%)     -677 B  (-0.2%)
pages                                    -93 B  (-0.0%)     -685 B  (-0.5%)
jetpack-cloud-agency-sites-v2            -93 B  (-0.0%)     -990 B  (-0.2%)
home                                     -93 B  (-0.0%)     -592 B  (-0.1%)
google-my-business                       -93 B  (-0.0%)     -402 B  (-0.3%)
export                                   -93 B  (-0.0%)     -629 B  (-0.6%)
backup                                   -93 B  (-0.0%)     -990 B  (-0.3%)
add-ons                                  -93 B  (-0.0%)     -556 B  (-0.5%)
activity                                 -93 B  (-0.0%)     -870 B  (-0.4%)
a8c-for-agencies-sites                   -93 B  (-0.0%)     -990 B  (-0.2%)
with-theme-assembler-flow                +85 B  (+0.1%)      +24 B  (+0.2%)
update-options-flow                      +85 B  (+0.1%)      +22 B  (+0.3%)
update-design-flow                       +85 B  (+0.0%)      +19 B  (+0.0%)
trial-wooexpress-flow                    +85 B  (+0.1%)      +22 B  (+0.3%)
tailored-ecommerce-flow                  +85 B  (+0.1%)      +22 B  (+0.3%)
site-setup-wg                            +85 B  (+0.1%)      +20 B  (+0.1%)
site-setup-flow                          +85 B  (+0.1%)      +20 B  (+0.1%)
site-migration-flow                      +85 B  (+0.1%)      +22 B  (+0.1%)
readymade-template-flow                  +85 B  (+0.1%)      +20 B  (+0.1%)
migration-signup                         +85 B  (+0.1%)      +21 B  (+0.3%)
migration-flow                           +85 B  (+0.1%)      +22 B  (+0.2%)
import-flow                              +85 B  (+0.1%)      +22 B  (+0.2%)
hosted-site-migration-flow               +85 B  (+0.1%)      +22 B  (+0.1%)
free-post-setup-flow                     +85 B  (+0.1%)      +21 B  (+0.3%)
entrepreneur-flow                        +85 B  (+0.1%)      +22 B  (+0.1%)
devdocs                                  +85 B  (+0.0%)      +32 B  (+0.1%)
assembler-first-flow                     +85 B  (+0.1%)      +21 B  (+0.1%)
ai-assembler-flow                        +85 B  (+0.1%)      +22 B  (+0.1%)
plugins                                  -80 B  (-0.0%)     -725 B  (-0.1%)
jetpack-cloud-plugin-management          -80 B  (-0.0%)     -725 B  (-0.1%)
settings-newsletter                      -56 B  (-0.0%)     -123 B  (-0.1%)

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

Async-loaded Components (~4666 bytes added 📈 [gzipped])

name                                             parsed_size           gzip_size
async-load-store-app-store-stats                      -196 B  (-0.0%)     -427 B  (-0.4%)
async-load-calypso-my-sites-checkout-modal            -196 B  (-0.0%)    -1055 B  (-0.3%)
async-load-calypso-blocks-editor-checkout-modal       -196 B  (-0.0%)     -924 B  (-0.3%)
async-load-design                                     +121 B  (+0.0%)     +645 B  (+0.2%)
async-load-signup-steps-design-picker                 -108 B  (-0.2%)      -27 B  (-0.2%)
async-load-signup-steps-site-picker                   +103 B  (+0.1%)      +15 B  (+0.0%)
async-load-signup-steps-difm-site-picker              +103 B  (+0.1%)      +15 B  (+0.0%)
async-load-design-blocks                              +103 B  (+0.0%)      +15 B  (+0.0%)
async-load-calypso-components-sites-popover           +103 B  (+0.1%)      +15 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.

@a8ci18n
Copy link

a8ci18n commented Nov 15, 2024

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

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.

Hi @candy02058912, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • Thanks for flying with WordPress.com. You have 30 days to restore your account if you change your mind.
  • I made a mistake! Restore my account

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Nov 18, 2024

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

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

@candy02058912 candy02058912 requested a review from a team November 20, 2024 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 Nov 20, 2024
@candy02058912 candy02058912 changed the title WIP: Update layout for account deleted page Update account deleted page to allow restore behind feature flag Nov 20, 2024
@candy02058912 candy02058912 marked this pull request as ready for review November 20, 2024 14:08
Copy link
Contributor

@matt-west matt-west left a comment

Choose a reason for hiding this comment

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

Thanks @candy02058912. This looks good to me.

I left a comment about the loading state on restore button on the original issue. It’s not related to this functionality though, so shouldn’t block this PR.

Copy link
Member

@p-jackson p-jackson left a comment

Choose a reason for hiding this comment

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

The page is left-aligned on mobile. I didn't expect it, but maybe it's by design?

CleanShot 2024-11-26 at 13 43 54@2x

The spinner component is also left-aligned which looks unexpected. I just wasn't quick enough to screenshot 😄

Everything else works great! I'll approve because the only comment that must be fixed is the missing translate() call.

client/state/action-types.ts Outdated Show resolved Hide resolved
client/state/data-layer/wpcom/me/account/close/index.js Outdated Show resolved Hide resolved
client/me/account-close/closed.jsx Outdated Show resolved Hide resolved
client/me/account-close/closed.jsx Outdated Show resolved Hide resolved
client/me/account-close/closed.jsx Outdated Show resolved Hide resolved
@candy02058912 candy02058912 force-pushed the update/account-deleted-page branch from 47b69c5 to c1637f4 Compare December 7, 2024 17:35
@candy02058912
Copy link
Contributor Author

The page is left-aligned on mobile. I didn't expect it, but maybe it's by design?

Thanks for mentioning that! I liked how it looked, so I didn't think much about it.
cc: @matt-west, what would you suggest we do for the mobile design 🙏

I'll still merge the PR, as this isn't a blocker.

@candy02058912 candy02058912 merged commit b7fffd6 into trunk Dec 7, 2024
11 checks passed
@candy02058912 candy02058912 deleted the update/account-deleted-page branch December 7, 2024 18:13
@github-actions github-actions bot removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging labels Dec 7, 2024
@a8ci18n
Copy link

a8ci18n commented Dec 7, 2024

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

Some locales (Hebrew) 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 @candy02058912 for including a screenshot in the description! This is really helpful for our translators.

@matt-west
Copy link
Contributor

Apologies for the late response.

The page is left-aligned on mobile.

I think this makes sense. If we maintained the centred copy on smaller viewports the lines could wrap weirdly. Left-aligning ensures that the copy remains easily readable.

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.

5 participants