-
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] fix group appender behaviour #18564
Conversation
@hypest I have provide the GIFs according to test you mentioned from original PR on demo app iOS/Android as well as in WPAndroid app Appender seems to work as described there |
I talked with @hypest on Slack about this PR and we decided to ask you about the design. The issue was that I was unable to open I provide simple solution that brings back ability to open Our conclusion with @hypest was:
|
@jbinda It's a little hard to follow, but based on the "After" gif above, I think that's pretty close to what I'd expect. One change I'd make is to hide the inline appender (inside the group) while the block library bottom sheet is open, so just the "Add block here" indicator is shown in place of that. Maybe I'm missing something, but that's my initial reaction. |
So I assume that is expected behaviour for Now the technical aspects: Like me and @hypest conclude on Slack convo it seems to be "hacky" solution and it treated rather as "hotfix" if we do not found the root cause of described behaviour According to that I have also investigate the flow behind
The next thing to be checked is value of |
Thanks for investigating deeper @jbinda ! Yeah, using |
@jbinda I think yes, it seems like the expected behavior. |
I played again with the behaviour of this issue once again. I came up with the idea to pass Anyway at this moment I have strong opinion that the solution this PR provide is currently the best option to allow show inserter when the group block do not have any children added. The reason behind that is the current structure described in previous comment. Do you have any thought on that since our previous discussion ? |
Here's how I look at this: Looking at the So as it happens, the With the changes in this PR, the ButtonBlockAppender renders an Inserter, the Inserter renders a button via Instead, how about:
Thoughts? |
I totally agree with that flow :) |
*/ | ||
import styles from './style.scss'; | ||
|
||
const AddBlockSeparator = ( { getStylesFromColorScheme } ) => { |
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.
Can we consolidate this new component with https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-list/insertion-point.native.js?
And similarly for the style definitions in https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-list/style.native.scss?
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 haven't realized that there is such a component. However, it seems like insertion-point.native.js
is not used at all. I will move the AddBlockSeparator
into it to be consistent with web names.
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 looks good to me!
I've only left one comment about whether we can consolidate the older BlockInsertionPoint
component with the newer AddBlockSeparator
, but I think that could be done in a separate PR if needed.
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.
Description
Refactor
renderDefautBlockAppender()
to unlock showInserterMenu
in Group block (noticed issue after merge this one.Please also refer to:
Related gutenberg-mobile PR
How has this been tested?
initial-html
initial-html
contentI have also test it according to steps here
Test 1:
Test 2:
Test WPAndroid
Screenshots
Before:
After:
Types of changes
Small refactor to fix group appender behaviour
Checklist: