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

[bug]: multiple delete #4885

Closed
1 task done
VeyDlin opened this issue Oct 15, 2023 · 4 comments
Closed
1 task done

[bug]: multiple delete #4885

VeyDlin opened this issue Oct 15, 2023 · 4 comments
Assignees
Labels
bug Something isn't working gallery good first issue Good for new contributors

Comments

@VeyDlin
Copy link

VeyDlin commented Oct 15, 2023

Is there an existing issue for this?

  • I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

11

What version did you experience this issue on?

3.3.0

What happened?

If you select several images and press the delete key on the keyboard then this will work only for one image

Screenshots

No response

Additional context

No response

Contact Details

No response

@VeyDlin VeyDlin added the bug Something isn't working label Oct 15, 2023
@psychedelicious psychedelicious self-assigned this Oct 15, 2023
@Millu Millu added the gallery label Oct 16, 2023
@psychedelicious psychedelicious added the good first issue Good for new contributors label Oct 18, 2023
@psychedelicious
Copy link
Collaborator

I'm not sure if this is really a bug.

The delete handler is in invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx, which isn't available when the those buttons are not mounted.

Let's first explore what the behaviour should be for combinations of these states:

  • Gallery open or closed
  • single or multiple images selected
  • current image buttons visible or hidden (e.g. you are on canvas or workflow editor)

What is the desired behaviour in each combination?

@VeyDlin
Copy link
Author

VeyDlin commented Oct 20, 2023

I'm not sure if this is really a bug.

This is contrary to UX, users are used to pressing the delete key to delete all selected objects, this happens in any software with a browser or operating system explorer

I was very upset when I realized that my painstaking work on selecting hundreds of images had simply disappeared because I was counting on deleting everything by pressing the delete key

@psychedelicious
Copy link
Collaborator

Sorry you lost your selection.

There's some miscommunication. It's not a good UX, I agree, but also it's not a "bug" - it's doing exactly what it's supposed to do - delete the current image. But when you have many images selected, this is not the expected behaviour.

It's not clear what the expected behaviour is, hence my probing question. Do you have any ideas for my question?

@VeyDlin
Copy link
Author

VeyDlin commented Oct 20, 2023

This function should delete all selected images

The problems that you described are solved by adding an active widget focus (gallery, canvas, ...), the focus is set to the last widget that the user interacted with

An example of how this works can be seen in visual studio code, files in explorer can be selected and deleted, but if you click on the window with the code the focus switches but the selection in explorer does not disappear, in this case keystrokes will no longer be processed by the explorer (until the user returns focus)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gallery good first issue Good for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants