-
Notifications
You must be signed in to change notification settings - Fork 82
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
audit/KAD-3309 #570
audit/KAD-3309 #570
Conversation
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.
A couple comments, but it's looking good!
@@ -130,9 +142,15 @@ export default function ResponsiveRangeControls( { | |||
<Button | |||
className="is-reset is-single" | |||
isSmall | |||
disabled={ ( ( isEqual( '', value ) ) ? true : false ) } | |||
disabled={ ( ( isEqual( '', value ) ) && ( isEqual( '', tabletValue ) ) && ( isEqual( '', mobileValue ) ) ? true : false ) } |
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'll want to compare the currently set values to the default values
For example isEqual( tabletValue, defaultTablet )
{ reset && ( | ||
<Button | ||
className="is-reset is-single" | ||
isSmall | ||
disabled={ ( ( isEqual( '', value ) ) ? true : false ) } | ||
disabled={ ( ( isEqual( '', value ) ) && ( isEqual( '', tabletValue ) ) && ( isEqual( '', mobileValue ) ) ? true : false ) } |
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'll want to compare the currently set values to the default values
defaultValue={100} | ||
defaultTablet={100} | ||
defaultMobile={100} | ||
reset={true} |
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.
In some blocks we import the block.json to access the attributes ( Ex: import metadata from './block.json';
)
We should do that here and we can pass the actual default values. Like metadata.attriubtes.topSepHeightTab
. If we ever change the default values we don't have to update all the references.
I updated the disabled logic for the components, I imported and used metadata for the divider height and widths, and I updated the block.json attributes for the divider width/height default values. |
I removed the default values I added to the block.json file. I tested it and they are not necessary. I also corrected the default value used for the divider height/width components. |
🎫 #[Jira Ticket]
https://stellarwp.atlassian.net/browse/KAD-3309
https://stellarwp.atlassian.net/browse/KAD-3337
...
Issue Info
Checklist
Block specific checklist (where relevant)
Are there dependent changes in another repository?