anapnoe / stable-diffusion-webui-ux

Stable Diffusion web UI UX
GNU Affero General Public License v3.0
991 stars 58 forks source link

[Bug]: Unable to resize the text boxes in extensions #100

Closed derrian-distro closed 1 year ago

derrian-distro commented 1 year ago

Is there an existing issue for this?

What happened?

When using extensions such as WD1.4 tagger or the dataset tag editor, the text boxes which display the tags are locked to being only 1 line. This means that the tags, which usually takes up more than one line is impossible to read unless you copy and paste it elsewhere. It would be nice if there is a way to resize the text box or if it automatically resized according to the text added to it as it makes doing my normal tagging for LoRA I make nearly impossible to do. This issue also directly impacts looking at metadata for additional networks, as all of the metadata boxes are these types of text boxes.

Steps to reproduce the problem

  1. Have any of the above mentioned extensions installed
  2. activate or use the extension like usual, in this case WD1.4 tagger
  3. Run the tagger, and wait for results
  4. see that the tag box does not expand to show all tags tagger: tagger dataset tag manager: dataset tag manager additional networks metadata tab: additional networks metadata tab

What should have happened?

The text boxes expand to fit the text, or have a way to be resized so that the user can see all of the elements/tags

Commit where the problem happens

6fbe525f

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Brave

Command Line Arguments

--opt-sdp-attention

List of extensions

Console logs

No error, it still works as intended, however doesn't resize to fit the new text

Additional information

No response

SoftwareGuy commented 1 year ago

Can confirm that this issue also occurs in a Firefox-based web browser like Waterfox. You have to manually resort to CSS hacks via the Web Inspector by forcing an override of the height value that doesn't persist when you close the tab (or switch module?).

This is an oversight because I strongly doubt anyone with a high resolution monitor (1080 upwards) would want to try to copy all the text from a one-line-high field.

Please look into fixing the template for this to be rectified.

anapnoe commented 1 year ago

if you click inside the tag field does it expand? I have added this functionality for all textarea fields, if defined as textarea type by extension if doesn't expand inspect the field element type if it is not a textarea field forward issue to extension author else I will look into it

ArtLeav commented 1 year ago
derrian-distro commented 1 year ago

you can only do so for text areas that allow editing. Clicking does not do anything when the textarea is not editable. I looked at the code, and yes for all cases, they are textarea. It might be helpful to have it detect when text is programmatically added and expand to match that text, as when text is added to a textarea that is not editable, there is no way to resize it.

anapnoe commented 1 year ago

don't want to add an observer for this as textarea components exist everywhere in the ui settings, extensions etc I will attach the onfocus listener to the parent element of the textarea as you pointed out if the component is disabled the event is not triggered

ArtLeav commented 1 year ago

изображение изображение

Still can't change size in some extensions like Image browser or WD Tagger On both Chrome and Mozilla