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

feat(editor): Node creator actions #4696

Merged
merged 72 commits into from
Dec 9, 2022
Merged

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Nov 22, 2022

This PR implements categorization and display of node actions. Actions are visible when accessed via the "On App Event" node creator item from the trigger helper panel.

After clicking the action, we add a node to the canvas with prefilled fields corresponding to the action config. Because we're merging regular/trigger nodes, if the added action is from the regular node, we also add a Manual trigger.

Part of this PR is also unifying the names of the node overrides as requested by the product/design.

Categorization

Actions are categorized into two categories.

Resource actions(regular nodes)

To get these categories, we iterate over the resource options property of a node and create a category for each property. We then look for operations that correspond to this resource. To map the operation to the resource, we use displayOptions property which indicates if the operation option is relevant to the resource.

Recommended category(trigger nodes)

We check for the following properties in node config: 'event,' 'events,' and 'trigger on.' If any of these three exists, we take its options and parse them as recommended actions.

CleanShot.2022-11-30.at.15.32.01.mp4

# Conflicts:
#	packages/editor-ui/src/components/Node/NodeCreator/CategorizedItems.vue
… fix API actions display and prevent dragging of action nodes
…odes for the trigger helper panel, minor fixes
@n8n-assistant n8n-assistant bot added the core Enhancement outside /nodes-base and /editor-ui label Nov 23, 2022
@OlegIvaniv OlegIvaniv self-assigned this Dec 8, 2022
Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

Looking good, left some minor comments

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

Forgot to approve last time.

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

LGTM.

@OlegIvaniv
Copy link
Contributor Author

@MiloradFilipovic I goofed up and forgot to fix the breaking e2e tests. Should be all green now. Can you approve once more, please?

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

Tests look good.

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

LGTM

@OlegIvaniv OlegIvaniv merged commit 79fe57d into master Dec 9, 2022
@OlegIvaniv OlegIvaniv deleted the n8n-5032-node-actions-list branch December 9, 2022 09:56
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Dec 9, 2022
MiloradFilipovic added a commit that referenced this pull request Dec 9, 2022
* master:
  fix: Use license-sdk v1.6.1 (#4872)
  feat(editor): Node creator actions (#4696)
  test(editor): Set e2e test retries (#4870)
  fix: Increase workflow reactivation max timeout to 1 day (#4869)
  fix: Stop returning `UNKNOWN ERROR` in the response if an actual error message is available (#4859)
  fix: Issue listing executions with Postgres (#4856)
  test(editor): Fix flaky e2e tests (#4779)
  fix: Use the same entrypoint for custom docker images as for the other images (no-changelog) (#4849)
  refactor: Deprecate `alwaysOpenEditWindow` for `string` (#4839)
  fix: Upgrade sse-channel to mitigate CVE-2019-10744 (#4835)

# Conflicts:
#	packages/editor-ui/src/App.vue
#	packages/editor-ui/src/views/NodeView.vue
MiloradFilipovic added a commit that referenced this pull request Dec 9, 2022
* feature/undo-redo:
  ⚡ Fixing tracking new nodes after latest merge
  ⚡ Fixing undo for moving connections
  ⚡ Fixing recording when moving nodes
  fix: Use license-sdk v1.6.1 (#4872)
  feat(editor): Node creator actions (#4696)
  test(editor): Set e2e test retries (#4870)
  ⚡ Fix for not clearing redo stack on every user action
  fix: Increase workflow reactivation max timeout to 1 day (#4869)
  👌 Implemented command comparing logic
  👌 Moving undo logic for disabling nodes to `NodeView`
  👌 Addressing PR comments part 1
  fix: Stop returning `UNKNOWN ERROR` in the response if an actual error message is available (#4859)
  fix: Issue listing executions with Postgres (#4856)
  test(editor): Fix flaky e2e tests (#4779)
  fix: Use the same entrypoint for custom docker images as for the other images (no-changelog) (#4849)
  refactor: Deprecate `alwaysOpenEditWindow` for `string` (#4839)
  fix: Upgrade sse-channel to mitigate CVE-2019-10744 (#4835)

# Conflicts:
#	cypress/e2e/7-workflow-actions.cy.ts
#	cypress/pages/workflow.ts
@janober
Copy link
Member

janober commented Dec 12, 2022

Got released with n8n@0.207.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui 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