Skip to content
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

Basic UI: remove max-width for buttons #2388

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Feb 22, 2024

Utilise the wasted space instead of wrapping the buttons into multiple rows

before:
image

After:
image

With lots of buttons:
Before:
image

After:
image

@jimtng jimtng requested a review from a team as a code owner February 22, 2024 11:38
@lolodomo
Copy link
Contributor

The idea was to keep a minimum of place for label and value.

@lolodomo
Copy link
Contributor

Your commit of vscode settings is probably unexpected ?

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
@jimtng
Copy link
Contributor Author

jimtng commented Feb 22, 2024

The idea was to keep a minimum of place for label and value.

I haven't tested this with various widths of labels.

Your commit of vscode settings is probably unexpected ?

oops, removed now.

@jimtng
Copy link
Contributor Author

jimtng commented Feb 22, 2024

The idea was to keep a minimum of place for label and value.

Reserving space for the label and value has merits too. I see that simply removing the width here is not enough.

Before:
image

After (bad for the label):
image

I'll play with it a bit more, and I'm open to ideas

@lolodomo lolodomo added the basic ui Basic UI label Feb 23, 2024
@jimtng jimtng marked this pull request as draft February 23, 2024 17:07
@lolodomo
Copy link
Contributor

lolodomo commented Mar 6, 2024

Using 4.2 M1, I can see that I have to increase the zone for buttons to not have controls for a Player item cut on 2 lines on a phone.

And I also see that the buttons in the new settings page are not rendered perfectly on a phone when cut on 2 lines.

@jimtng
Copy link
Contributor Author

jimtng commented Mar 7, 2024

I haven't had a chance to look into this yet, and I'm generally clueless with css. If you have a fix, feel free post it and close this PR.

Ideally, the buttons can take up as much horizontal space as possible, especially when there are no labels or the label is short. This way user can set a blank label to maximise the space for the buttons. But when there's a label, then reserve some space for the label.

@lolodomo
Copy link
Contributor

lolodomo commented Mar 9, 2024

Even with your change, I have strange result like this one:

image

If I increase just a little the window, it is then OK:

image

Maybe the problem occurs when the label is truncated and "..." is injected ?

@lolodomo
Copy link
Contributor

lolodomo commented Mar 9, 2024

I would like to find the proper CSS properties to at least have player controls always on one line when there is enough place for that.

@lolodomo
Copy link
Contributor

lolodomo commented Mar 9, 2024

If I reduce the length of my label, this is then fine:

image

The problem seems to be when the label is truncated.

@jimtng
Copy link
Contributor Author

jimtng commented Mar 9, 2024

The solution would probably include changing the css of the labels and/or the container.
Could we perhaps turn it into two lines (dynamically) when there's not enough space? So the label on top, then controls below it, but if there's enough space, keep them both in one line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants