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

Newsletter Tasks: Complete 'Start building your audience' upon browsing the page #98869

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

zaguiini
Copy link
Contributor

@zaguiini zaguiini commented Jan 24, 2025

Closes #98775.

Registrazione.schermo.2025-01-24.alle.12.04.57.AM.mov

CleanShot 2025-01-27 at 09 29 29@2x

Testing Instructions

  1. Apply Launchpad: add URL hash to "build audience" task jetpack#41299 to your sandbox (it's merged, but might not have been deployed)
  2. Turn the feature flag on and create a Newsletter through /setup/onboarding flow.
  3. Click the "Start building your audience" task in Launchpad.
  4. Observe the notice at the top-right corner and click "Next steps".

You'll end up in /home/%s and the checklist task should be ticked.

@zaguiini zaguiini requested a review from a team January 24, 2025 03:00
@zaguiini zaguiini self-assigned this Jan 24, 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 Jan 24, 2025
@matticbot
Copy link
Contributor

matticbot commented Jan 24, 2025

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

Sections (~317 bytes added 📈 [gzipped])

name         parsed_size           gzip_size
subscribers       +737 B  (+0.1%)     +317 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.

@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 newsletter-goal/start-building-your-audience on your sandbox.

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.

Really like the hook approach 👍 I'll make a couple tweaks

noticeDuration?: number;
}

export const useTaskCompletedNotice = ( {
Copy link
Member

Choose a reason for hiding this comment

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

This is a nice wee hook, I like this approach 👍

Since the completion logic is unique for each task, I sort of wanted to have a different hook name, that made it clear that this hook was appropriate when the task is completed on navigation.

Suggested change
export const useTaskCompletedNotice = ( {
export const useTaskCompletedOnNavigationNotice = ( {

But this seems too clunky. So I think just leave it for now until something better becomes obvious.

client/launchpad/hooks/use-task-completed-notice.ts Outdated Show resolved Hide resolved
client/my-sites/subscribers/main.tsx Outdated Show resolved Hide resolved
@p-jackson
Copy link
Member

I've made a change so that the client users a URL hash for determining whether the task should completed (rather than a feature flag). Depends on Automattic/jetpack#41299

Copy link
Contributor

@paulopmt1 paulopmt1 left a comment

Choose a reason for hiding this comment

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

It's working as expected, nice work!

I raised a concern about the UX here: p1737727052353399-slack-C057AH42XQD

@vykes-mac
Copy link
Contributor

Nice work here! Did a similar thing here #98865, I'll work with your hook instead! Nice ✨

@zaguiini zaguiini merged commit 580e268 into trunk Jan 24, 2025
15 checks passed
@zaguiini zaguiini deleted the newsletter-goal/start-building-your-audience branch January 24, 2025 20:22
@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 Jan 24, 2025
@a8ci18n
Copy link

a8ci18n commented Jan 24, 2025

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

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.

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

@a8ci18n
Copy link

a8ci18n commented Jan 27, 2025

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: "Start building your audience" should be completable
6 participants