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

Sites as landing page: Display success notice after accepting /sites landing page opt-in #70567

Merged

Conversation

p-jackson
Copy link
Member

Proposed Changes

PR inspired by this feedback. Not part of the original project brief so see what @zaguiini thinks before merging.

Shows a success <GlobalNotice> after accepting the SALP opt-in banner

Screen.Recording.2022-11-30.at.5.28.31.PM.mov

I did a little searching, and there doesn't seem to be any consistency around whether global notices should end with a full stop or exclamation point or end with the word "successful". I went with "Default page updated".

I don't think we should show anything after rejecting the banner. IMO it doesn't make sense because, as far as the user is concerned, they haven't changed any preference. They're sticking with the status quo.

Testing Instructions

  • Delete the entire sites-landing-page preference object using the dev menu in the bottom right
  • Go to /sites
  • Accept banner. After saving is complete the global notice appears. The calypso_sites_dashboard_landing_page_banner_accept_click banner fires just like it used to.

@p-jackson p-jackson requested a review from a team November 30, 2022 04:39
@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 30, 2022
@p-jackson p-jackson self-assigned this Nov 30, 2022
@p-jackson p-jackson added Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. Sites as landing page i1 labels Nov 30, 2022
@p-jackson p-jackson added this to the Sites as landing page i1 milestone Nov 30, 2022
@matticbot
Copy link
Contributor

matticbot commented Nov 30, 2022

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

Sections (~53 bytes added 📈 [gzipped])

name             parsed_size           gzip_size
sites-dashboard       +137 B  (+0.0%)      +53 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.

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.

@vykes-mac
Copy link
Contributor

This is good to me, notice adds feedback to the user in the context.

@zaguiini
Copy link
Contributor

zaguiini commented Nov 30, 2022

@p-jackson tests are failing, could you please merge this once you start working? Thanks!

EDIT: rebasing fixed the problem. p6fDka-Ls-p2

@zaguiini zaguiini force-pushed the add/success-notice-after-sites-dashboard-opt-in-accept branch from aa04292 to a7687e3 Compare November 30, 2022 19:27
@zaguiini zaguiini merged commit b22acbe into trunk Nov 30, 2022
@zaguiini zaguiini deleted the add/success-notice-after-sites-dashboard-opt-in-accept branch November 30, 2022 19:45
@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 Nov 30, 2022
@a8ci18n
Copy link

a8ci18n commented Nov 30, 2022

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

Hi @p-jackson, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include this string: Default page updated.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Dec 11, 2022

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
Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. Sites as landing page i1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants