Skip to content
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

refactor(editor): Fix duplicate NodeView keys when navigating between routes (no-changelog) #5325

Merged
merged 4 commits into from
Feb 2, 2023

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Feb 1, 2023

Follow-up to #5259.
This PR addresses three issues:

  1. When navigating away from unsaved workflow, we should reset workflow id(setting it to PLACEHOLDER_EMPTY_WORKFLOW_ID) if user chooses to discard or save changes. If the navigation is canceled(closing the modal) we should not reset the workflow id.
  2. Instead of storing node components as $refs to later get their elements, we can use JSPlumb's getManagedElement to retrieve the DOM element of a node by an id. This is a more reliable way of getting the DOM element of a node and should improve the memory consumption of larger workflows.
  3. Use computed to export jsPlumbInstance from the canvas store. This fixes Maximum call stack size exceeded error when Vue dev tools are open

Github issue / Community forum post (link here to close automatically):

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Feb 1, 2023
@OlegIvaniv OlegIvaniv marked this pull request as draft February 1, 2023 17:26
@OlegIvaniv OlegIvaniv marked this pull request as ready for review February 1, 2023 19:51
@OlegIvaniv OlegIvaniv merged commit 96ec5bc into master Feb 2, 2023
@OlegIvaniv OlegIvaniv deleted the fix-duplicate-canvas-id branch February 2, 2023 08:05
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Feb 2, 2023
MiloradFilipovic added a commit that referenced this pull request Feb 2, 2023
* master: (26 commits)
  feat(editor): Completions for extensions in expression editor (#5130)
  feat(core): Set custom Cache-Control headers for static assets (#5322)
  fix(editor): Set max width for executions list (#5302)
  refactor(Code Node): Remove disallowed syntax checks (#5332)
  fix(Linear Node): Fix pagination issue for get all issues (#5324)
  refactor(editor): Fix duplicate NodeView keys when navigating between routes (no-changelog) (#5325)
  fix(Mailchimp Trigger Node): Fix webhook recreation (#5328)
  fix(Schedule Trigger Node): Change scheduler behaviour for intervals days and hours (#5133)
  fix(core): Fix oauth2 client credentials not always working (#5327)
  feat(Salesforce Node): Add HasOptedOutOfEmail field to lead resource (#5235)
  fix: Update app screenshot in README to match latest design (no-changelog) (#5314)
  fix(editor): Stop unsaved changes popup display when navigating away from an untouched workflow (#5259)
  feat(core): Simplify pagination in declarative node design (#5161)
  fix(core): Fix value resolution in declarative node design (#5217)
  feat(YouTube Node): Switch upload operation over to streaming and resumable uploads api (#5320)
  fix(YouTube Node): Update description for channel id (no-changelog) (#5321)
  fix(core): Revert back to console logging in config (no-changelog) (#5319)
  fix: Add paired item to the most used nodes (#5220)
  feat(Write Binary File Node): Stream binary data for writes (#5306)
  feat(editor): Roll out schema view (#5310)
  ...

# Conflicts:
#	packages/cli/BREAKING-CHANGES.md
#	packages/editor-ui/src/components/ExpressionEditorModal/ExpressionEditorModalInput.vue
#	packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionEditorInput.vue
#	packages/editor-ui/src/mixins/completionManager.ts
#	packages/editor-ui/src/mixins/expressionManager.ts
#	packages/editor-ui/src/plugins/codemirror/completions/__tests__/completions.test.ts
#	packages/editor-ui/src/plugins/codemirror/completions/datatype.completions.ts
#	packages/editor-ui/src/plugins/codemirror/completions/dollar.completions.ts
#	packages/editor-ui/src/plugins/codemirror/completions/types.ts
#	packages/editor-ui/src/plugins/codemirror/completions/utils.ts
#	packages/workflow/src/Expression.ts
#	packages/workflow/src/Extensions/ArrayExtensions.ts
#	packages/workflow/src/Extensions/DateExtensions.ts
#	packages/workflow/src/Extensions/Extensions.ts
#	packages/workflow/src/Extensions/NumberExtensions.ts
#	packages/workflow/src/Extensions/ObjectExtensions.ts
#	packages/workflow/src/Extensions/StringExtensions.ts
#	packages/workflow/src/Extensions/index.ts
#	packages/workflow/src/index.ts
#	packages/workflow/test/ExpressionExtensions/ArrayExtensions.test.ts
@janober
Copy link
Member

janober commented Feb 3, 2023

Got released with n8n@0.214.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants