-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): workflows undo/redo #6379
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psychedelicious
requested review from
blessedcoolant,
maryhipp and
hipsterusername
as code owners
May 16, 2024 14:09
psychedelicious
force-pushed
the
psyche/feat/ui/workflows-history
branch
from
May 17, 2024 00:37
d46ed2f
to
b60701e
Compare
I was fiddling around with schema parsing and added a couple test cases for |
We need the undoable slice to be only undoable state - settings are not undoable.
Templates are stored in nanostores. All hooks, selectors, etc are reworked to reference the nanostore.
- Do not allow whitespace-only field titles - Make only preview text trigger editable - Tooltip over the preview, not the whole "row"
…ractable one when updating edges
… using lazy connect
The schema fixture wasn't formatted quite right - doesn't affect the test but still.
psychedelicious
force-pushed
the
psyche/feat/ui/workflows-history
branch
from
May 17, 2024 00:41
b60701e
to
4b858a2
Compare
hipsterusername
approved these changes
May 17, 2024
This state is ephemeral and not undoable.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds undo/redo to workflows. This required splitting up the workflow editor state a bit so that undoable state is isolated from the rest of it.
In order to split things up, I needed to rewrite the auto-connection logic. In the end, that logic is much cleaner. I fixed a number of fiddly interactions and improved some things:
Note: The grouping of undoable actions needs some tuning. You might find that you need to undo multiple times to see any change. Each undo is doing something, but it may not result in any visible change. Conversely, you might undo and find it undoes too much. I'll refine this as I use it more - it's tricky to find the edge cases.
Related Issues / Discussions
Closes #4137
QA Instructions
Play around with undo/redo, copy/paste, auto-connect and auto-node.
Due to interactions between reactflow and undo/redo, it may be hard to provide consistent reproductions when undo/redo don't do what you expect. Ideally you can take a screen recording, starting from a fresh load of the page, showing the problem.
Merge Plan
This needs user testing before release. I don't plan on an OSS release until next week.
Checklist