-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add Featured Banner to Image Block #14451
Conversation
This commit is mostly for testing purposes, I've updated GutenbergEditorFragment.java with a function called "onSetFeaturedImageButtonClicked" and want to test the results.
This commit updated reference to latest gutenberg-mobile commit.
This commit introduces code that sets a featured image when the "set as featured" button is clicked from an image block. A function within "EditPostSettingsFragment" is currently utilised for this purpose, though this is likely not the optimal approach.
This commit cleans up some of the changes that have been made to the GutenbergEditorFragment file, deleting unused/commented out code, etc.
Fix some issues with spacing
This commit introduces an "OnSetFeaturedImageListener" and moves new featured image related functions to it from "OnMediaLibraryButtonListener".
The main purpose of this commit is to replcace the current Toast confirmation when a featured image is set with a Snackbar.
…turedImageId" This commit introduces a "removeFeaturedImage" function to allow users to remove a featured image directly from the image block. It also updates the name of the "onGetFeaturedImageId" to "checkIfFeaturedImage" in order to better reflect its current purpose.
…uredImageId" This commit updates "onRequestFeaturedImageId" to "sendToJSFeaturedImageId", in order to clarify the purpose of the function.
The SnackBar is currently necessary for when a featured image is removed, so removing for now.
This commit enables tracking for the image block's two new featured image buttons ("set as featured image" and "remove as featured image").
👋 Siobhan. A quick comment on the branch name: we generally try to follow the git branch naming pattern of In this particular case here, something like |
WordPress/src/main/java/org/wordpress/android/ui/posts/editor/EditorTracker.kt
Outdated
Show resolved
Hide resolved
c31464f
to
181c7d1
Compare
Also tested setting and clearing the featured image for a classic editor post and works fine ✅ |
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!
For visibility, I've left some info on how to move forward in WordPress/gutenberg#30806 (review).
Hey @SiobhyB! Bumping this to |
@JavonDavis, thank you and apologies for not updating this myself! I can confirm that 17.3 is the release we're now aiming for with this PR. |
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!
The intention behind this change is to make the function's purpose clearer. It also moves the naming inline to this feature's Android counterpart. (See: wordpress-mobile/WordPress-Android#14451.)
Paritial fix for: wordpress-mobile/gutenberg-mobile#1011
gutenberg-mobile
: wordpress-mobile/gutenberg-mobile#3371gutenberg
: WordPress/gutenberg#30806This PR introduces a Featured banner, which overlays a post's featured image when it's added to an image block. This will make it clear to users which of their images, if any, are set as the post's featured image.
To test: Please refer to the Gutenberg PR as the central place for steps to tests and screenshots.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.