-
Couldn't load subscription status.
- Fork 323
Enhancement/10475 siwg block options #11683
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
Conversation
|
Storybook is ready:
|
|
Build files for bf37ad6 have been deleted. |
|
Size Change: +769 B (+0.04%) Total Size: 2.18 MB ℹ️ View Unchanged
|
|
JS test is failing for unrelated reason. E2E nightly is failing for all blocks as it requires V3 of json config, but it is outside of scope of this issue. |
| __next40pxDefaultSize | ||
| __nextHasNoMarginBottom |
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.
SelectControl and TextControl are getting depricated php notices unless these props are included
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.
Let's add some documentation for that in the actual component then, preferably with links to the props or the code you found this in, since without any context these look strange/unintuitive.
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 extracted it from the deprication notice that was raised in CI e2e. Added as short inline comment
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.
Looks good to me and works well, just needs a few things adjusted before merging 👍🏻
| function getSelectValue( value ) { | ||
| return value ?? ''; | ||
| } |
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.
This is probably more "don't repeat yourself" than is needed; it's fine to inline ?? '' for the three values this applies to 😅
| function getSelectValue( value ) { | |
| return value ?? ''; | |
| } |
| __next40pxDefaultSize | ||
| __nextHasNoMarginBottom |
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.
Let's add some documentation for that in the actual component then, preferably with links to the props or the code you found this in, since without any context these look strange/unintuitive.
| <TextControl | ||
| label={ __( 'CSS class', 'google-site-kit' ) } | ||
| help={ __( | ||
| 'Add optional classes to customise the button in the editor and on the frontend.', |
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.
(We supply localisation strings in American English, not International English.)
| 'Add optional classes to customise the button in the editor and on the frontend.', | |
| 'Add optional classes to customize the button in the editor and on the frontend.', |
| __nextHasNoMarginBottom | ||
| /> | ||
| <TextControl | ||
| label={ __( 'CSS class', 'google-site-kit' ) } |
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.
"HTML class" kinda seems more appropriate, but I'm fine with either 😅
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.
Just one question about the version numbers in the comment here, then we're good-to-go. 👍🏻
| options={ createSelectOptions( | ||
| SIGN_IN_WITH_GOOGLE_SHAPES | ||
| ) } | ||
| // Opt in to new WP components styles (6.7–7.1): |
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.
| // Opt in to new WP components styles (6.7–7.1): | |
| // Opt-in to new WordPress components styles (6.7–7.1): |
Also—what do the version numbers mean? Are they the only versions of WordPress that are being opted-in to the new styles? What about pre-6.7 users? We do support older versions of WordPress than 6.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.
I updated the comment to mention this is needed for v6.7+ but it doesn't affect pre 6-7, as it will be ignored
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist