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(editor): Prevent duplicate values in preview for SQL editor #9129

Merged

Conversation

elsmr
Copy link
Member

@elsmr elsmr commented Apr 11, 2024

Summary

SQL query preview should not include duplicates (specifically brackets for this issue).

  • Exclude bracket segments from preview
  • Harden the ExpressionEditorOutput to not display duplicate segments

Related tickets and issues

https://linear.app/n8n/issue/NODE-1286/postgres-sqleditor-duplicate-values-in-preview
https://community.n8n.io/t/postgresql-node-using-array-something-duplicates-the-output/43373

Review / Merge checklist

  • PR title and summary are descriptive. Remember, the title automatically goes into the changelog. Use (no-changelog) otherwise. (conventions)
  • Docs updated 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.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Apr 11, 2024
@elsmr elsmr requested a review from ivov April 18, 2024 13:58
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

resolvedExpression in packages/editor-ui/src/components/ExpressionEditorModal/ExpressionEditorModalOutput.vue has the exact same code. Do we not need to update there as well?

@elsmr
Copy link
Member Author

elsmr commented Apr 19, 2024

resolvedExpression in packages/editor-ui/src/components/ExpressionEditorModal/ExpressionEditorModalOutput.vue has the exact same code. Do we not need to update there as well?

Good point, I extracted the common logic into a new component

Copy link

cypress bot commented Apr 22, 2024

1 flaky test on run #4735 ↗︎

0 356 12 0 Flakiness 1

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 elsmr 🗃️ e2e/*
Project: n8n Commit: b4359a042d
Status: Passed Duration: 04:35 💡
Started: Apr 22, 2024 8:21 AM Ended: Apr 22, 2024 8:25 AM
Flakiness  cypress/e2e/5-ndv.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > Stop listening for trigger event from NDV Screenshots Video

Review all test suite changes for PR #9129 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@elsmr elsmr merged commit 5acbfb4 into master Apr 22, 2024
28 checks passed
@elsmr elsmr deleted the node-1286-postgres-sqleditor-duplicate-values-in-preview branch April 22, 2024 12:57
@github-actions github-actions bot mentioned this pull request Apr 24, 2024
@janober
Copy link
Member

janober commented Apr 24, 2024

Got released with n8n@1.39.0

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 Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants