novu
novu copied to clipboard
Allow adding new nodes to middle of workflow
-
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Allows nodes to be dropped in middle of the workflow instead of having to remove nodes to get a node to a desired place.
-
What is the current behavior? (You can also link to an open issue here) You need to delete all before nodes to put a node in between of the workflow
-
What is the new behavior (if this is a feature change)?
-
Other information: resolves #1177
Looks good @raikasdev 😄 Could you create some tests for this and also we might think of how we display that it is possible to drop nodes between two already existing nodes...
E2E passing for me locally at least :shrug:
@oba2311 I think this UX is a bit problematic since the user won't even know that he needs to place it on top of a step so it will appear one step before.
I think we need to add some Drop Areas near the floating element while dragging between nodes so it will be clear it will appear there.
Also we need to figure out a handle of a sort to change the order of existing nodes (maybe we can introduce arrow buttons on step hover on the left side?) I think we need to chat with Shlomi about the UX of this piece. Because right now it's not very discoverable.
Taking w Shlomi
@oba2311 a small ping here, did we get the designs on this one yet? Really want to finish this 😍
https://www.figma.com/file/9jalQvImfHtbbExZPLW3XO/Concepting?node-id=3550%3A35906
@raikasdev could you take a look at the design? I would actually only add the + button only when hovering on the parent or the child node. Just so we won't have all the UI with "+" signs all the time.
@oba2311 the UI you sent helps with adding new nodes, but what about actually re ordering existing nodes? We should have some handler on the side where the user can drag and drop don't you think?
@raikasdev, we are a bit behind the time with this one, so @djabarovgeorge will help finalize the design parts here. Thanks a lot @raikasdev, for the heavy lifting 🙏
@scopsy Could you elaborate some more (maybe a usecase will help to clear the concept) regarding the sort you mentioned in the last part here? https://github.com/novuhq/novu/pull/1248#issuecomment-1250259931