-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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] Add Featured Banner to Image Block (iOS Only) #31347
[RNMobile] Add Featured Banner to Image Block (iOS Only) #31347
Conversation
…ImageId() over the bridge gutenbergFeaturedImageId() will be used to gather the initial ID of a post's featured image when the editor first loads in iOS.
…featured image over the bridge
Size Change: 0 B Total Size: 1.31 MB ℹ️ View Unchanged
|
"border-radius" doesn't function as intended on iOS devices without use of "overflow: hidden".
…er.swift This is to align the code in the demo file with the code in GutenbergBridgeDataSource, so that it runs as expected.
90b2904
to
f32618a
Compare
…/featured-badge-ios
…/featured-badge-ios
bef850d
to
b43d6f6
Compare
…/featured-badge-ios
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.
Approved, LGTM!
@illusaen, thank you again for the review! Following our Slack conversation, I just want to double-check here whether you had anything else in mind before merging. If not, I've now set myself as the assignee on all three PRs and will start the merge domino once you give the thumbs up. :) |
…ctly from Image Block (iOS Only) (#31345) * Update CHANGELOG.md with feature details * [RNMobile] Add Featured Banner to Image Block (iOS Only) (#31347) Add a "featured" banner that overlays the image block on iOS devices. * [RNMobile] Add "Set as Featured Image" Button to Image Block (iOS Only) (#31415) Add "Set as Featured Image" Button to Image Block * Update CHANGELOG.md
Paritial fix for: wordpress-mobile/gutenberg-mobile#1011
gutenberg-mobile
: wordpress-mobile/gutenberg-mobile#3390WordPress-iOS
: wordpress-mobile/WordPress-iOS#16332The main PR for the branch this individual PR will be merged into,
add/featured-functionality-to-image-block-ios
, can be found here: #31345Description
This PR introduces a Featured banner, which overlays a post's featured image when it's added to an image block. This will make it easier for users to identify which of the images in their posts, if any, are set as featured directly from the editor.
Note: This PR introduces the Featured banner on iOS devices only, building on the work done in #30806 to add the banner to Android devices.
How has this been tested?
Test Case 1: General Flow
To start with, an image block should be updated to reflect whether its image is featured or not when set via the general Post Settings flow:
Test Case 2: "Editor Loads" Flow
Next, we should verify that a Featured banner appears when a post with a featured image is first loaded. To test this, follow these steps:
Test Case 3: "Replace in Image Block" Flow
Finally, it's possible to replace an image directly within the image block's settings. We need to verify that the Featured banner updates as expected depending on the image that's chosen for an image block:
Screenshots
Types of changes
This PR introduces a new feature (non-breaking change which adds functionality).
In #30806, changes were introduced to display a
Featured
banner on Android devices. That PR can be referred to for further details on the badge component that's used for the banner and the logic for storingfeaturedImageId
in the image component's edit.native.js file. To build on those changes and display the banner on iOS devices, the following main changes were introduced to the code:gutenbergFeaturedImageId
is passed over the bridge to gather any initial featured image ID when a post is first loads.Checklist:
*.native.js
files for terms that need renaming or removal).