-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[FIX] inserter point in mobile app #20195
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
Conversation
|
It also covers below test scenarios from other PR connected with Appender/Separator:
With this one there should be no more regression in changes implemented so far. |
packages/block-editor/src/components/block-list/index.native.js
Outdated
Show resolved
Hide resolved
Tug
left a comment
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.
LGTM 👍
| data={ blockClientIds } | ||
| keyExtractor={ identity } | ||
| extraData={ | ||
| shouldShowInsertionPointBefore || |
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.
we could define a forceRefresh variable that has this value and use it here, it would make this change more explicit
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 would increase code readability
pinarol
left a comment
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.
Tested with the steps provided on WPiOS, this is fixing the issue
* fix inserter point in gutenberg-mobile
* Add view with accesibility label on top of floating toolbar (#20267) * [FIX] inserter point in mobile app (#20195) * fix inserter point in gutenberg-mobile * Make sure that all strong tags are removed from title. (#20291) Co-authored-by: Drapich Piotr <[email protected]> Co-authored-by: Sérgio Estêvão <[email protected]>
Description
Gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#1894

I found an issue with the inserter point in the mobile app. The inserter was rendered even if the Add block bottom sheet was hidden. Look at the screen:
It happens because we removed the
extraDataprop from FlatList. Because of that if thedatais the same (it is the same in the case when we open bottom sheet and hide it- we don't change anything ) therenderItemis not called and we end with the wrong state of list items (they are not re-rendered after change of props).I also fixed the inserter for the first block in an empty post. The Inserter should be rendered instead of a paragraph placeholder.
How has this been tested?
add beforeoradd afterand check if inserter is in the right placeScreenshots
Types of changes
Fix for inserter
Checklist: