tfonteyn / NeverTooManyBooks

A book collection app for Android
GNU General Public License v3.0
66 stars 2 forks source link

[Feature request] Change pop-up menu to bottom sheet #47

Closed ngocanhtve closed 1 week ago

ngocanhtve commented 1 month ago

Bottom sheet is part of Material Design 3, it helps make options more within reach of the finger in today's context of long and large phone screens.

I found that the pop-up menus below is both small and high, making it difficult to optimize use:

It would be great if a long press on the book cover revealed a bottom sheet, a common behavior of Google's Material Design 3 apps, which would really help optimize app usability.

tfonteyn commented 1 month ago

now this is a great proposal.

I personally have hated that popup menu myself as it kept growing with far too many options.

This will get priority (after I finish with #14 )

tfonteyn commented 1 month ago

It's going to be more work then I expected/remembered.

The current code is using the Android "Menu/MenuItem" API extensively. Which that bottom-sheet does not support; the bottom-sheet is really only a container for custom content. So I'll need to redo quite a bit of code (or duplicate a lot of code which for me is not an option as it's devastating in the long term)

ngocanhtve commented 1 month ago

I will agree with your decision.

tfonteyn commented 3 weeks ago

I have this implemented and working now, but I'm not completely satisfied with some of "Menu/MenuItem" migrations. I'll give it a rest and focus on another issue (with OpenLibrary images) and then revisit.

tfonteyn commented 3 weeks ago

ok - I'm happy now with how a bottom-sheet works for the context menus in the book-list.

I need a second opinion - please note I may ignore this :-D

In the past I had two styles:

Right now, I have:

Options:

I've not converted the style-picket to a bottom-sheet yet, that's next on my list to review/do. I'm tempted to do a release with the goodreads/openlibrary (and some other things) first, and postpone this bottom-sheet functionality to the release after that.

tfonteyn commented 3 weeks ago

thinking out-loud.... the filter dialog should also be converted to be consistent with the Styles picker.

ngocanhtve commented 2 weeks ago

should I add a preference setting so the user can choose whatever they like best:

I think this is a great choice!

tfonteyn commented 2 weeks ago

meanwhile.... two dozen Dialog-to-BottomSheet later...

It's taking some time... I like my apps to be consistent in behaviour so I decided to go ahead with revamping all (or nearly all) of the dialogs (a menu is just a dialog after all) to a dual Dialog/BottomSheet structure.

I've already taken into mind to provide such a preference setting, so effectively adding it will be fairly easy.

I'm slowly getting there.

tfonteyn commented 2 weeks ago

@ngocanhtve

The functionality is now almost complete and settings have been added. Which means there are some new strings that need translating. Could you please take a look? Not urgent, I'm still adding some other enhancements.

ngocanhtve commented 2 weeks ago

Which means there are some new strings that need translating. Could you please take a look?

I have done it.

tfonteyn commented 1 week ago

Hello @ngocanhtve

I had to add some strings and change two longer ones. I've used google to translate, but I think it's best if you could check them please?

I've marked them "need editing" in weblate.

cheers!

ngocanhtve commented 1 week ago

but I think it's best if you could check them please?

Most of the strings are translated quite clearly, I have unchecked "Needs editing".

tfonteyn commented 1 week ago

Here you go ... 6.0.0 apk

It's possible that the menus/dialogs need extra tuning, so please feel free to log a new issue if/when you have suggestions of course. I've been using the build myself and applied several tweaks already, but I'm likely to come across more.

ngocanhtve commented 1 week ago

Now it's perfect, appreciate your work! 👍👍