Commit Graph

52 Commits

Author SHA1 Message Date
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 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
Nick O'Leary 9b2e9ec41a
[groups] Support undo of convert to subflow from inside group 2020-03-16 22:51:54 +00:00
Nick O'Leary 1bf3b3077e
[groups] Include groups when converting selection to subflow 2020-03-14 00:17:16 +00:00
Nick O'Leary 7886e5d57c
[groups] Add undo support for group actions 2020-03-13 23:01:01 +00:00
Nick O'Leary 0ef3471f8f
[groups] Add undo of group import 2020-03-13 11:27:13 +00:00
Nick O'Leary d1dd7d1d51
[groups] Support copy/paste/import/export of groups 2020-03-09 11:14:18 +00:00
Nick O'Leary 9a0c843f29
[groups] Support deleting groups as part of selection 2020-03-05 22:49:31 +00:00
Nick O'Leary 51ea5dc342
[groups] Add ungroup-selection action 2020-03-05 10:43:28 +00:00
Nick O'Leary 86ce5c591b
[groups] add basic group functionality to editor 2020-03-03 20:55:01 +00:00
Nick O'Leary cc177533e8
Dont export subflow template creds by default 2020-02-10 11:28:56 +00:00
Nick O'Leary cd210d9fbf
Add support for credential-stored env var in subflow 2020-02-10 11:28:56 +00:00
Kazuhito Yokoi faf6fa9450 Fix copy and paste handling in subflow 2019-10-16 20:59:01 +09:00
Nick O'Leary e5738d608c
Add fallback for Object.values call in IE11 2019-09-30 10:58:03 +01:00
Nick O'Leary 6fc9c03d70
Ensure complete node scope property is remapped on import 2019-09-24 21:04:33 +01:00
Nick O'Leary 6fb6b13037
Normalise default subflow color references 2019-09-23 10:28:26 +01:00
Nick O'Leary 607bc42f59
Merge branch 'dev' into pr_2225 2019-08-12 15:05:12 +01:00
Nick O'Leary 880757fb5d
Rework Subflow Instance property UI (#2236)
* Add support of Subflow UI definition

* new UI definition for env var

* fix label

* fixed value obtaining

* fixed label width

* fix checkbox

* fix subflow info

* remove old subflow ui tests

* add tests

* merge ui new changes

* fix initial open button

* fix environment variable edit tab

* WIP: cp-1

* Rework subflow ui property

* Restrict SF value type according to input selection

* Move subflow property UI code to subflow.js

* Update subflow ui type select appearance

* Present subflow instance properties as table rather than generated UI

* Move subflow instance properties to separate tab

* Fix subflow property ui element layout issues
2019-08-12 15:01:54 +01:00
Nick O'Leary 238de59a2a
Merge pull request #2232 from node-red-hitachi/fix-delete-tab
fix reference error on deleting tab
2019-07-30 23:04:01 +01:00
Hiroyasu Nishiyama cbce9b8637 fix undo handling & typo 2019-07-30 11:07:55 +09:00
Hiroyasu Nishiyama 86928bbb2d fix converting selection to subflow 2019-07-26 23:06:56 +09:00
Hiroyasu Nishiyama 25a27733b9 fix reference error on deleting tab 2019-07-15 11:23:27 +09:00
Hiroyasu Nishiyama 3ee8bcad8c add support for specifying subflow template color 2019-07-08 23:52:08 +09:00
Nick O'Leary f0a51bafbe
Use node/tab map to make filterNodes more efficient 2019-07-08 10:55:26 +01:00
Nick O'Leary d623848c87
Update all node icons to SVG
When listing icons provided by a module, if there is a png and svg
with the same name, only the svg will be listed.

If a node asks for a png icon which is not known, but there is a
corresponding svg, that will be used instead.
2019-06-21 12:36:20 +01:00
Nick O'Leary 2473249c8b
Allow config nodes to be disabled, tidy css and add actions 2019-06-17 22:46:34 +01:00
Nick O'Leary 41a0af032c
Enable individual flow nodes to be disabled 2019-06-14 22:12:47 +01:00
Nick O'Leary 031362a633
Move all colours to sass variables 2019-05-15 13:54:29 +01:00
Nick O'Leary 8aa00b0cfc
Filter out duplicate nodes when importing a flow 2019-03-15 19:02:24 +00:00
Nick O'Leary 1fe8b388a3
Allow subflow env-var list to resize with the dialog 2019-02-04 17:20:31 +00:00
Nick O'Leary 5110eaff96
Merge branch 'dev' into pr_2042 2019-02-04 14:39:00 +00:00
Nick O'Leary 3bcff91328
Add Status Node to Subflow to allow subflow-specific status
Closes #597
2019-02-01 23:44:50 +00:00
Hiroyasu Nishiyama a413f3cded Add support of subflow env var 2019-01-26 23:15:20 +09:00
Nick O'Leary 0e035e47df
Avoid duplicate links when missing node type installed
Fixes #2032
2019-01-17 22:35:58 +00:00
Nick O'Leary e6e7747ae1
Handle missing wires prop and string x/y props on import 2018-11-13 13:29:48 +00:00
Nick O'Leary 5cfc52ea18
Support dbl-click in tab bar to add new flow in position 2018-10-26 23:09:41 +01:00
Nick O'Leary 49fe13f22f
Fix duplicate subflow detection on import 2018-10-26 23:09:41 +01:00
Nick O'Leary 7dcca2c907
Add import notification with info on what has been imported
Closes #1862
2018-10-24 11:07:48 +01:00
Nick O'Leary 0376e0d711
Allow a node label to be hidden 2018-10-08 16:25:11 +01:00
nakanishi f13e02a1a9 Added font-awesome icons to user defined icon 2018-09-26 09:16:15 +09:00
Nick O'Leary a866aa9c18
Merge branch 'dev' into repackage 2018-09-21 11:47:34 +01:00