mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-11-05 00:17:25 +00:00
[GH-ISSUE #190] Multi Level completion / coloring for wildcards #135
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
low priority
low priority
pull-request
question
waiting for feedback
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DominikDoom/a1111-sd-webui-tagcomplete#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DominikDoom on GitHub (Jun 20, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/190
Originally assigned to: @DominikDoom on GitHub.
As suggested by @PaperOrb.
Wildcards that are organized in nested folders will currently complete the whole path both if a suggestion is chosen with enter or on pressing tab.
It would be better if tab would only complete up to the next folder level, so the user can choose again from a more limited selection without having to type the path until that point manually or having to delete the added path partially.
For the same reasoning, some color differentiation between folder levels would also be nice.
@DominikDoom commented on GitHub (Jun 20, 2023):
@PaperOrb I hope this is what you imagined:
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/assets/34448969/a5c1c86e-6592-413c-9bc2-915d46cead76
For any path that contains a slash, it will complete up to the next one when pressing Tab, allowing you to then select the next set of subfolders or the final wildcard file.
If you want to skip it in case you already have your wanted file selected, you can use Enter instead which will always insert the full thing.
@Xyem commented on GitHub (Jun 20, 2023):
I don't get the point of this. The progressive autocomplete I suggested can also do this but doesn't just randomly stop and require unnecessary user input.
Your suggestion would require 3 tabs and a choice (
h<TAB>c<TAB>l<TAB><CHOOSE>), progressive autocomplete would require 2 tabs (h<TAB>l<TAB>to select the blonde wildcards).@DominikDoom commented on GitHub (Jun 20, 2023):
@Xyem Well, at least for wildcards I could do it like this as well since the result set is limited and the cross-comparison to find the first difference doesn't get out of hand:
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/assets/34448969/6668111c-b857-4572-9548-6dd98838a39e
If that is more to your liking. I pressed
__suTABbTABaTAB in that example.It is a different method to get to the same goal. This behaves more like completion in most command line terminals, where it stops at the first difference until you provide further input or choose directly.
The first method instead is more like navigating in the file explorer or cd-ing in the terminal level by level. I don't think it is that wasteful of user input either, since I imagine most wildcards will not be many unused layers deep, but only branch off into different folders where a categorical difference happens.
So skipping long parts with the same start should be a relatively rare occurrence.
I think both have their benefits, maybe a setting to choose which variant it uses would be best?
@DominikDoom commented on GitHub (Jun 20, 2023):
I have added both methods and an option to choose between them now (default is the folder level way since it is less computationally demanding), hopefully this way everyone should be happy.
It will stay only for wildcards though for now, for normal tags it is too computationally expensive to go through all the results and find the first difference, since the result lists can get much longer than the usual wildcard collections. And like I said before, with the current tag completion regex, I feel false positives are rare enough that it isn't needed there.
@PaperOrb commented on GitHub (Jun 20, 2023):
Edit: just realized I hadn't refreshed this page to see new comments. @DominikDoom yep that's exactly what I envisioned! I think adding an option to select the variant was the right call.
Awesome to see this got its own issue. I look forward to it because I have wildcard folders that are 4 levels deep, so I basically have to type the whole thing out.
If this feature can't be implemented, a less desirable alternative could be enabling the pre-existing * functionality to work for wildcards so that
__*eadwould find things like/characters/monsters/undead.edit: nm, I forgot that
__eadwould already work to find/characters/monsters/undead.@DominikDoom commented on GitHub (Jun 20, 2023):
@PaperOrb Just in case your didn't see it, the update is already pushed and contains both methods shown above, so you can use it right now.
I tried it out a fair bit with the wildcards I had lying around, but feel free to tell me here or in a new issue if something doesn't work like expected with your setup.
I kept this issue open to wait for feedback, but if you're happy with it I think I can already close it.