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): Fix SQL editor issue #7236

Merged
merged 8 commits into from
Sep 22, 2023

Conversation

michael-radency
Copy link
Contributor

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

@michael-radency michael-radency added ui Enhancement in /editor-ui or /design-system n8n team Authored by the n8n team labels Sep 22, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching **/*.vue:

  • Used composition API for all new components.
  • Added component or unit tests to cover functionality.

Files matching packages/editor-ui/**/*.vue:

  • Added E2E if adding new features.
  • Used design system tokens (colors, spacings...) where possible.

Files matching cypress/e2e/**:

  • Avoided chaining commands more than two or three times (to avoid flakiness because only last one will be retried).
  • Spoofed endpoints that are not critical for the test (to avoid flakiness).
  • Picked most efficient path to start the test (for example skipped account setup and starting at /workflow/new for a canvas test).
  • Avoided adding waits on time (use request intercepts instead).
  • Ensured each spec does not depend on any another spec to pass.

Make sure to check off this list before asking for review.

@@ -120,7 +120,7 @@
:dialect="getArgument('sqlDialect')"
:isReadOnly="isReadOnly"
:rows="getArgument('rows')"
@valueChanged="valueChangedDebounced"
@update:modelValue="valueChangedDebounced"
Copy link
Contributor

Choose a reason for hiding this comment

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

can you please add tests that address this bug?

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.01% ⚠️

Comparison is base (e8e44f6) 32.83% compared to head (9293705) 32.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7236      +/-   ##
==========================================
- Coverage   32.83%   32.83%   -0.01%     
==========================================
  Files        3351     3351              
  Lines      199977   199972       -5     
  Branches    21927    21918       -9     
==========================================
- Hits        65665    65658       -7     
- Misses     133203   133205       +2     
  Partials     1109     1109              
Files Changed Coverage Δ
...i/src/components/CodeNodeEditor/CodeNodeEditor.vue 40.70% <0.00%> (+0.80%) ⬆️
...ckages/editor-ui/src/components/ParameterInput.vue 42.86% <0.00%> (ø)
...s/editor-ui/src/components/CodeNodeEditor/theme.ts 95.20% <66.66%> (-1.20%) ⬇️
...s/editor-ui/src/components/SqlEditor/SqlEditor.vue 79.41% <100.00%> (+0.89%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cypress/e2e/29-sql-edditor.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/29-sql-edditor.cy.ts Outdated Show resolved Hide resolved
cypress/e2e/13-pinning.cy.ts Show resolved Hide resolved
const state = EditorState.create({
doc,
doc: this.modelValue ?? this.placeholder,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this reverting a change? why are we adding the placeholder here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, we are not changing this line, this is how it was set on master

image

Copy link
Contributor

Choose a reason for hiding this comment

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

so removing placeholder was a bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a test for this then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, placeholder was never removed, bug was in this line @valueChanged="valueChangedDebounced" that remained in sql editor template,

after, on master, it was updated to @update:modelValue="valueChangedDebounced" previous method for adjusting editor height stop working, so I had to revisit solution, now it's more cleaner

@cypress
Copy link

cypress bot commented Sep 22, 2023

Passing run #2247 ↗︎

0 240 3 0 Flakiness 0

Details:

🌳 ADO-1114-fix-sql-editor-changes 🖥️ browsers:node18.12.0-chrome107 🤖 michael...
Project: n8n Commit: 9293705996
Status: Passed Duration: 08:34 💡
Started: Sep 22, 2023 11:08 AM Ended: Sep 22, 2023 11:17 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@michael-radency michael-radency merged commit 647fc6c into master Sep 22, 2023
24 checks passed
@michael-radency michael-radency deleted the ADO-1114-fix-sql-editor-changes branch September 22, 2023 11:17
netroy pushed a commit that referenced this pull request Sep 25, 2023
Github issue / Community forum post (link here to close automatically):
@github-actions github-actions bot mentioned this pull request Sep 25, 2023
netroy added a commit that referenced this pull request Sep 25, 2023
## [1.8.2](https://github.com/n8n-io/n8n/compare/n8n@1.8.1...n8n@1.8.2)
(2023-09-25)


### Bug Fixes

* **editor:** Add debug feature docs link
([#7240](#7240))
([1b2ccca](1b2ccca))
* **editor:** Fix SQL editor issue
([#7236](#7236))
([539f954](539f954))


### Reverts

* Revert "fix: Issue enforcing user limits on start plan (#7188)"
([6589580](6589580))

Co-authored-by: netroy <netroy@users.noreply.github.com>
@janober
Copy link
Member

janober commented Sep 25, 2023

Got released with n8n@1.8.2

This was referenced Sep 27, 2023
netroy added a commit that referenced this pull request Sep 28, 2023
# [1.9.0](https://github.com/n8n-io/n8n/compare/n8n@1.8.0...n8n@1.9.0)
(2023-09-28)


### Bug Fixes

* **Airtable Node:** Attachments field type fix
([#7227](#7227))
([2af967c](2af967c))
* **core:** Change WorkflowHistory nodes/connections columns to be json
([#7282](#7282))
([a80abad](a80abad))
* **core:** Fix binary data manager check on pruning
([#7251](#7251))
([484035e](484035e))
* **core:** Fix missing execution ID in webhook-based workflow producing
binary data ([#7244](#7244))
([33991e9](33991e9))
* **core:** Handle filename* with quotes in Content-Disposition header
([#7229](#7229))
([67b985f](67b985f))
* **core:** Make DNS resolution order configurable
([#7272](#7272))
([5b3121c](5b3121c))
* **core:** Make senderId required for all command messages
([#7252](#7252))
([4b01428](4b01428))
* **core:** Prevent executions from displaying Running status
incorrectly ([#7261](#7261))
([861cac5](861cac5))
* **core:** Use consistent timezone-aware timestamps in postgres
([#6948](#6948))
([0132514](0132514)),
closes [#2178](#2178)
[#2810](#2810)
[#3855](#3855)
[#2813](#2813)
* **editor:** Add debug feature docs link
([#7240](#7240))
([4614e1e](4614e1e))
* **editor:** Fix SQL editor issue
([#7236](#7236))
([647fc6c](647fc6c))
* **editor:** Ensure new Set node is on top of search list
([#7215](#7215))
([2491ccf](2491ccf))
* **editor:** Forbid password reset when cloud account is limited in the
number of users [7188](#7188)
([303bc8e](303bc8e))
* **HTTP Request Node:** Add suggestion how to fix '429 - too many
requests' errors ([#7293](#7293))
([0bc33b1](0bc33b1))
* **Item Lists Node:** Concatenate operation pairedItems fix
([#7286](#7286))
([cde23a1](cde23a1))
* **Respond to Webhook Node:** JSON output from expression fix
([#7294](#7294))
([8bc369d](8bc369d))


### Features

* Add onboarding flow
([#7212](#7212))
([01e9340](01e9340))
* **core:** Add secrets provider reload and refactor
([#7277](#7277))
([53a7502](53a7502))
* **core:** Add Tournament as the new default expression evaluator
([#6964](#6964))
([bf74f09](bf74f09))
* **core:** Initial workflow history API
([#7234](#7234))
([0083a9e](0083a9e))
* **core:** Introduce object store service
([#7225](#7225))
([fa84545](fa84545))
* **editor:** Add user cloud ID to telemetry
[#7232](#7232)
([60c152d](60c152d))
* **editor:** Rework banners framework and add email confirmation banner
([#7205](#7205))
([b0e98b5](b0e98b5))
* **MISP Node:** Update credential to support HTTP Request node
([#7268](#7268))
([e4c302c](e4c302c))


### Performance Improvements

* **core:** Skip unneeded calls on every pruning cycle
([#7260](#7260))
([db01164](db01164))

Co-authored-by: netroy <netroy@users.noreply.github.com>
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.

3 participants