Skip to content
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

Mobile: Add image previews to Image block "Replace Featured Image" prompt #30410

Open
SiobhyB opened this issue Mar 31, 2021 · 1 comment
Open
Labels
[Block] Image Affects the Image Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Enhancement A suggestion for improvement.

Comments

@SiobhyB
Copy link
Contributor

SiobhyB commented Mar 31, 2021

This enhancement request builds on the work done to implement a "set as featured" button in the image block's settings in wordpress-mobile/gutenberg-mobile#1011.

At the moment, a user is greeted with the following dialog when they click the "set as featured" button while their post already has a featured image set:

As suggested here by @iamthomasbishop, it'd be useful to provide users with more details about their current featured image, to prevent them having to go diving back into post/page settings. This could potentially work in a similar way to how we display a preview of an image's focal point in the Cover block settings (sans the crosshairs and top-right button):

112934009-84cf7b80-90e6-11eb-9a97-dab7ea93082b

@SiobhyB
Copy link
Contributor Author

SiobhyB commented Aug 30, 2021

Developer Notes

The code for the dialogs currently live on the native side, in the following places:

Android

iOS


To refactor the dialog, the code will need to be removed from the native side and recreated in the ImageEdit component. It'd most likely make sense to call it from the onSetFeatured function here, before the new featured ID is sent over the bridge via setFeaturedImage: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/image/edit.native.js#L462

@dcalhoun dcalhoun added the [Block] Image Affects the Image Block label Sep 2, 2021
@dcalhoun dcalhoun changed the title Mobile: Enhancement to Image Block Setting's "Replace Featured Image" Dialog Mobile: Add image previews to Image block "Replace Featured Image" prompt Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants