-
Notifications
You must be signed in to change notification settings - Fork 58
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
Slot/Fill pattern with Toolbar #199
Conversation
Update: Currently I am fixing the tests. |
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.
Spotted a small typo, and really wanted to try GitHub's new suggest code feature 😁
this.props.focusBlockAction( clientId ); | ||
} | ||
|
||
focusDataSoruceItem(clientId: string) { |
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.
focusDataSoruceItem(clientId: string) { | |
focusDataSourceItem(clientId: string) { |
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.
Fixed.
@@ -51,9 +52,24 @@ export default class BlockManager extends React.Component<PropsType, StateType> | |||
} | |||
|
|||
onBlockHolderPressed( clientId: string ) { | |||
this.focusDataSoruceItem(clientId); |
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.
this.focusDataSoruceItem(clientId); | |
this.focusDataSourceItem(clientId); |
If you have your |
Nice work @marecar3 ! Tried the PR locally and it seems something goes wrong with the number by the heading buttons (check out the "2", the "3" and the "4" in the Android screenshot below): |
You will have to wrap every block with |
@@ -64,13 +65,15 @@ export default class BlockHolder extends React.Component<PropsType, StateType> { | |||
} | |||
|
|||
return ( | |||
<Block | |||
<BlockEdit |
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.
Check also https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/block-list/block.js#L451-L462 for reference. It seems to look good at first glance.
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.
Thanks @gziolo !
# Conflicts: # gutenberg
@marecar3 - I'm removing my assignment for the time being (for transparency) as I won't be able to focus on this PR for at least a few days. Sorry! |
Hey @diegoreymendez , np, thanks for the update! |
# Conflicts: # gutenberg
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.
I approved the Gutenberg PR, so this is good to go after that one is merged and the tests are fixed
…g-mobile into fix/block-mergin-remove-red-screen * 'master' of https://github.com/wordpress-mobile/gutenberg-mobile: Slot/Fill pattern with Toolbar (#199) # Conflicts: # gutenberg
…g-mobile into fix/167-merge-block-loosing-content * 'master' of https://github.com/wordpress-mobile/gutenberg-mobile: Slot/Fill pattern with Toolbar (#199) # Conflicts: # gutenberg # yarn.lock
Description
This PR resolves part of the Toolbar issue. It adds support for Slot/Fill pattern with Toolbar which results in porting list item Toolbar on the bottom of the screen (or on top of the keyboard).
Slot/Fill pattern with Toolbar
What's done :
Context (Consumer, Provider) pattern with Toolbar
How has this been tested?
It is tested against this PR