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: add View Site button to homepage banner #39632

Merged
merged 3 commits into from
Feb 25, 2020

Conversation

andfinally
Copy link
Contributor

@andfinally andfinally commented Feb 24, 2020

Changes proposed in this Pull Request

  • Adds a View Site button to the banner we show at the top of the Customer Home on a site which has been migrated to in the last two days. (Related PR)

Testing instructions

  • Apply the PR and run Calypso locally, or use calypso.live (for the latter, add ?flags=tools/migrate to the end of the URL to enable the feature flag).
  • Do a migration: go to the import section of a Simple site, enter the URL of a Jetpack site and follow the steps you're presented with. (If you're migrating to a site you've migrated to whose done status hasn't been cleared yet, you may need to reset the migration first with a request to the reset-migration endpoint.)
  • When the migration finishes you should be redirected to My Home, unless there was an error.
  • The "Your site has been imported!" banner at the top of My Home should include a "View Site" button.

image

image

@andfinally andfinally requested a review from a team as a code owner February 24, 2020 16:42
@matticbot
Copy link
Contributor

@andfinally andfinally self-assigned this Feb 24, 2020
@andfinally andfinally added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. WP Migration Use "[Feature] Site Migration" ___ Old lable related to WP Migration Project (pbkcP4-8-p2) labels Feb 24, 2020
@andfinally
Copy link
Contributor Author

@danhauk Customising the checklist on My Home turned out to be tricky – it wasn't obvious how I could adapt it to show a special checklist for our situation, and we don't currently show a checklist for Atomic sites anyway. So I've gone with this as a workaround.

@matticbot
Copy link
Contributor

matticbot commented Feb 24, 2020

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

Sections (~4 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
home        +42 B  (+0.0%)       +4 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.

@danhauk
Copy link
Contributor

danhauk commented Feb 24, 2020

Thanks @andfinally. Let's hold off on trying to get a customized checklist working as we're re-evaluating the usefulness of leaning on a checklist for everything.

Rather than creating a custom banner like this, could we utilize the existing pattern established with the "Your site is launched" banner? Keeping the page header with "My Home" and the View Site button. That also helps with maintenance going forward, not having the custom styles for this one specific banner and button.

image

Screen Shot 2020-02-24 at 12 15 51 PM

@andfinally andfinally added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 24, 2020
@dezzie
Copy link
Contributor

dezzie commented Feb 24, 2020

👋 @andfinally! Backing up @danhauk on keeping the View Site button and the congratulatory banner separate.

Thanks for attempting the custom checklist too though, and for reminding us of that limitation pertaining to atomic sites. Seems like this is a mutually-beneficial work-around!

I haven't seen the Go Mobile card show up like that before. Normally it's stacked underneath all the other content on the right-hand side. Unless this behavior is related to this PR, I'm happy with all the work here.

Screen Shot 2020-02-24 at 11 48 29 AM

Copy link
Contributor

@dezzie dezzie left a comment

Choose a reason for hiding this comment

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

Check out my last comment where I had a question I think is unrelated, I'm otherwise good!

@andfinally
Copy link
Contributor Author

Thanks @danhauk and @dezzie, now updated to use the Launched layout.

image

image

@andfinally
Copy link
Contributor Author

andfinally commented Feb 24, 2020

Thanks for checking it out! I haven't moved Go Mobile in this PR – I believe that new position is intentional. I found this comment in the code:

"Go Mobile" has the highest priority placement when viewed in smaller viewports, so folks can see it on their phone without needing to scroll.

@andfinally andfinally merged commit 099f068 into master Feb 25, 2020
@andfinally andfinally deleted the update/migration__view-site branch February 25, 2020 09:25
sirreal added a commit that referenced this pull request Mar 4, 2020
\#38356 migrated this image to webpack file loader. #39642 restored the
image to prevent possible 404s, #39632 introduced a legacy static URL.

Use file-loader to allow removal in #39643.
{ isRecentlyMigratedSite && (
<Card className="customer-home__migrate-card" highlight="info">
<img
src="/calypso/images/illustrations/fireworks.svg"
Copy link
Member

Choose a reason for hiding this comment

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

#38356 migrated this to use webpack file loader. The static image was temporarily preserved to prevent 404s, but please avoid it in the future.

Fix in #39861

sirreal added a commit that referenced this pull request Mar 4, 2020
\#38356 migrated this image to webpack file loader. #39642 restored the
image to prevent possible 404s, #39632 introduced a legacy static URL.

Use file-loader to allow removal in #39643.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WP Migration Use "[Feature] Site Migration" ___ Old lable related to WP Migration Project (pbkcP4-8-p2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants