Fix resizing for formatting blocks#2562
Conversation
|
|
||
| export const MIN_BLOCK_WIDTH = 40; | ||
| export const MIN_BLOCK_HEIGHT = 30; | ||
| export const MIN_BLOCK_HEIGHTS = { |
There was a problem hiding this comment.
Can we somehow consolidate this with getDefaultMinimumBlockHeight?
There was a problem hiding this comment.
Hmm, I'm not sure because one of these is used for the initial default height and the other one is for the minimum allowed resizing. The minimum allowed heights don't necessarily make sense as the default heights. Thoughts?
There was a problem hiding this comment.
Fair enough. A mention in the docs would be helpful though.
assets/src/stories-editor/components/higher-order/with-amp-story-settings.js
Outdated
Show resolved
Hide resolved
| blockElementId={ `block-${ clientId }` } | ||
| initialAngle={ rotationAngle } | ||
| className="amp-story-editor__rotate-container" | ||
| angle={ rotationAngle } |
There was a problem hiding this comment.
Looks like this causes prop type invalidation when rotationAngle is undefined. I guess we need to make the prop optional in the prop types definition.
Will have a look.
|
@miina The test for the
The |
Thanks! Added |
|
@miina Does the table block also look like this for you? |
|
Hmm, it doesn't look exactly like this but it's definitely off, the styling. Checking shortly |
Should look better now. |
|
@kienstra If you have time, would you mind testing this PR a bit as well? |
|
Sure, @miina! I'll test it now. |
|
There's a merge conflict that should be resolved prior to testing. |
|
Fixed conflicts now |
kienstra
left a comment
There was a problem hiding this comment.
Approved
Hi @miina,
This looks good, and works as described.
I also saw that resizing isn't allowed for the Verse and Preformatted blocks.
And there's a good minimum height for the Table and Code blocks:
|
Thank you for testing, @kienstra. |



Fixes #2553.
Does the following: