-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[RNMobile] Gallery - Native gallery component draft #18176
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2edfe43 to
1801c53
Compare
This was referenced Nov 5, 2019
Closed
75d8a12 to
6b4cf2c
Compare
3 tasks
ad821a3 to
8bf5801
Compare
6b4cf2c to
3edb3eb
Compare
8bf5801 to
6f1556f
Compare
3edb3eb to
4190b97
Compare
6f1556f to
095d2a0
Compare
4190b97 to
8b1e8b3
Compare
095d2a0 to
f66567b
Compare
ac55dd8 to
85b45af
Compare
f66567b to
91368e0
Compare
85b45af to
1e403ff
Compare
91368e0 to
2aa8448
Compare
1e403ff to
7a3fa58
Compare
pinarol
reviewed
Nov 25, 2019
2aa8448 to
deafd68
Compare
7a3fa58 to
f030539
Compare
deafd68 to
e2c7e4c
Compare
f030539 to
3696fbf
Compare
0234c1a to
4794e73
Compare
f27005b to
7fb31dc
Compare
4794e73 to
1248af6
Compare
7fb31dc to
d05dc84
Compare
1248af6 to
6f2bbb9
Compare
* Add append logic to MediaPlaceholder for gallery * Fix lint errors
d05dc84 to
3fcb972
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Gallery
Affects the Gallery Block - used to display groups of images
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a native
Gallerycomponent for the semi-cross-platform Gallery block. The purpose of this component is to render a list of images passed via theimagesprop.PR Hierarchy
This PR is part of the PR hierarchy described here. This PR can be tested with the aggregate changeset and integration of components within the related PRs by checking out the branch of the "top level" PR: #18265 via the
gutenberg-mobilePR: wordpress-mobile/gutenberg-mobile#1498.MediaPlaceholder
Changes to
MediaPlaceholderfrom this PR: #18262 have been merged for review here. TheMediaPlaceholdercomponent has been modified to append media for the nativeGalleryimplementation.On web, when new media is added to a gallery, the current selection of items in the gallery is available to the media selection interface, and can be presented as such to the user. The selector behaves more like a "gallery editor", in the sense that the selection is modified (users can add and / or remove items). On mobile, the interface for selecting media items is handled by the "parent apps", and does not "know" about what is currently selected as part of the gallery.
This PR adds the
addToGalleryprop to theMediaPlaceholdercomponent, and conditionally appends media items to the current selection, passing the resulting collection back throughonSelectwhen theaddToGalleryflag is set. When theaddToGalleryflag is not set,onSelectbehavior is not modified.Note: In this implementation, duplicates are removed from the collection via the
idproperty, since this is used as akeyin the list of elements that renders these items.The MediaPlaceholder
The changeset here is used in the related "parent" PR: #18111, which includes these changes integrated with related changes in other components necessary for the gallery block.
Block-level caption
This component uses the mobile
Captioncomponent to add a block-level caption for gallery.To test
Test this component by checking out the branch of the "top level" PR: #18265 via the
gutenberg-mobilePR: wordpress-mobile/gutenberg-mobile#1498.Checklist: