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

Reader: reader and account flows set Reader as the user's default landing page #99379

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

DustyReagan
Copy link
Member

@DustyReagan DustyReagan commented Feb 5, 2025

Related to https://github.com/Automattic/loop/issues/341

Proposed Changes

  • This PR saves a new user's landing page preference to the Reader when they sign-up from /start/reader/user-social or /start/account/user-social

Why are these changes being made?

  • When a user signs up via /discover or as a user account with no blog/site, it makes sense that their default landing page should be the Reader, since their site was created through social interaction and they have no sites.

Testing Instructions

  • Use Calypso Live or localhost
  • Go to /discover and click "Sign Up" in the upper right. This will take you to sign up via /start/reader/user-social
  • Sign up using any method, try several.
  • After sign-up is complete, you'll be redirected to /reader. If you go to /me/account, you'll see your "Default Landing Page" is set to "The Reader"
  • Similarly, if you try to "Like" or "Comment" on a blog while logged out, you'll be prompted to create an account using /start/account/user-social Creating an account from this flow should also set your "Default Landing Page" to "The Reader"

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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-aUh-p2)?

@matticbot
Copy link
Contributor

matticbot commented Feb 5, 2025

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

Sections (~273 bytes added 📈 [gzipped])

name                  parsed_size           gzip_size
signup                     +614 B  (+0.2%)     +159 B  (+0.2%)
update-design-flow         +569 B  (+0.0%)      +78 B  (+0.0%)
link-in-bio-tld-flow       +569 B  (+0.0%)      +62 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 (~1362 bytes removed 📉 [gzipped])

name                                                     parsed_size           gzip_size
async-load-signup-steps-site-picker                           -631 B  (-0.3%)     -213 B  (-0.3%)
async-load-signup-steps-domains                               -631 B  (-0.1%)     -260 B  (-0.1%)
async-load-signup-steps-difm-site-picker                      -631 B  (-0.3%)     -208 B  (-0.3%)
async-load-calypso-blocks-jitm-templates-sidebar-banner       -631 B  (-1.2%)     -227 B  (-1.2%)
async-load-calypso-blocks-jitm-templates-notice               -631 B  (-1.2%)     -228 B  (-1.2%)
async-load-calypso-blocks-jitm-templates-default              -631 B  (-1.2%)     -226 B  (-1.2%)

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.

@DustyReagan DustyReagan self-assigned this Feb 6, 2025
@DustyReagan DustyReagan changed the title Reader: When reader flow is complete set Reader as users landing page Reader: reader and account flows set Reader as the user's default landing page Feb 6, 2025
@DustyReagan DustyReagan marked this pull request as ready for review February 6, 2025 20:59
Comment on lines +95 to +102
postCompleteCallback: async ( { dispatch } ) => {
dispatch(
savePreference( READER_AS_LANDING_PAGE_PREFERENCE, {
useReaderAsLandingPage: true,
updatedAt: Date.now(),
} )
);
},
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure this is the best place for this, but I'm struggling to find another place to put this after the user has been created.

@DustyReagan DustyReagan requested a review from a team February 6, 2025 21:02
@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 6, 2025
Copy link
Contributor

@eoigal eoigal left a comment

Choose a reason for hiding this comment

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

Works well!
Screenshot 2025-02-06 at 22 17 04

@DustyReagan DustyReagan merged commit 80675dc into trunk Feb 6, 2025
22 checks passed
@DustyReagan DustyReagan deleted the add/reader-as-default-page branch February 6, 2025 23:43
@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 6, 2025
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.

3 participants