Feature Request: Confirm Delete Flow

#1

:thought_balloon:

As the title states, a great opportunity to improve the user experience would be a Confirm dialog - such as the one used when there are errors on the flow, with a Confirm button when a user is going to delete a flow from the context menu.

Due to lack of this feature, Node-RED just bit me in the butt because as I was about to rename a flow (that took nearly 20 minutes to wire up), my mouse jumped down just a hair and the whole flow disappeared from my eyes.

#2

Whilst not addressing your issue,

You can possibly recover the flow you have lost.
Assuming you had deployed the flow first, after accidentally deleting something. Kill Node-RED restart and it will load the flow file saved on the last deploy.

(the previous deployed file is also saved as a hidden file within your .node-red directory)

You can also rename a flow by double clicking on the tab, avoiding the menu system.

1 Like
#3

Probably too late now, but a quick Ctrl-Z would have undone the delete.

But your wider point is taken - we try to balance the user experience of nagging with dialogs when the user has purposefully taken an action, versus when we want them to be really sure they mean to do what they are doing.

As deleting a flow can be easily undone, it has not had a confirm dialog added. Other actions, such as removing a node from the palette, is a more drastic action so we do prompt in that case.

2 Likes
#4

Since I'm assuming deleting flows is a rare occurrence, wouldn't adding this additional "check" create more benefit than hinderance?

#5

Speaking just selfishly - no.

The thing is, when is a flow a flow and not just a single node and should there be a warning even for a single node being deleted?

As I often use Node-RED for prototyping, I may well be very rapidly adding and deleting nodes and flows. For me, the extra check would drive me mad in short order I'm afraid.

As Nick says, since ctrl-z works just fine, I can't see much benefit of this.

2 Likes
#6

I'm with you, ctrl-z works fine.

#7

Now, if only we had Ctrl-y to redo changes that we have undone...

or has that shortcut already been added to some newer version than what I'm running?

1 Like
#8

if (nr.config.confirmDelete) showConfirm()

Then we get the best of both worlds?

#9

In general we don't add individual settings for things like that - otherwise you end up with 1001 options that rarely get touched by 99% of users. We prefer to get the UX right from the start. Right now I'm happy to let this thread gather opinions and we'll look at it again later.

1 Like