plugdata icon indicating copy to clipboard operation
plugdata copied to clipboard

Feat - automatically remove objects spawned with zero-width names

Open PowerUser64 opened this issue 2 years ago • 6 comments

After starting the process of adding an object by typing in its name, if you delete the text you have typed, you are left with a blank red object box that has no text in it. Instead of leaving the object as a blank red box, I think it would probably be best to delete it. This would allow cancelling the action of adding an object by simply deleting the text you typed and clicking out of it, which (at least to me) makes the most sense from a UX standpoint.

image

PowerUser64 avatar Sep 08 '23 06:09 PowerUser64

Empty objects are valid objects in Pd-vanilla. In fact the "add object menu" has an empty object as an option.

Maybe if a user presses delete while in text editor of the object, and it has no more text to delete an option dialog asks if the user wants to delete it?

AlexMitchellMus avatar Sep 11 '23 04:09 AlexMitchellMus

Oh, interesting. Allowing backspace or delete as a gesture to remove the object would be a good option. It probably doesn't even need a dialog, just pressing backspace while editing the object is probably sufficient. It's not much trouble to make another one if you deleted a blank one by accident. I think a dialog would be likely to get in the way.

PowerUser64 avatar Sep 11 '23 06:09 PowerUser64

Autorepeat delete is the problem. A user can hold a key down and delete repeats, it's a setting in the OS.

Giving this more thought, it feels like it's trivial to select the object and delete anyway. I don't think we need this.

AlexMitchellMus avatar Sep 15 '23 05:09 AlexMitchellMus

Hmm, true. That is a problem. Could there possibly be a keyboard shortcut instead, like shift backspace? I think there to be a way to cancel adding an object. I probably should rephrase the title of this issue.

PowerUser64 avatar Sep 15 '23 10:09 PowerUser64

Possibly if you have newly added the object (not created the object completely) then pressing escape could delete it?

So escape could work in this way for a double click added object only.

Do you think that would be helpful?

AlexMitchellMus avatar Sep 22 '23 20:09 AlexMitchellMus

Or as you have suggested, a modifier for backspace that will delete the currently editted object, regardless of if it's a new object or not.

The more I think about this the more I like the modifier approach.

AlexMitchellMus avatar Sep 22 '23 20:09 AlexMitchellMus