It appears that most of the OpenFlow items can deleted without any confirmation. This makes it very easy to missclick delete something.
Looking through the code, I’m not sure where the routing for these go. I’ve tried retracing how the queue purge handles the confirmation, but tbh the wiring in openflow between the types a bit escapes me.
So the request is → could confirmations for delete via UI be added to all deletes?
If you don’t have the time for it, if you could give a short intro on how to add it in a way that’s consistent with what you want, we could take a stab at it.
I’m assuming it would be similar to this:
But that’s just a guess, not sure if that’s too deep in the stack.
To keep current UX consistent, the delete confirmations could be a config flag I think?
The philosophy was.
If you get a prompt, you need to press enter too. It quickly becomes muscle memory, and you still accidentally delete something by mistake. Since this is annoying when you need to delete a lot of things and there is no “select all” and delete, it was easier to just keep it simple (the new UI has multiselect AND prompts, so I cannot wait until that is done).
But you are 100% right, it’s best practice to have a delete prompt everywhere. Shame on me!
It’s very bad practice to use prompt/input/confirm in JavaScript; it blocks everything and for RPA robots, it’s very hard to tackle. So, I would not be a big fan of using those, but it’s SSOOO easy to implement. I guess that would be an okay workaround for now.
Changes must be done in GitHub - open-rpa/openflow-web since I’m splitting up OpenFlow and the web interface into two different projects for 1.5.10.
For most pages, the delete is handled in the entitiesCtrl class inside CommonControllers.
The last delete(s) are in the DuplicatesCtrl. I’m not sure if this should prompt.