[RNMobile] Fixed position of FloatingToolbar on the bottom of the screen#21446
[RNMobile] Fixed position of FloatingToolbar on the bottom of the screen#21446
FloatingToolbar on the bottom of the screen#21446Conversation
|
Size Change: -20 B (0%) Total Size: 842 kB
ℹ️ View Unchanged
|
packages/block-editor/src/components/block-list/block.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/block-list/index.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/block-mobile-floating-toolbar/styles.native.scss
Outdated
Show resolved
Hide resolved
move FloatingToolbar fill from BlockListBLock component
|
Found a new crash on this PR (no crash on gb-mobile develop) tapping the toolbar button to split a Group block into separate blocks.
|
…-floating-toolbar-position
|
thanks for reporting ! Will check that today |
|
I also noticed that it crash after try to remove any block. Already fixed that. The cause was that after ungroup (or delete) block breadcrumbs can not read block icon. I have also add support for RTL according to this comment |
…-floating-toolbar-position
packages/block-editor/src/components/block-list/breadcrumb.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/block-mobile-floating-toolbar/index.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/block-mobile-floating-toolbar/nav-up-icon.js
Show resolved
Hide resolved
packages/block-editor/src/components/block-mobile-floating-toolbar/styles.native.scss
Outdated
Show resolved
Hide resolved
Actually the placement at the bottom isn’t the problem but covering the caret is. I don’t even know if there’s a way on Android to customize the scroll amount relative to caret to prevent the floating toolbar from covering the caret. I wouldn’t bet on it to happen soon considering the amount of work it took on iOS. But i am no Android expert so I’d like to get some opinions from @hypest @maxme. One thing i know for sure is, if we make the floating toolbar take up the full-width on top of the current toolbar then there will be no problem. |
Yea, I just mean the general positioning of the UI component (bottom vs. top) — if/when we were able to address that on Android — but it sounds like that's not likely. So I am okay with shipping Android top-aligned, then we can iterate if it causes problems. I don't think top-aligned is necessarily a terrible option, just less discoverable and less reachable than bottom-aligned.
I would still prefer a top-aligned truly "floating" toolbar over a docked full-width toolbar, but if this performs poorly I do have some ideas for how a full-width toolbar would look. |
Blockers
As Pinar mentioned there is differences between Android and iOS in autoscrolling and I think it's not straightforward to change that at this point.
See below screen for light and dark mode Non-blockers
I have started to investigate how to implement that according to our convo on Slack but do not have worked version because of focusing on behaviour with text blocks.
It's doable and I think it's not a big deal. Do we want to include that feature in this PR @pinarol ? Others
I don't think it's related to FloatingToolbar itself. It's rather something with autoscroll |
This was tried as a part of this PR in a slightly different way(the aim was to scroll to the newly created block but the mechanism needed was the same) and it was reverted because of multiple problems. This is not a straightforward thing to do, so I suggest let's not block this PR for that. Buttons block would really benefit from having this version of the FloatingToolbar because the current one pushes the button down and it looks jumpy. Same for Columns when stacked horizontally. |
I suggest starting implementing this right after this PR considering that this was listed below non-blockers. I really prefer to have this PR merged asap to get rid of the jumpiness of individual Button blocks when stacked horizontally with other Buttons. |
Ok so I will prepare builds after adjustments pointed as a blockers. After it gets Thomas approve as well as code review approve from @dratwas it can be merge |
packages/block-editor/src/components/block-list/subdirectory-icon.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/floating-toolbar/index.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/floating-toolbar/index.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/floating-toolbar/index.native.js
Outdated
Show resolved
Hide resolved
packages/block-editor/src/components/floating-toolbar/index.native.js
Outdated
Show resolved
Hide resolved
…-floating-toolbar-position
|
Refreshed build are here: @iamthomasbishop it also includes merged Buttons so you can check how FloatingToolbar works with them as well |
|
@jbinda This is feeling pretty solid! The visual changes look good, and I don't think any of the additional requests I had should stop this from iteration shipping (the animations, scrolling to the selected block, etc). Great work!! |
|
@jbinda One tiny thing: I noticed while testing on Android that the toolbar background isn't using the updated |
|
@iamthomasbishop ok I will check that and fix edited I have checked o the Emulator and it seems it has proper color:
I have also check production build on device and it looks like this: Can you also post some screenshot from your side ? |
|
As discussed on Slack I have also spot that issue on different Emulator with Android 9 (which does not support dar theme) and be able to fix that so probably will prepare fresh build (only for Android) to confirm on your side. edited Build for Android: APK 46462 |
| visible={ isTemplatePickerVisible } | ||
| /> | ||
| ) } | ||
| { Platform.OS === 'ios' && <FloatingToolbar /> } |
There was a problem hiding this comment.
Cleaner here in layout than in the old BlockListBlock location, nice!
cameronvoell
left a comment
There was a problem hiding this comment.
This change is working well in my tests on iOS and Android. Top of screen location on Android seems like a workable solution to me, seeing the limitations related to keyboard handling. Great work!
![]()
|
Thank you al for checking this ! |










Description
This PR changes behaviour of
FloatingToolbarto align with guideline from this issue. It will be positioning absolutely at the bottom of the screen.Please also refer to:
Related gutenberg-mobile PR
Related gutenberg-mobile issue
Testing branch on WP iOS and WP Android:
WordPress-iOS: here
WordPress-Android: here
How has this been tested?
initial-htmlDetails
Screenshots
LTR vs RTL mode
Types of changes
Refactor - change the FloatingToolbar placement and behaviour
Checklist: