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

fix: Ensure NDV params don't get cut off early and scrolled to the top #11252

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mutdmour
Copy link
Contributor

@mutdmour mutdmour commented Oct 14, 2024

Summary

fixes:

  1. ADO-2350 Ensure parameters are scrolled to the top when opening nodes that have expressions
  2. NODE-1272 Ensure long expressions open scrolled at top
  3. ADO-2595 Remove this empty section when there's no subconnections
Screenshot 2024-10-14 at 16 41 27

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/ADO-2350/bug-ndv-loads-with-params-pane-scrolled-to-the-middle
https://linear.app/n8n/issue/ADO-2595/ndv-parameters-cutting-off-too-early

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@mutdmour mutdmour marked this pull request as ready for review October 14, 2024 14:35
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Oct 14, 2024
@mutdmour mutdmour changed the title fix: Ensure NDV params don't get cut off early fix: Ensure NDV params don't get cut off early and scrolled to the top Oct 15, 2024
@@ -209,7 +209,7 @@ export const useExpressionEditor = ({
if (editor.value) {
editor.value.destroy();
}
editor.value = new EditorView({ parent, state, scrollTo: EditorView.scrollIntoView(0) });
editor.value = new EditorView({ parent, state });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scrollIntoView was added here to fix another NDV issue.
Are you certain that we don't need this anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking this.

I am sure. I also traced it back. Found the original issue it was fixing here
https://www.notion.so/n8n/Other-expressions-initiatives-00fb99a8b49c422fbc2843b5753a6ebb?pvs=4#76fdae74d7f04fa5b822cab6e754c3ae

I tested it and it does not seem needed any more. As such, I added a test for it.
https://github.com/n8n-io/n8n/pull/11252/files#diff-2a8a05f2863b2aae20f63d81e0a01c8f26a7a85b180471b0ceeb80088ddf375aR64

netroy
netroy previously approved these changes Oct 15, 2024
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Oct 15, 2024

n8n    Run #7380

Run Properties:  status check failed Failed #7380  •  git commit 0725ce360f: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 mutdmour 🗃️ e2e/*
Project n8n
Run status status check failed Failed #7380
Run duration 04m 03s
Commit git commit 0725ce360f: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 mutdmour 🗃️ e2e/*
Committer Mutasem Aldmour
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 247

Tests for review

Failed  6-code-node.cy.ts • 1 failed test

View Output Video

Test Artifacts
... > should show error based on status code Test Replay Screenshots Video
Failed  20-workflow-executions.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  30-editor-after-route-changes.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  11-inline-expression-editor.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  41-editors.cy.ts • 0 failed tests

View Output

Test Artifacts

The first 5 failed specs are shown, see all 48 specs in Cypress Cloud.

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

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.

2 participants