fleather icon indicating copy to clipboard operation
fleather copied to clipboard

Responsive toolbar (#274)

Open jacquetc opened this issue 2 years ago • 13 comments

Hello,

For fun, in relation to #274, here is a preliminary work on a toolbar with an overflow menu. image

Left to do:

  • Separators must become horizontal in the menu
  • The menu must close after clicking on an item
  • The Normal/Header widget doesn't display its drop-down menu. Same with color.
  • The Normal/Header widget is a bit big, maybe insert instead an more little version of it in the menu instead ? image

jacquetc avatar Feb 09 '24 17:02 jacquetc

Let me know if the idea is sound for you before I put more work to fix the remaining issues.

jacquetc avatar Feb 09 '24 17:02 jacquetc

This would be GREAT!

All the best,

Aggie85

Aggie85 avatar Feb 11 '24 03:02 Aggie85

I think too that it's a lacking feature. Yet, there are other possible ways to deal with an overflowing menu.

Also, my change feels dirty to me. I'm leveraging the FleatherToolbar.basic() factory. We can create instead a separate FleatherToolbar::overflowing() factory and dedicate a State build() for it, keeping a basic (and easily debug-able) Stateful builder clean for "basic" Toolbar. Bottom line: Adding functionalities, not touching things already running fine.

Trying to see what is possible since I'm learning Dart & Flutter on the go (C++ & Rust background here).

Waiting now for @amantoux or @Amir-P insights since they are active leading contributors. I don't want to break their vision of Fleather.

jacquetc avatar Feb 11 '24 11:02 jacquetc

image With horizontal dividers.

jacquetc avatar Feb 11 '24 11:02 jacquetc

I wonder if we should not propose a radically different layout for small displays.

amantoux avatar Feb 12 '24 14:02 amantoux

A few ideas: blazor-toolbar-item-in-overflow blazor-toolbar-scrolling-touch Sans titre blazor-multi-row toolbar-responsive-md DsxUq

jacquetc avatar Feb 12 '24 14:02 jacquetc

I'm more in favor of what quilljs is doing on their website. It wouldn't break what we have on big screens and makes interaction easier on smaller screens compared to an overflow menu. @jacquetc @amantoux

Amir-P avatar Feb 12 '24 14:02 Amir-P

quilljs's style can eat a lot of vertical space on smartphones if there is too much widgets to display. I'm finding this one to be a good compromise, so it's eating the visual space on demand without breaking the original widgets. 304118662-3bcc466b-a53f-4432-9ff1-1fc00a6c9bac

jacquetc avatar Feb 12 '24 14:02 jacquetc

Google Docs has a dynamic layout for it toolbar on mobile (which I fail to understand the behvior :)) Word provides a minimal toolbar with the possibility to show an advanced version The latter has my preference (screenshots below)

amantoux avatar Feb 13 '24 10:02 amantoux

I am testing it on my phone. I didn't know that it was possible to put something at the bottom. It's quite nice and can be out of the way if there is no focus on the text zone. It would be a nice solution for Android and IOs, yet less for desktop where an always-visible toolbar (or advanced context menu like Office Word) would be preferred.

jacquetc avatar Feb 13 '24 10:02 jacquetc

I am testing it on my phone. I didn't know that it was possible to put something at the bottom. It's quite nice and can be out of the way if there is no focus on the text zone. It would be a nice solution for Android and IOs, yet less for desktop where an always-visible toolbar (or advanced context menu like Office Word) would be preferred.

Yes we would implement entirely different layouts (& behaviors) for desktop and mobile

amantoux avatar Feb 13 '24 11:02 amantoux

@jacquetc Are you planning to move forward on this? Otherwise we will close this PR

amantoux avatar Aug 17 '24 07:08 amantoux

Hello, Beside the little hack I already did, I am too busy with family life to explore further. You can close the PR. You can also merge what was done, which is better than no responsive toolbar at all (I think ?). Regards, Cyril

jacquetc avatar Aug 17 '24 07:08 jacquetc

This has be stale for some time. I'm closing this PR, feel free to re-open when ready to resume

amantoux avatar Dec 29 '24 12:12 amantoux