-
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
Fix the styles of Jetpack Cloud Settings section #41715
Conversation
- Initializing block with pulse effect - Use flex to align status block and the icon - Use the correct icon - Updated the font size
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Webpack Runtime (~71 bytes added 📈 [gzipped])
Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded. App Entrypoints (~43 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~779 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. 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. |
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.
@cleacos , we have a HOC that gives you all the functionality you to make this form work. It lets you define any UI for the form without worrying about the functionality (this HOC will give you everything by prop).
Here is the component: https://github.com/Automattic/wp-calypso/blob/master/client/landing/jetpack-cloud/components/with-server-credentials-form/index.jsx
And here is an example of how you can use it: https://github.com/Automattic/wp-calypso/blob/master/client/landing/jetpack-cloud/components/server-credentials-form/index.jsx
^ Notice how we the ServerCredentialsForm
is wrapped by the withServerCredentialsForm
HOC.
In short, if we reuse that component, we could remove the logic part of this new form.
@rcanepa thank you for showing me the existing component. But I'll need to update that component for this case, this is for a section so we don't need the Cancel button and also I'll ask Yvonne about the design, basically about the hidden options and if the Save credentials button is okay like that. |
@cleacos I don't think you need to modify anything for that reason. If you only use the |
role="main" | ||
siteId={ siteId } | ||
labels={ { | ||
save: translate( 'Save credentials' ), |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 18 times:
translate( 'Save credentials and fix' )
ES Score: 7
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.
LGTM!
The next iteration could include using a placeholder for the whole form while the credentials are being fetched or we could disable the inputs while that is happening.
Changes proposed in this Pull Request
Fix a few styles of the Jetpack Cloud Settings section:
Asana Card: 1142395350490785-as-1173118334902107
I copied completely the RewindCredentialsForm component from Calypso to be able to change styles and the icon position. Also, this allows us to have control of the design.
Before
Now
Loading block:
![image](https://user-images.githubusercontent.com/9832440/80820219-627b6800-8bce-11ea-82c2-51cb1e83430e.png)
The expected icons, centered:
![image](https://user-images.githubusercontent.com/9832440/80819821-a457de80-8bcd-11ea-984a-0cd403f73cf4.png)
![image](https://user-images.githubusercontent.com/9832440/80819769-8b4f2d80-8bcd-11ea-98d5-78897f68d583.png)
Testing instructions