## Summary
Preventing canvas undo/redo while NDV or any modal is open. We already
had a NDV open check in place but looks like it was broken by unreactive
ref inside `useHistoryHelper` composable.
This PR fixes this by using store getter directly inside the helper
method and adds modal open check.
## Related tickets and issues
Fixes ADO-657
## Review / Merge checklist
- [ ] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
> A feature is not complete without tests.
Github issue / Community forum post (link here to close automatically):
https://github.com/n8n-io/n8n/pull/6348
---------
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
Co-authored-by: Marcus <marcus@n8n.io>
* fix(editor): Fix redo when adding node on connection
* ✅ Adding tests for pushed nodes
* ✔️ Updating drag command for dragging nodes on the canvas
* 👌 Handling drag end with a command option
* ⚡ Implemented new grid row - banners
* ✨ Fixing node creator and executions sidebar position after layout update
* 💄 Added configurable round corners to the Callout component
* ⚡ Fixing mouse position detection and main tab bar position
* ⚡ Implemented basic banner component structure
* ⚡ Implemented banner state and dismiss logic
* ⚡ Fixing grid layout. Updating banners height state dynamically
* ⚡ Fix zoom to fit position, mouse position in demo mode and callout vertical alignment
* ⚡ Implementing proper trial banners logic
* 💄 Only showing execution usage data once the sidebar is fully expanded
* ✨ Implemented permanent/temporary dismiss logic for v1 flag
* ⚡ Minor refactoring of banner logic
* ⚡ Updating permanent dismiss logic to work with all banners
* 👕 Fixing linting errors
* ✔️ Updating Callout component test snapshots
* 💄 Tweaking zoom to fit position
* ✔️ Updating testing endpoints to use new store data
* ✅ Added banners unit tests
* ✔️ Fixing failing banner tests
* ✅ Added more banner tests
* ⚡ Updating banners dimensions on resize, removing leftover code
* ✔️ Removing store import from API file
* 👕 Fixing lint errors
* ⚡ Updating migration files
* ⚡ Using query parameters in migrations
* 👌 Addressing design review feedback
* ⚡ Updating upgrade plan button click
* ⚡ Updating the migrations syntax
* 👌 Updating permanent banner dismiss endpoint and back-end logic
* 👌 Refactoring trial banner component and ui store
* 👌 Addressing more points from code review
* 👌 Moving DOM logic from the store
* ✔️ Updated callout component snapshots
* 👌 Updating mysql migration file
* ✔️ Updating e2e test canvas coordinates after setting it's position to absolute
* 👌 Addressing back-end review feedback
* 👌 Improving typing around banners
* 👕 Fixing lint errors
* feat(editor): Bring new users to empty canvas
* Fix failing e2e tests and revert CLI implementation
* Revert editor-ui Interface changes
* Try to mock /settings and /active
* Revert canvas test changes, reload after executions in 20-workflow-executions
* Make sure we include manual executiosn before running them in 20-workflow-executions
* Make sure to re-init node view when replacing empty workflows route, show phantom loader
* ⚡ Adding source and target test data to connection HTML elements
* ⚡ Using new action to add node on the connection
* 🔥 Removing leftover log
* 🔥 Removing leftover test action
* 👌 Refactoring to address PR feedback
* test: add tests for pinning
* test: add test for value
* test: add pinned data tests
* test: refactor into ndv
* refactor: move to ndv
* refactor: rename node
* test: fix test
* test: fix refactor
* test: remove unused id
* test: update test
* test: chain rename input
* test: refactor invoking text
* test: fix ndv tests
* test: move test id
* test: add tests for mapping
* test: update selectors
* test: add mapping
* test: remove wait
* test: add back line removed by mistake
* test: refactor to support both in/output displays
* test: add display mode switching
* test: fix drop
* chore: clean up change
* refactor: add draganddrop
* fix: fix drag and drop
* test: add mapping test for second value
* test: update text
* test: update param
* ✨ Added history store and mixin
* ✨ Implemented node position change undo/redo
* ✨ Implemented move nodes bulk command
* ⚡ Not clearing the redo stack after pushing the bulk command
* 🔨 Implemented commands using classes
* 🔥 Removed unnecessary interfaces and actions
* 🔥 Removing unused constants
* 🔨 Refactoring classes file
* ⚡ Adding eventBus to command obects
* ✨ Added undo/redo support for adding and removing nodes
* ✨ Implemented initial add/remove connections undo support
* ⚡ Covering some corner cases with reconnecting nodes
* ⚡ Adding undo support for reconnecting nodes
* ⚡ Fixing going back and forward between undo and redo
* ✨ Implemented async command revert
* ⚡ Preventing push to undo if bulk redo/undo is in progress
* ⚡ Handling re-connecting nodes and stopped pushing empty bulk actions to undo stack
* ✨ Handling adding a node between two connected nodes
* ⚡ Handling the case of removing multiple connections on the same index. Adding debounce to undo/redo keyboard calls
* ⚡ Removing unnecessary timeouts, adding missing awaits, refactoring
* ⚡ Resetting history when opening new workflow, fixing incorrect bulk recording when inserting node
* ✔️ Fixing lint error
* ⚡ Minor refactoring + some temporary debugging logs
* ⚡ Preserving node properties when undoing it's removal, removing some unused repaint code
* ✨ Added undo/redo support for import workflow and node enable/disable
* 🔥 Removing some unused constant
* ✨ Added undo/redo support for renaming nodes
* ⚡ Fixing rename history recording
* ✨ Added undo/redo support for duplicating nodes
* 📈 Implemented telemetry events
* 🔨 A bit of refactoring
* ⚡ Fixing edgecases in removing connection and moving nodes
* ⚡ Handling case of adding duplicate nodes when going back and forward in history
* ⚡ Recording connections added directly to store
* ⚡ Moving main history reset after wf is opened
* 🔨 Simplifying rename recording
* 📈 Adding NDV telemetry event, updating existing event name case
* 📈 Updating telemetry events
* ✅ Added initial undo/redo tests
* ⚡ Fixing duplicate connections on undo/redo
* ⚡ Stopping undo events from firing constantly on keydown
* ✅ Added connection test for undo/redo
* 📈 Updated telemetry event for hitting undo in NDV
* ⚡ Adding undo support for disabling nodes using keyboard shortcuts
* ✅ Added more tests for adding and deleting nodes undo/redo
* ⚡ Preventing adding duplicate connection commands to history
* 📈 Adding connection assertions to delete node tests
* ⚡ Clearing redo stack when new change is added
* ⚡ Preventing adding connection actions to undo stack while redoing them
* 👌 Addressing PR comments part 1
* 👌 Moving undo logic for disabling nodes to `NodeView`
* 👌 Implemented command comparing logic
* ⚡ Fix for not clearing redo stack on every user action
* ⚡ Fixing recording when moving nodes
* ⚡ Fixing undo for moving connections
* ⚡ Fixing tracking new nodes after latest merge
* ⚡ Fixing broken bulk delete
* ✅ Added tests for moving nodes
* ✅ Added tests for deleting connections
* ✅ Added tests for disabling nodes
* ✅ Added node rename tests
* ✅ Added tests for duplicating and pasting nodes
* ✅ Added multi-step undo/redo tests
* ✅ Fixing assertion condition
* ✅ Fixing timeout issue between keyboard strokes
* ⬆️ Updating pnpm lock file
* ✅ Waiting for page load to finish before each test
* ✅ Adding proper handling of meta key press
* 🚨 Temporarily disabling slack notifications
* ✅ Adding check before clicking connection actions
* ⚡ Removing comments from other undo tests
* 🎨 Fixing a typo