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

Publish a Blog: Add feature flag and pass it to site creation endpoint #99484

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

zaguiini
Copy link
Contributor

@zaguiini zaguiini commented Feb 7, 2025

Closes #99453.

Testing Instructions

Checkout 172681-ghe-Automattic/wpcom in your sandbox and proxy yourself.

  1. Enable the feature flag and go to /setup/onboarding
  2. Pick the "Publish a Blog" goal (which will set the write intent on the site)
  3. Create the site (you can leave after the processing screen, don't need to go through the Launchpad)
  4. Enter /settings/newsletter/%s and verify that the "Add the Subscribe Block at the end of each post." toggle is ON.

Create a site in a different flow or by picking different goals and verify that the the toggle is OFF in the Newsletter settings.

@zaguiini zaguiini requested a review from a team February 7, 2025 14:25
@zaguiini zaguiini self-assigned this Feb 7, 2025
@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 Feb 7, 2025
@@ -212,7 +215,7 @@ const CreateSite: Step = function CreateSite( { navigation, flow, data } ) {
};
}

const siteIntent = isMigrationSignupFlow( flow ) ? 'migration' : '';
const siteIntent = isMigrationSignupFlow( flow ) ? 'migration' : intent;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason we're not setting the intent on site creation, only when exiting the flow in /setup/site-setup. That means if the user bails after the processing screen they'll have an empty intent option.

I don't think this is right. Why save the goals and not the intent? Let's save both.

Copy link
Member

Choose a reason for hiding this comment

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

It's because when we first started with intent, the goals screen was always after site creation. I also don't think we need to use intent for this project so we don't need this hcnage: see my comment on the backend.

@matticbot
Copy link
Contributor

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

Sections (~333 bytes added 📈 [gzipped])

name                     parsed_size           gzip_size
link-in-bio-tld-flow          +178 B  (+0.0%)      +72 B  (+0.0%)
import-hosted-site-flow       +178 B  (+0.0%)      +47 B  (+0.0%)
copy-site-flow                +178 B  (+0.0%)      +99 B  (+0.0%)
write-flow                     +41 B  (+0.0%)      +22 B  (+0.0%)
update-design-flow             +41 B  (+0.0%)      +25 B  (+0.0%)
site-settings                  +41 B  (+0.0%)      +23 B  (+0.0%)
settings                       +41 B  (+0.0%)      +23 B  (+0.0%)
hundred-year-plan              +41 B  (+0.0%)      +20 B  (+0.0%)
hundred-year-domain            +41 B  (+0.0%)      +22 B  (+0.0%)
hosting                        +41 B  (+0.0%)      +23 B  (+0.0%)
home                           +41 B  (+0.0%)      +25 B  (+0.0%)
build-flow                     +41 B  (+0.0%)      +22 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

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

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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug onboarding/write-features-ff on your sandbox.

@@ -212,7 +215,7 @@ const CreateSite: Step = function CreateSite( { navigation, flow, data } ) {
};
}

const siteIntent = isMigrationSignupFlow( flow ) ? 'migration' : '';
const siteIntent = isMigrationSignupFlow( flow ) ? 'migration' : intent;
Copy link
Member

Choose a reason for hiding this comment

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

It's because when we first started with intent, the goals screen was always after site creation. I also don't think we need to use intent for this project so we don't need this hcnage: see my comment on the backend.

@@ -234,7 +237,8 @@ const CreateSite: Step = function CreateSite( { navigation, flow, data } ) {
domainItem,
sourceSlug,
siteIntent,
shouldSaveSiteGoals ? siteGoals : undefined
shouldSaveSiteGoals ? siteGoals : undefined,
config.isEnabled( 'onboarding/write-goal' )
Copy link
Member

Choose a reason for hiding this comment

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

Should we also do a treatment_cumulative check here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: Set up feature flag and enable on wpcalyso
3 participants