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 Assembler - Write Flow (dotcom patterns only) #72748

Merged
merged 14 commits into from
Feb 3, 2023

Conversation

miksansegundo
Copy link
Contributor

@miksansegundo miksansegundo commented Jan 29, 2023

Proposed Changes

  • Enables the feature flag "pattern-assembler/write-flow" in calypso and development environments to:
    • Show the assembler CTA in the Write flow.
    • Add query patterns from dotcompatterns in the sections list.
  • Render the query pattern previews using posts from blankcanvas3demo site.
  • Pass the params trim_content: false and post_source_site_id to /theme-setup to copy all the posts (4) from blankcanvas3demo site into the user's site at the end of the flow.

Note that changes made in the posts on blankcanvas3demo site will affect the following:

  • the previews of query patterns in the assembler
  • the posts created on the user's site at the end of the assembler flow
Site.Assembler.-.Query.patterns.mov

Testing Instructions

  • Test using a non-a8c account (we do this to check that all users can request all the endpoints without having permission issues).
  • Create a new site from the admin or visit /start.
  • Select a domain and a plan.
  • In the goals screen:
    • in other environments different than development, or calypso, you'll need to add this param in the URL &flags=pattern-assembler/write-flow and press enter.
    • then select Write & Publish.
  • Continue until the Design picker and scroll down to click Start designing on the CTA. If you don't see it, check that the feature flag is in the URL.
  • Click Add sections to choose query patterns. If you hover them, you'll see their category name Posts in a tooltip.
  • Check that the previews use 4 posts with image placeholders as featured images.
  • Click Continue to complete the flow and you'll land on the editor.
  • Check that the previews in the editor and the site front-end match the previews in the assembler.
  • Check that four posts with feature images have been created on your site.

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

Related to #72565

@miksansegundo miksansegundo requested a review from a team January 29, 2023 17:33
@miksansegundo miksansegundo self-assigned this Jan 29, 2023
@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 29, 2023
@github-actions
Copy link

github-actions bot commented Jan 29, 2023

@matticbot
Copy link
Contributor

matticbot commented Jan 29, 2023

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

App Entrypoints (~92 bytes added 📈 [gzipped])

name                 parsed_size           gzip_size
entry-stepper             +165 B  (+0.0%)      +64 B  (+0.0%)
entry-gutenboarding        +89 B  (+0.0%)      +22 B  (+0.0%)

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

Sections (~393 bytes added 📈 [gzipped])

name                 parsed_size           gzip_size
site-setup-flow           +525 B  (+0.0%)     +179 B  (+0.0%)
site-assembler-flow       +525 B  (+1.9%)     +181 B  (+2.7%)
import-flow               +525 B  (+0.0%)     +179 B  (+0.0%)
sites-dashboard            +89 B  (+0.0%)      +33 B  (+0.0%)
settings                   +89 B  (+0.0%)      +33 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.

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

name                                              parsed_size           gzip_size
async-load-pattern-assembler-container                 +113 B  (+0.0%)      +22 B  (+0.0%)
async-load-masterbar-help-center                        +89 B  (+0.3%)      +34 B  (+0.4%)
async-load-design                                       +89 B  (+0.0%)      +33 B  (+0.0%)
async-load-calypso-my-sites-checkout-modal              +89 B  (+0.0%)      +33 B  (+0.0%)
async-load-calypso-layout-masterbar-checkout-tsx        +89 B  (+0.1%)      +34 B  (+0.1%)
async-load-calypso-layout-masterbar-checkout            +89 B  (+0.1%)      +34 B  (+0.2%)
async-load-automattic-help-center                       +89 B  (+0.0%)      +31 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.

@bangank36
Copy link
Contributor

Some early feedbacks for the PR
Query pattern on preview

Expand
Pattern ID Preview Notes
5645
Four Recent Blog Posts
LjJFog.png
1784
Recent Posts
jMatMx.png
8421
Grid of posts 2x3
7ug2AA.png
8435
Grid of Posts 3x2
ca2cYc.png
7996
Grid of Posts 4x2
zjNESP.png
8437
List of posts
VL2tcV.png
3213
Latest podcast episodes
tOZhUU.png

Number of Posts on new site
Z4UJn9.png

On the site editor
It's not look so good though
ih7Pd5.png

@miksansegundo
Copy link
Contributor Author

Thanks so much for adding screenshots @bangank36.

I noticed and identified the cause of those issues except for the issue with the featured image placeholders in the editor. I'll try to find an open issue in the Gutenberg repo.

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit feat/pattern-assembler-query-patterns on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@miksansegundo
Copy link
Contributor Author

miksansegundo commented Jan 30, 2023

@bangank36 can you sandbox D99603-code and test again, please?

I created 4 posts using the placeholder image as the featured image on blankcanvas3demo. Let's start with these and then see if we want more.

Screenshot 2566-01-30 at 14 17 09

Also, I added the following changes to this PR:

Pending TODO:

  • Pass a new param to /theme-setup to generate the headstart annotation to copy posts from blankcanvas3demo rather than from dotcomverticalposts.

cc: @autumnfjeld @arthur791004

@bangank36
Copy link
Contributor

can you sandbox D99603-code and test again, please?

On it!

@miksansegundo
Copy link
Contributor Author

This PR modifies the release build for editing-toolkit

Is that because of the change in packages/data-stores/src/site/actions.ts?

@arthur791004
Copy link
Contributor

Is that because of the change in packages/data-stores/src/site/actions.ts?

yes

@miksansegundo miksansegundo requested review from a team and worldomonation as code owners January 31, 2023 11:07
@miksansegundo miksansegundo requested a review from a team January 31, 2023 11:07
@miksansegundo miksansegundo requested a review from a team as a code owner January 31, 2023 11:07
@miksansegundo miksansegundo force-pushed the feat/pattern-assembler-query-patterns branch from e2aa0a6 to 9a87be6 Compare January 31, 2023 11:49
@miksansegundo miksansegundo removed request for a team and worldomonation January 31, 2023 11:49
@miksansegundo
Copy link
Contributor Author

I updated this PR to pass the param is_assembler_flow: true to /theme-setup to copy the posts from blankcanvas3demo site, rather than from dotcomverticalposts. For testing, now it is required to sandbox D99790-code too.

I have updated the PR description. There aren't pending tasks!

@arthur791004
Copy link
Contributor

This PR looks good, and let's wait for D99790-code 🙂

@miksansegundo
Copy link
Contributor Author

This PR can be tested without sandboxing the API because we merged the following diffs:

  • D99603-code to make sure the posts created on the user's site have featured images
  • D99790-code to copy the posts from blankcanvas3demo on the user's site at the end of the flow

@miksansegundo miksansegundo force-pushed the feat/pattern-assembler-query-patterns branch from 449c8c4 to 48109b8 Compare February 1, 2023 10:13
Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

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

Tested and looks good to me!

@autumnfjeld
Copy link
Contributor

The posts block I chose in the PA:

image

How it looks in the Site Editor
image

How it looks on the front end
🚫 I see this modal: it conflicts with the Tour and I think is also not supposed to show on page load, though I don't know for sure.
image

I see the modal again when I click save and when I click Next Steps it takes me to the launch pad.

Screen.Capture.on.2023-02-02.at.17-17-42.mp4

So we'll need to fix this before publishing the CfT.

@miksansegundo
Copy link
Contributor Author

miksansegundo commented Feb 2, 2023

I added the feature flag pattern-assembler/write-flow and enabled it on development and wpcalypso envs.

@miksansegundo miksansegundo force-pushed the feat/pattern-assembler-query-patterns branch from 0cd85a2 to b17ad67 Compare February 3, 2023 04:32
@miksansegundo
Copy link
Contributor Author

I see this #72093: it conflicts with the Tour and I think is also not supposed to show on page load, though I don't know for sure.

We haven't reproduced that issue. We believe that was a false positive and confirmed that the modal shows up only when you publish a post or save changes on the site editor, and the LaunchPad checklist is completed.

See the implementation, and more testing details on pbxlJb-3rg-p2.

@miksansegundo miksansegundo merged commit b5e0752 into trunk Feb 3, 2023
@miksansegundo miksansegundo deleted the feat/pattern-assembler-query-patterns branch February 3, 2023 11:25
@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 Feb 3, 2023
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