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

Slightly more compact ui settings #2590

Merged
merged 8 commits into from
May 26, 2024
Merged

Slightly more compact ui settings #2590

merged 8 commits into from
May 26, 2024

Conversation

Alexdnk
Copy link
Contributor

@Alexdnk Alexdnk commented Mar 21, 2024

Changed Radio to Dropdown. If there are a lot of presets, it's a ui problem with Radiobutton.
And i suggest hiding the resolution selection under Accordion.
And simplify the file type selection.
1

Changed Radio to Dropdown.
@Alexdnk Alexdnk requested a review from lllyasviel as a code owner March 21, 2024 06:07
@mashb1t
Copy link
Collaborator

mashb1t commented Mar 21, 2024

Fooocus follows the philosophy of always showing available options, not hiding them behind a select or accordion.
While i get the intention of yours, we still should keep this in mind.

@mashb1t mashb1t added the Size S small change, basically no testing needed label Mar 21, 2024
@xhoxye
Copy link
Contributor

xhoxye commented Mar 21, 2024

Presets can be pulled down because users may create an indefinite number of presets.Alternatively, you can restrict the display of a preset for a specified number and a specified length of text.
QQ截图20240322071532
QQ截图20240322071732

@JulienZLQ
Copy link

Fooocus follows the philisophy of always showing available options, not hiding them behind a select or accordion. While i get the intention of yours, we still should keep this in mind.

I personally can understand the original intention of fooocus, but based on the native fooocus model drop-down options, can it be understood that due to the uncertain number of models, the use of drop-downs is allowed to avoid excessive stacking of options.
If so, other unopened customizations can remain as they are, but it is indeed preset, which has the same uncertainty as the model and can be configured a lot. Will this part be adjusted to a drop-down?

@mashb1t
Copy link
Collaborator

mashb1t commented Mar 25, 2024

Will be reevaluated in a few weeks, background info see #2617 (comment)

@HelloLaohe
Copy link

Fooocus 遵循的理念是始终显示可用选项,而不是将它们隐藏在选择或手风琴后面。 虽然我明白你的意图,但我们仍然应该记住这一点。
I fully support this viewpoint, and believe that intuitiveness is the most important factor. I hope that the style preview images can be displayed directly, without the need for mouse hovering to make them appear.

20240506103658

@mashb1t
Copy link
Collaborator

mashb1t commented May 22, 2024

Proposal 1: add select for presets
screencapture-localhost-7865-2024-05-23-01_10_52

Proposal 2: add select for presets + accordion for resolutions, but fixed to 2 column layout
screencapture-localhost-7865-2024-05-23-01_10_31

screencapture-localhost-7865-2024-05-23-01_17_18

Your feedback is welcome!

@Alexdnk
Copy link
Contributor Author

Alexdnk commented May 23, 2024

Thank you for the review! Please forgive me I am a novice programmer and I am having a hard time understanding code and using GitHub in general.
I suggest removing the word 'Resolution', since it wasn't in the original interface.

with gr.Accordion(label='Aspect Ratios   width × height', open=False) as aspect_ratios_accordion:
	aspect_ratios_selection = gr.Radio(label='Aspect Ratios', show_label=False, choices=modules.config.available_aspect_ratios,
									   value=modules.config.default_aspect_ratio,
									   elem_classes='aspect_ratios')

Снимок экрана 2024-05-23 094016

It may also be useful to add a line with information about the selected resolution. However, in my current implementation it is updated only when any resolution item is selected. At startup it is empty and shows nothing. I don't know how to fix this or if it is necessary.
I would like to place this information line in the accordion as I marked in red on the screenshot. But I don't know how.

aspect_ratios_markdown = gr.Markdown('')
def aspect_ratios_change(value):
	return value
aspect_ratios_selection.change(aspect_ratios_change, inputs=aspect_ratios_selection, outputs=aspect_ratios_markdown,
			   queue=False, show_progress=False)

Снимок экрана 2024-05-23 094114

@mashb1t
Copy link
Collaborator

mashb1t commented May 26, 2024

@Alexdnk adjusted, please check

@Alexdnk
Copy link
Contributor Author

Alexdnk commented May 26, 2024

@mashb1t 'Aspect Ratios' Accordion it's is great realisation. I test it, and is ok.
In the 'Output Format' section, did you intentionally swap the format and quantity? In my original pullrequest, I suggested combining them into one line(Row), so I have them in that order.
I suggest not to change the old order and to place the 'Image Number' above the 'Output Format'.
But if that's the way you intend it to work, then it works correctly.
Thank you for adjusting.

@mashb1t mashb1t changed the base branch from main to develop May 26, 2024 15:20
@mashb1t mashb1t self-requested a review as a code owner May 26, 2024 15:20
@mashb1t mashb1t added this to the 2.4.0 milestone May 26, 2024
@mashb1t mashb1t merged commit 57d2f2a into lllyasviel:develop May 26, 2024
mashb1t added a commit to mashb1t/Fooocus that referenced this pull request May 26, 2024
use javascript code instead of python handling for updates for lllyasviel#2590
mashb1t added a commit that referenced this pull request May 26, 2024
use javascript code instead of python handling for updates for #2590
@mashb1t mashb1t mentioned this pull request May 28, 2024
5 tasks
csokun pushed a commit to csokun/Fooocus that referenced this pull request Jun 16, 2024
* Slightly more compact ui settings

Changed Radio to Dropdown.

* feat: change preset from option to select, add accordion for resolution

* feat: change title of aspect ratios accordion on load and update

* refactor: reorder image number slider, code cleanup

* fix: add missing scroll down for metadata tab

* fix: adjust indent

---------

Co-authored-by: Manuel Schmid <dev@mash1t.de>
Co-authored-by: Manuel Schmid <9307310+mashb1t@users.noreply.github.com>
csokun pushed a commit to csokun/Fooocus that referenced this pull request Jun 16, 2024
use javascript code instead of python handling for updates for lllyasviel#2590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size S small change, basically no testing needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants