Skip to content

Comments

Fix Help Center in /start when the user signs up without redirects#101843

Merged
escapemanuele merged 9 commits intotrunkfrom
fix/help-center-in-difm
Mar 25, 2025
Merged

Fix Help Center in /start when the user signs up without redirects#101843
escapemanuele merged 9 commits intotrunkfrom
fix/help-center-in-difm

Conversation

@alshakero
Copy link
Member

@alshakero alshakero commented Mar 25, 2025

Proposed Changes

When the user signs up without hard-redirects, the client/controller doesn't have the ability to switch to the logged in layout because it is still outside React reactive cycle. What Calypso does in this case is it keeps rendering LayoutLoggedOut even after the user logs in.

  • This adds the Help Center to the LayoutLoggedOut
  • To reloads the proxy on auth to hydrate tokens and what not
  • It fetches the user to update the Redux store with the new auth data.

Why are these changes being made?

  • DIFM flow needs the Help Center to be available for users right after log in.

Testing Instructions

  • Make this hook return true
  • Go to /start/do-it-for-me/new-or-existing-site?flags=signup%2Fhelp-center-link, logged out
  • Signup with email
  • Try to click on "Questions? Contact our..."
  • The Help Center should open and a chat should start successfully.

@github-actions
Copy link

github-actions bot commented Mar 25, 2025

Copy link
Member Author

Choose a reason for hiding this comment

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

This is moved verbatim from LayoutLoggedIn.

@matticbot
Copy link
Contributor

matticbot commented Mar 25, 2025

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

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

Details
name         parsed_size           gzip_size
entry-main        +980 B  (+0.0%)     +240 B  (+0.0%)
entry-login       +980 B  (+0.0%)     +240 B  (+0.0%)

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

Sections (~46 bytes added 📈 [gzipped])

Details
name    parsed_size           gzip_size
signup       +158 B  (+0.1%)      +46 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.

@alshakero alshakero marked this pull request as ready for review March 25, 2025 14:12
@matticbot
Copy link
Contributor

matticbot commented Mar 25, 2025

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

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

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/help-center-in-difm on your sandbox.

@escapemanuele escapemanuele self-requested a review March 25, 2025 15:32
@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 Mar 25, 2025
Copy link
Contributor

@escapemanuele escapemanuele 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 this solves the problem!

@escapemanuele escapemanuele merged commit 628fce4 into trunk Mar 25, 2025
13 checks passed
@escapemanuele escapemanuele deleted the fix/help-center-in-difm branch March 25, 2025 19:44
@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 Mar 25, 2025
@arthur791004
Copy link
Contributor

We've reverted this change because of p1742968249042509-slack-C02FMH4G8.

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.

4 participants