Commit Graph

91 Commits

Author SHA1 Message Date
Nick O'Leary ccfde84769
Merge pull request #2812 from node-red/property-types
Support node property typing
2021-01-12 23:56:01 +00:00
Nick O'Leary ea2e3f25d8
Implement node property typing
See https://github.com/node-red/designs/pull/37
2021-01-08 14:19:12 +00:00
Nick O'Leary d5cc5b2574
Use subflow.info for help text and meta.type for node type 2021-01-07 15:34:27 +00:00
Nick O'Leary de15a1c36f
Add subflow meta data edit pane 2021-01-07 11:10:58 +00:00
Nick O'Leary 30a68fefec
Ensure subflow-scoped config nodes do not get moved on import
Fixes #2789
2021-01-06 11:22:52 +00:00
Nick O'Leary 2b801a756a
Fix import of config nodes with unknown z property 2020-11-17 23:07:43 +00:00
Nick O'Leary 99478897c5
Ensure config nodes with invalid z are imported somewhere 2020-11-14 14:10:32 +00:00
Nick O'Leary 2c6cda1f27
Handle import errors on initial load and report to user 2020-11-02 21:14:24 +00:00
Nick O'Leary 0ecd9673b8
Only apply recovery tab on initial load
Fixes #2731
2020-10-21 10:36:47 +01:00
Nick O'Leary dc26022fb4
Prevent node z property getting set to 0 or "" 2020-10-19 13:24:04 +01:00
Nick O'Leary e8e44f9a32
Only apply z-recovery logic to flow nodes 2020-10-19 13:23:43 +01:00
Nick O'Leary e62fd7ed15
Remove bad z property from import config nodes 2020-10-19 12:53:03 +01:00
Nick O'Leary f46367d77b
Fix import of merged flow 2020-10-12 11:20:44 +01:00
Nick O'Leary 2f33575907
Merge branch 'dev' of github.com:node-red/node-red into dev 2020-09-21 20:12:42 +01:00
Nick O'Leary 3c444d3fb3
Merge branch 'master' into dev 2020-09-21 14:25:30 +01:00
Nick O'Leary 7cb499cde9
Sanitize unknown node type when displaying 2020-09-21 14:00:01 +01:00
Nick O'Leary 041feb4e86
Ensure sf instance nodes update in outliner when import-replace sf 2020-09-18 20:56:16 +01:00
Nick O'Leary a48f0827ae
Detect importing duplicate nodes and help user resolve 2020-09-16 11:59:13 +01:00
Nick O'Leary dc8991a1da
Ensure recoverd nodes tab is added to outliner properly 2020-09-03 20:24:50 +01:00
Nick O'Leary 7bd0ca2212
Handle nodes with invalid z property
Closes #2170
2020-09-03 18:31:33 +01:00
Nick O'Leary d590bbdd2c
Fix copy/paste of nested groups 2020-08-04 20:59:51 +01:00
Nick O'Leary 7f671c9f3f
Ensure unknown nodes removed from outliner when node registers
Fixes #2646
2020-07-10 20:00:18 +01:00
Nick O'Leary 979c5351a8
Ensure node/group xrefs are consistent on import 2020-07-10 15:59:28 +01:00
Nick O'Leary 11ac8fbf13
Ensure groups are removed when deleting subflows 2020-07-07 18:23:42 +01:00
Nick O'Leary 6c04402a98
Prevent wiring to node with no corresponding port
Fixes #2641
2020-07-06 17:32:44 +01:00
Nick O'Leary ef7c9b5c2a
Get group order right in history events to ensure proper handling 2020-07-06 16:00:15 +01:00
Nick O'Leary c061487a16
Massively reduce our dependency on d3 to render the view
This is a slightly scary set of changes to be making. It overhauls
how the view is rendered.

Rather than use d3 for every single part of generating the view,
we new use native DOM functions as much as possible.

d3 is still used for the basic heavy lifting of working out what
nodes/links etc need to be added/removed from the view. But once
it comes to rendering them, d3 is side-lined as much as possible.

There's room for further improvement. This change focusses on Nodes
and Links. It has not touched groups, subflow-ports and link-nodes.
2020-06-10 00:45:20 +01:00
Nick O'Leary 21866634b3
Track subflow instances on the subflow node itself 2020-06-08 11:49:43 +01:00
Nick O'Leary b4b2729e96
Do a sync-redraw after clearing to ensure clean state 2020-06-05 16:56:12 +01:00
Nick O'Leary 4c28b5b227
Only validate nodes once they have all been imported
This ensures any checks for dependent config nodes will pass
2020-06-04 17:06:29 +01:00
Nick O'Leary a7a949377b
Ensure configNode.users is updated properly on import 2020-06-04 17:06:11 +01:00
Nick O'Leary efecfa328b
Fix up event handling when deleting groups and tabs 2020-06-03 14:23:26 +01:00
Hiroyasu Nishiyama 2343fbd86a add variable declaration to prohibit jshint error 2020-05-20 13:47:56 +09:00
Nick O'Leary fe1f8ca0a8
Delay when nodes are added to internal model on import
Closes #2567

This ensures when the node:added event fires, all possible
changes have already been applied such as remapping node ids.

This avoids the need to emit a separate node:changed event.
2020-05-19 11:28:38 +01:00
Nick O'Leary f87698438d
[outliner] Handle switching projects properly 2020-05-07 21:48:47 +01:00
Nick O'Leary 2af7066512
Merge branch 'dev' into outliner 2020-05-05 15:11:35 +01:00
Nick O'Leary d7df20413d
Merge branch 'master' into dev 2020-05-04 11:41:44 +01:00
Nick O'Leary 2069cc4392
Add flows:reorder event 2020-04-27 10:49:54 +01:00
Nick O'Leary 373267c53b
Add more consistent events in the editor
This introduces a much more consistent set of events within the editor
for whenever a element is added, removed or modified.

The events emited on the `RED.events` event system. The event names
take the form: `"<thing>:<action>"`.

`<thing>` can be one of:
 - nodes
 - flows
 - subflows
 - groups
 - links

`<action>` can be one of:
 - add
 - remove
 - change

The payload of the events is the object in question.

There is also:
 - flows:reorder    - when tabs are reordered. Payload is array of flow ids.
 - workspace:clear  - when the workspace is emptied - part of switching projects

The `nodes:change` event was already used by RED.nodes.dirty() to cause
the Deploy button to become active. This renames that event to:
 - workspace:dirty  - Payload is boolean flag for the dirty state

This commit also updates the Palette to use the subflows:change event to
only redraw subflows that have actually changed rather than refresh them
all whenever one of them *might* have changed. This removes a noticable
flicker of the icon which was needlessly being redrawn.
2020-04-20 22:23:34 +01:00
Nick O'Leary 2f869a55e2
Handle nodes with no wires array 2020-04-06 15:39:48 +01:00
Nick O'Leary 04da13eaf9
Merge branch 'pr_2523' into dev 2020-03-31 15:59:31 +01:00
Nick O'Leary 7fa4df082e
Force sync redraw of view when replacing unknown nodes 2020-03-31 15:58:51 +01:00
Nick O'Leary ae001c5e82
Merge branch 'master' into dev 2020-03-31 15:35:46 +01:00
Nick O'Leary e7f942eda7
Update nodeTabMap when replacing unknown nodes 2020-03-31 15:34:48 +01:00
Hiroyasu Nishiyama 08ec04c889 merge upstream/dev 2020-03-31 19:05:22 +09:00
Hiroyasu Nishiyama e5150ea012 force redraw after node installation 2020-03-31 16:48:20 +09:00
Nick O'Leary e0bef941b4
[groups] Include groups when copying whole tabs 2020-03-26 20:26:58 +00:00
Nick O'Leary 03e9522d98
[groups] Include groups when exporting 2020-03-26 18:01:57 +00:00
Nick O'Leary 1bdbd31b96
[groups] Overhaul group drag handling for empty groups 2020-03-26 15:27:34 +00:00
Nick O'Leary 7bc3b662e4
[groups] Fix up various delete/undo actions with groups 2020-03-24 14:05:09 +00:00