-
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
Add the authorization Step for the Application Passwords #96891
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: Sections (~245 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 (~16 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. |
0bd4911
to
228b6f3
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 |
c0268d0
to
4a0deb8
Compare
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.
Here's a bunch of small design differences that doesn't match the figma file:
- Spacing between the title and the paragraph below
- The site URL should be bold
- Spacing between paragraph and CTA button
- The weight of the
Share credentials instead
link is different - Spacing between
Share credentials instead
link andHere's what else you're getting
title is different - Spacing between
Here's what else you're getting
title and the description box is different - The description box items have icons in the figma
- Font size of the description box items is different
Also, the Need help? Let us guide you
link in the top right is missing.
Please tackle the easy fixes and leave the rest for a subsequent PR.
@valterlorran the CTA en the Figma reads |
Screen.Recording.2024-12-04.at.9.46.24.AM.movWhen I click authorize I get redirected to the first step of the flow. Based on the |
We should not override these values to not create inconsistencies with other steps. We should use the default behavior of the component.
Fixed
I’m assuming this means the space between the
I’m using the default link that we have been using in other steps. I think if we decide to tackle that, we should do a refactor.
Fixed
Fixed
Isn’t that showing up for you? Can you share a screen shot?
I used the $font-body-small instead of hardcoding the site and to have consistence. |
… to the step approprieally
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.
The code overall looks good and the happy path seems to be working correctly. I found a couple of blockers.
- When I get redirected to the wp-admin screen to authorize there's no Application Name pre-filled (we should user the
app_name
query param specified here https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/)
- The let us guide you in the top right is still missing
<h3>{ translate( "Here's what else you're getting" ) }</h3> | ||
<AuthorizationBenefits | ||
benefits={ [ | ||
translate( 'Uninterrupted service throughout the entire migration experience.' ), |
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.
where this strings added to the string freeze PR we where using for having translations ready earliear?
This should be working, the thing is that on the testing instructions I didn't add the App ID and App Name, but this should come from the endpoint. In order for that to work just add the app_id and the app_name params to your authorizationUrl: Please see: fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Syvo%2Szvtengvba%2Snhgbzngrq%2Qzvtengvba%2Qgbbyf.cuc%3Se%3Q9r16q365%231171%2Q1178-og |
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.
Based on this comment I think this is in a good state for merging.
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17046536 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 @valterlorran for including a screenshot in the description! This is really helpful for our translators. |
* Add the authorization Step for the Application Passwords * Add the notice when the authorization is request and add the texts * Apply the style to the component * Added the submit logic for the new step * Add the tests * Add the action to skip the error on storing the credentials * Add the redirect to the fallback step * Fix the authorizationUrl parameter name * Try fix the errors * Fix tests * Add the back button logic * Fix the from param * Fix design issues * Fix button test * We should encode the success_url to allow the source site to redirect to the step approprieally * Fix the authorizationUrl parameter
Translation for this Pull Request has now been finished. |
Related to #
Proposed Changes
Adds the new Authorization Step to allow us to capture the Application Password authorization. This step gives the user the possibility to authorize our application so we can use the credentials for the automate checks and tasks.
I also added the possibility of adding
notices
to the Step. I updated the StepContainer to accept a new prop:notice
. And it is displayed before the Formatted Header.Default view
Rejected the Authorization
Error trying to store the Authorization credentials
Why are these changes being made?
Testing Instructions
Visual inspection should be enough, as I added some tests to cover the cases.
To test it manually follow the steps:
/setup/site-migration/site-migration-application-password-authorization
path. Keep the current parameters, and add theauthorizationUrl
, which could be a valid authorization URL for the Application Passwords:https://example.com/wp-admin/authorize-application.php&app_id=1083d914-d9f8-47ec-b49b-55d206104730&app_name=Test
Pre-merge Checklist