-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Customize Auth flow for Blaze Pro #91095
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~638 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~534 bytes added 📈 [gzipped])
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 (~410 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
16585fd
to
b00e08c
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally
works as described. code changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @timur987, thanks for adding us as reviewers! Nice work here. 👍
First, I think code overall looks good and I confirmed that WooCommerce flow styles are applied correctly. However, I have a few comments:
- I see a couple of UI issues. The UI is not fully consistent with the designs. For example, the font size of footer text is a bit bigger than in the designs and padding between the heading and subheading is smaller. I'd suggest to make sure that the UI is consistent with the designs. But I'll leave it up to you to decide if you want to make these changes or not.
![Screenshot 2024-05-27 at 12 24 39](https://private-user-images.githubusercontent.com/4344253/333964587-a4203730-22f1-44d7-bdd8-1622640a9147.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTY5NTUsIm5iZiI6MTcyMDE5NjY1NSwicGF0aCI6Ii80MzQ0MjUzLzMzMzk2NDU4Ny1hNDIwMzczMC0yMmYxLTQ0ZDctYmRkOC0xNjIyNjQwYTkxNDcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTYyNDE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODI3YjVlMTJmNTFjNzI0MmMyODVlM2UxZDk4MmMzMTVmYWQ2NDUyYWI1YTU5NDliYTFhMTk4NTg2ZWM4NDA1YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.kmTTPw8rWhno9rRtsfWeQnjk5wZiYUAvHkQya5hhw4g)
- The title flashing on the screen for a second before the page is fully loaded. I think there might some heading mismatch in the code.
Screen.Recording.2024-05-27.at.12.35.51.mov
- When I clicked on
Log in here
link, I was redirected to a blank page. I think it should redirect to the login page.
Screen.Recording.2024-05-27.at.12.27.55.mov
- I tried to sign up with an new email, but I got an error
Invalid OAuth2 redirect url
.
![Screenshot 2024-05-27 at 12 31 07](https://private-user-images.githubusercontent.com/4344253/333965082-a4f412d9-3526-451a-a513-7bd376959d57.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTY5NTUsIm5iZiI6MTcyMDE5NjY1NSwicGF0aCI6Ii80MzQ0MjUzLzMzMzk2NTA4Mi1hNGY0MTJkOS0zNTI2LTQ1MWEtYTUxMy03YmQzNzY5NTlkNTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTYyNDE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDkxNjM0MzcxYTYxZmZhOTJjMGYyZTk3ZTZlZGUxNTQxYjNjZDYzNjE3ZjNmNmZlZGU3N2VkZWY1NDAwNzkxYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.K64ajQO-3ZoEcCZgfbjOd_IHIgydiE7qK1mI-4TEOak)
- 2FA screens are WP.com branded. Looks like design is missing for these screens.
![Screenshot 2024-05-27 at 12 33 48](https://private-user-images.githubusercontent.com/4344253/333965289-2dc85882-6393-43f1-b86b-f004219d877b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTY5NTUsIm5iZiI6MTcyMDE5NjY1NSwicGF0aCI6Ii80MzQ0MjUzLzMzMzk2NTI4OS0yZGM4NTg4Mi02MzkzLTQzZjEtYjg2Yi1mMDA0MjE5ZDg3N2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTYyNDE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzFhM2UwMzRjNmY0ZGIwZDA1N2VhNjY5ODY0OWRhZjA0NTg1OGVmYzhlMDdiY2QzODZiYzIxYzY5NWY5MGMyMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.tTzj4dKmjxL64dUWDPm03RTzkn53B5n2r8ySGTQ6zAg)
- We're using passwordless signup for WooCommerce. I'd suggest to use the same for BlazePro as well.
![Screenshot 2024-05-27 at 12 57 40](https://private-user-images.githubusercontent.com/4344253/333968379-3d81055c-050f-4349-8452-acfe107aca4d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTY5NTUsIm5iZiI6MTcyMDE5NjY1NSwicGF0aCI6Ii80MzQ0MjUzLzMzMzk2ODM3OS0zZDgxMDU1Yy0wNTBmLTQzNDktODQ1Mi1hY2ZlMTA3YWNhNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDVUMTYyNDE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzZiY2I5OWI0YzgzNGZjZDk1ODgxYjRlY2FjOWQ0ZWFjYjM3ZGY0MjE2YTIwNWFiMWFlNmY4NDQ1YzRhMzVkNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.tYb0cOBmxbpVUqdt_ymRt0LgKh2GWYRsIxYRTI6rsLw)
Due to inability to authenticate locally, as a sign of being authenticated in WPCOM we should see a screen of already authenticated on WPCOM's side:
Caveat 1: I noticed that for Google Chrome uses "DNS over HTTPS", so for me it's impossible to use it for sandboxing. So, I used Firefox for testing.
Caveat 2: I was not able to have authentication to be working locally. I assume that as long as it will be merged it should work properly due to having wordpress.com instead of calypso.localhost:3000.
To test sign/login flow locally, you can set up a local wordpress.com or wpcalypso.wordpress.com environment by following the instructions in this field guide (PCYsg-5YE-p2 > Running Calypso locally under wordpress.com or wpcalypso.wordpress.com)
My team also created some scripts that use docker to set up a local environment. It's in a private repo. If you want, I can share it with you.
Thanks for such a thorough review @chihsuan! I addressed your comments (118c6ba) and will refer to them in order not to miss anything. UI Issues
Thanks for matching the design. I changed icon to be 32x32px, adjusted padding between the heading and subheading. The only issue I can't find the way to overcome is to use fonts as in design. In particular, Calypso asks to use Title flashing
Indeed there was the discrepancy between the OAuth App name in Calypso's code and in WPCOM Apps. Fixed by changing name in App's settings (here). URL issuesThe following two (3 and 4) are similar:
Sorry for that. I made a mistake (that caused improper URI encoding of redirect URLs) in script for link generation in testing instructions. Updated the script, so now it should work properly. 2FA
Thanks for pointing me, indeed. Addresses it as well. Screen.Recording.2024-05-28.at.11.54.42.movPasswordless signup
Thanks for letting me know. I'll discuss this opportunity with my team. Local setup
Thanks for letting me know. I thing for now the right front-end design is what we need. I think that in case of issues I'll definitely ask you for access to the mentioned private repo. |
@timur987 Thanks for addressing feedback.
You can use
I noticed that on the video recording, when you hovered over the button, the background color changed to WP blue. I think it would be great to fix that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested again and functionality works as expected. 👍
Just left a few comments for UI improvements. Since this doesn't affect the WooCommerce flows and Blaze Pro is not public yet, I'm going to approve this PR and let your team decide on the final design. 🙂
Thanks, @chihsuan for priceless suggestions and TIL moment regarding to using |
)" (#…" This reverts commit 8224f2f.
I have several attempts to deliver this PR but it failed Pre-release tests. Here's the last PR I tried to deliver to production: #91304. |
Related to A8C-DSP's issue
1439
.Proposed Changes
Why are these changes being made?
Designs in Figma.
Testing Instructions
Despite the PR
1520
from A8C-DSP repo is the starting point for running Blaze Pro, we can test changes in Calypso with the use of the following script that generates links for Login and Sign Up (it should be run withnode
).Caveat 1: I noticed that for Google Chrome uses "DNS over HTTPS", so for me it's impossible to use it for sandboxing. So, I used Firefox for testing.
Caveat 2: I was not able to have authentication to be working locally. I assume that as long as it will be merged it should work properly due to having
wordpress.com
instead ofcalypso.localhost:3000
.Login Flow
https://public-api.wordpress.com/oauth2/authorize?response_type=code&client_id=92099&...
),Short demo:
Screen.Recording.2024-05-24.at.14.03.40.mov
Sign Up Flow
(Continue testing)
client/signup/main.jsx:850
in order to show Processing Screen from:to:
http://calypso.localhost:3000/start/wpcc/oauth2-user?oauth2_client_id=92099&...
),Short demo:
Screen.Recording.2024-05-24.at.14.27.51.mov
Pre-merge Checklist