-
Notifications
You must be signed in to change notification settings - Fork 62
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: Block max content width #2694
base: develop
Are you sure you want to change the base?
Conversation
🤖 Pull request artifacts
|
Size Change: +10.8 kB (+1%) Total Size: 2.12 MB
ℹ️ View Unchanged
|
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.
Does the bug only happen in nested columns like that's described in the issue? If it so, then maybe the fix should only be applied only in that scenario.
I'm afraid the current fix (adding a style to .stk-inner-blocks > .stk-block
) will affect all our blocks and might have unforeseen consequences.
Please refactor to fix only the specific scenario where the issue is seen: so far the issue says that it happens on a columns > inner column > columns nesting. are there other scenarios?
hasUnits="px" | ||
valueCallback={ ( value, getAttribute ) => { | ||
const blockWidth = getAttribute( 'width' ) | ||
return blockWidth ? 'inherit' : '' |
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.
Please use undefined
here, I think there's a chance that the style might show up if it's an empty string.
return blockWidth ? 'inherit' : '' | |
return blockWidth ? 'inherit' : undefined |
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.
Found an issue: if you perform the issue in tablet/mobile only, then the issue still persists. There's a 3rd argument device
that you can use:
valueCallback={ ( value, getAttribute, device ) => {
The issue has been fixed but it affected single blocks. Remaining issue:
Screen.Recording.2023-06-16.at.11.35.10.AM.mov |
fixes #2502