KEMBAR78
Add support for wrapping ui elements in a subflow by Steve-Mcl · Pull Request #634 · FlowFuse/node-red-dashboard · GitHub
Skip to content

Conversation

Steve-Mcl
Copy link
Contributor

@Steve-Mcl Steve-Mcl commented Mar 1, 2024

Description

Adds support for using UI nodes in a subflow.

Depends on node-red/node-red#4587

Configs.in.subflows.-.dashboard.demo.mp4

Updated to use the subflow icon and provide a hint to the subflow template used in the tooltip:
image

TODO

  • tests?

Related Issue(s)

#270

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Steve-Mcl Steve-Mcl marked this pull request as ready for review March 1, 2024 15:53
@Steve-Mcl
Copy link
Contributor Author

Marked ready for review,. not certain where i can add tests or docs TBH.

Will let the review dictate that

@Steve-Mcl Steve-Mcl requested a review from joepavitt March 1, 2024 15:55
@joepavitt
Copy link
Contributor

There's a lot here, and it's quite transformational in terms of some of the helper/utilise functions being put in, but have done my best to at least offer a first sweep of opinions/thoughts.

@joepavitt joepavitt self-requested a review March 5, 2024 09:28
@joepavitt
Copy link
Contributor

joepavitt commented Mar 8, 2024

Going to re-review this today. I'm thinking a docs section inside the "User Guides" section would work well.

I'm happy to write that, but don't have a hands on local working example for me to run with - I assume there is a branch I can checkout for NR core? Assuming it's https://github.com/Steve-Mcl/node-red/tree/config-in-subflow?

For the tests, I can add more detail to the "Testing" docs I have on Dashboard with some tricks and tips I've learned, and it'll be nice to see someone else give those a go to sanity check my workflow. As E2E tests go - they're actually quite "fun"

@joepavitt
Copy link
Contributor

joepavitt commented Mar 8, 2024

Oh @Steve-Mcl's it's wonderful

Subflow Config & Flow in Editor:

Screenshot 2024-03-08 at 11 36 44 Screenshot 2024-03-08 at 11 37 16

Subflow Instances in Editor:

Screenshot 2024-03-08 at 11 33 10

Rendered Instances in Dashboard:

Screenshot 2024-03-08 at 11 36 19

@joepavitt
Copy link
Contributor

Okay, one issue and I'm not sure how to resolve it. Setting widget size after it's been moved into a subflow. Because there is no group assigned to the widget, the sizing widget doesn't allow for interaction.

@joepavitt
Copy link
Contributor

Doesn't show all of it, but quick glimpse at the docs I've added:

Screen.Recording.2024-03-08.at.16.13.25.mov

Copy link
Contributor

@joepavitt joepavitt left a comment

Choose a reason for hiding this comment

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

@Steve-Mcl only two outstanding items:

Okay, one issue and I'm not sure how to resolve it. Setting widget size after it's been moved into a subflow. Because there is no group assigned to the widget, the sizing widget doesn't allow for interaction.

and E2E tests, where I've added more docs in with #657

# Conflicts:
#	nodes/config/ui_base.html
@joepavitt
Copy link
Contributor

Happy to merge this without E2e's as currently, we test against Node-RED 3.1.x and should continue to do so for now. The existing E2E test portfolio will cover that this hasn't introduced any regressions, and once we officially move to 4.x as our main supported version for NR, then we can be sure the underlying tests support that.

@joepavitt joepavitt self-requested a review March 13, 2024 11:39
@joepavitt joepavitt merged commit 3a3f06a into main Mar 13, 2024
@joepavitt joepavitt deleted the support-subflows branch March 13, 2024 11:41
@colinl
Copy link
Contributor

colinl commented Mar 13, 2024

Will this work with current node red or will it require V4?

@joepavitt
Copy link
Contributor

Will this work with current node red or will it require V4?

v4.x only - details added in the docs: https://dashboard.flowfuse.com/user/subflows.html#subflows-in-dashboard-2-0

@colinl
Copy link
Contributor

colinl commented Mar 13, 2024

OK, thanks. We just have to be patient then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants