-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
RNMobile - Insert a new Paragraph block when pressing Enter on end of captions #22928
Conversation
Size Change: +765 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
I created #22934 to add it to the other blocks. :) |
I will revert the video block web changes in this PR then. |
insertBlocksAfter( | ||
createBlock( 'core/paragraph' ) | ||
) | ||
} |
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 don't think the changes in this file have any effect on mobile because mobile uses a couple the mobile-only caption components (BlockCaption
, which wraps Caption
)in video/edit.native.js
. Just noting that for mobile we have those separate components for captions, whereas iirc on web the captions were being created from scratch (although it sounds like that may be changing).
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.
The idea was to implement the caption break on video web, but it looks #22934 addressed that. So this will go away!
This wasn't working for me on Android, but adding the I also noticed that the captions for a Gallery block (either for the individual images or for the gallery as a whole) do not seem to be splitting. It seems like we would want the caption for the entire gallery block to split, but it looks like #22934 may address that. |
@mchowning it looks your fix for Android is working great! I also added support for the caption in the gallery. But only for the caption for the full gallery. Do you mind to give it another look? |
@mchowning after merging master to this branch we now also the same feature in pullquote and quote name citations. |
I'm seeing that the paragraph block only gets created if the cursor is at the end of the caption when you press Enter, if it is anywhere else, then pressing Enter does nothing. I'm seeing this on both platforms with the image, video, and gallery block captions. UPDATE: @SergioEstevao alerted me to the fact that this is the same behavior that we have on the web. Doesn't feel like great UX to me, but even if we wanted to address that, this PR is not the place to address that. Just bringing us in line is a great step forward, so 👍 |
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!
Description
Updated the Image block on mobile to have the same behavior as the web, and insert a new paragraph block when pressing Enter.
I also added the same behavior for the Video block captions on mobile and web (@ellatrix any reason this was not done when added to the Image block?)
How has this been tested?
This can be tested on GB-mobile using this PR: wordpress-mobile/gutenberg-mobile#2352
Screenshots
Types of changes
Checklist: