-
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] Embed Block caption field #32226
Conversation
Size Change: +8 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
const showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL; | ||
//const showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL; | ||
const showEmbedPlaceholder = 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 have to hide the embed placeholder to test the PR but I'd revert this change once it's approved.
<View style={ styles[ 'embed-preview__placeholder' ] }> | ||
<Text style={ styles[ 'embed-preview__placeholder-text' ] }> | ||
Embed Preview will be directly above the Block Caption | ||
component when it is implemented. | ||
</Text> | ||
</View> |
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 placeholder will be removed once we include the preview content which will be addressed in this issue:
wordpress-mobile/gutenberg-mobile#3275.
@hypest The PR is ready to review, most of the work was already done so I only applied some improvements and conducted testing. So far everything looks fine but I'd like to note that there're a couple of code blocks that have been included only for testing purposes (described in the PR description), once the PR is approved we should remove them before merging. |
Renders properly ✅ Verify that unselecting the Embed block causes the empty caption to disappear. HTML output is valid ✅ Add an Embed block. |
Good catch! I'll review this part on Android, we're using the |
tbh, I don't feel that's enough of a blocker for this PR, if the caption doesn't get selected. I might even argue that it shouldn't be selected upon adding a new embed block since the caption is not the primary interaction entry point for this particular block (the URL is). |
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! Awesome work here @jd-alexander and @fluiddot !
Feel free to remove the testing code if you want, before merging.
744939c
to
9f14b7e
Compare
Description
This PR implements the Embed Block caption functionality.
Gutenberg Mobile PR: wordpress-mobile/gutenberg-mobile#3552
gutenberg/packages/block-library/src/embed/edit.js
Lines 87 to 92 in 93def61
How has this been tested?
Note: Currently, the
EmbedPreview
is not available so aText
component simulates it's position within the container. The Embed Preview will be implemented here wordpress-mobile/gutenberg-mobile#3276Renders properly
Embed Placeholder
is disabled so theEmbedPreview
can be rendered without setting a link. ( Link setting was implemented in Embed Block Bottom Sheet to set a link wordpress-mobile/gutenberg-mobile#3436RichText
component to lose focus.HTML output is valid
Embed Placeholder
is disabled so theEmbedPreview
can be rendered without setting a link. ( Link setting was implemented in Embed Block Bottom Sheet to set a link wordpress-mobile/gutenberg-mobile#3436<br>
on line-breaks.Screenshots
iOS Light Mode
iOS Dark Mode
Android Light Mode
Android Dark Mode
Types of changes
EmbedPreview
component was recreated here even though there's a WIP of it in [Embed block] Fetching embed preview and loading UI wordpress-mobile/gutenberg-mobile#3275 this was done for demonstration purposes.Checklist:
*.native.js
files for terms that need renaming or removal).