Don't allow deleting an element if it has an associated workflow

I have lost countless workflows of varying complexity by deleting a button associated to them.
It would be very welcome to at least show a warning that the element is used in a workflow, or disable deleting until every reference to the element is removed from the related workflows.

2 Likes

I like this idea, sure would have come in handy for me in the past. Usually I could hit undo and go back to before an element was deleted, but I wasn’t always that lucky.

A temporary solution you might find useful: convert important buttons and other groups containing complex workflows into reusable elements, even if you don’t plan on reusing them. This way the workflows are stored in the reusable object and not on your canvas which could be easily deleted. Another way around this could be creating custom workflows that your buttons then utilize (same scenario: if you accidentally delete a button, the workflows are contained elsewhere and not on the button itself)

I tried creating custom workflows for some weeks, but it grew old quite quickly. I just do that when I anticipate the workflow will be complex.

That’s not always doable: very often, workflows start as a few innocent steps and grow with time, becoming not easily detachable from the “button click” event.

Adding to that, any workflow can’t be converted to a custom workflow (and I’d call in the @Bubble team to ask why), That would help a lot.

Good point. It’s definitely not an ideal fix.

In Adobe applications, when you lock a layer, that layer can not be moved and trying to delete it will prompt you to unlock the layer first. Maybe the lock element toggle in Bubble could serve a dual purpose (in addition to not being draggable, disable deletion of the element as well):

87e156b4c0ca7b9fd1c63efc67695a9d

2 Likes

I would prefer a Warning, but definitely not having to delete every Workflow before I could delete an element.

Often I will delete an Button knowing that the Workflows will all be deleted, and I have actually liked the feature more than disliked it. I have made a mistake occasionally, but thankfully noticed it quickly and used the Back function in the editor

3 Likes

@furnys You can click the (i) icon for element inspector in property editor for an element and that shows all associated actions and events. While an alert before you delete can be helpful for some users, others might find it annoying

1 Like

That’s useful, I haven’t noticed it before! Thanks

Just to tell you, it happened again an hour ago that I accidentally deleted a popup and trashed a complex workflow that was linked to a button in the popup.

I went on building, then I noticed something was missing. I had to restore to a previous version not to lose half a day of work. Doing that, I lost only the last hour of work.

I’m most sure that I want deletion of an element to be prevented if there are workflows stemming from events related to that item. If it bothers people, just put a “delete anyway” button.
Or, just leave the workflows pending, with the nice side effect of having one more issue in the issue checker because the originating element is missing.

I would suggest having an option in settings that can be toggled off/on.