-
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
[Mobile] Add support for full width/wide alignment options #24598
Merged
geriux
merged 28 commits into
master
from
rnmobile/feature/full-width-wide-align-support
Sep 4, 2020
Merged
[Mobile] Add support for full width/wide alignment options #24598
geriux
merged 28 commits into
master
from
rnmobile/feature/full-width-wide-align-support
Sep 4, 2020
Conversation
This file contains 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
…filter unsupported blocks
geriux
added
[Status] In Progress
Tracking issues with work in progress
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
labels
Aug 17, 2020
Size Change: 0 B Total Size: 1.2 MB ℹ️ View Unchanged
|
This was referenced Aug 19, 2020
…ted border for full width blocks
… for inner blocks
… for smaller screens
lukewalczak
reviewed
Sep 1, 2020
lukewalczak
reviewed
Sep 1, 2020
lukewalczak
reviewed
Sep 1, 2020
packages/components/src/mobile/readable-content-view/index.native.js
Outdated
Show resolved
Hide resolved
lukewalczak
reviewed
Sep 1, 2020
packages/components/src/mobile/readable-content-view/index.native.js
Outdated
Show resolved
Hide resolved
lukewalczak
reviewed
Sep 1, 2020
packages/block-editor/src/components/block-list/block-list-item.native.js
Outdated
Show resolved
Hide resolved
Hey @lukewalczak thanks for the review! I've updated the code and the builds for another round of review, thanks! |
…port # Conflicts: # packages/block-library/src/image/edit.native.js
Tested on both platforms and works as expected 🎉 Great work @geriux! |
lukewalczak
approved these changes
Sep 4, 2020
6 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Gutenberg Mobile PR
-> wordpress-mobile/gutenberg-mobile#2559WordPress iOS PR
-> wordpress-mobile/WordPress-iOS#14679WordPress Android PR
-> wordpress-mobile/WordPress-Android#12720Description
This PR adds full width / wide alignment options to mobile. For the first iteration it will support only some blocks,
Group
,Cover
, andImage
block.Since we needed to filter the wanted blocks that we are going to support first, there's a new native version of the
align
hook, that uses the current functionality but adds a new filter to only show these alignments for the desired blocks.There's a native file as well for the
defaults
file which reexports the same content but enabling thealignWide
setting. This way we reuse the same code but adding something extra for mobile.Most of this new logic goes into the
block-list-item
component. It will recalculate the horizontal margin depending on the block's alignment option and its parent block as well.How has this been tested?
Steps to test full-width alignment
---Full-width alignment with an inner block
Full width
Full width
Full-width alignment without inner blocks
Full width
Full-width alignment with some inner blocks
Full width
Full width
Steps to test wide alignment
---Wide alignment with an inner block
Wide
Full width
Wide alignment without inner blocks
Wide
Full-width alignment with some inner blocks
Full width
Wide
Screenshots
iPhone
Android Phone
iPad 11 inch
Types of changes
Checklist: