FlowFuse / flowfuse

Connect, collect, transform, visualise, and interact with your Industrial Data in a single platform. Use FlowFuse to manage, scale and secure your Node-RED solutions.
https://flowfuse.com
Other
281 stars 63 forks source link

Create UI for selecting Flow Blueprints when creating instance #2874

Closed knolleary closed 1 year ago

knolleary commented 1 year ago

Part of #2828 MVP

Design proposals by @joepavitt in https://github.com/FlowFuse/flowfuse/issues/2828#issuecomment-1735335432

This will require the CRUD api to be delivered in #2871

The InstanceForm component will need to be updated to allow the FlowTemplate selection to be made.

MarianRaphael commented 1 year ago

@Yndira-FlowForge first iteration

A single new row in the Create Instance form, which defaults already to "Blank Template" and provides an option to "Choose Another/Alternative

Yndira-E commented 1 year ago

Hi, I've spoken with @MarianRaphael, and we looked at the screen for creating an instance. We agreed on having the default-blank template already selected, and the option to choose a different template, perhaps with a button that opens a modal window displaying a list of templates.

As I examined all the elements and options we already have in place, trying to determine the best location for this feature, I noticed that we already have something labeled "template" when creating an instance. The "default" option is already preselected. Initially, I thought that maybe @Pezmc had already started working on the smallest possible iteration. However, after discussing it with him, I understood that this is a different type of template.

Screenshot 2023-10-10 at 16 55 16 Screenshot 2023-10-10 at 16 55 28

Should we consider renaming these options? Having two items labeled "template" can be confusing. While one would be referred to as a 'Flow Template,' are we planning to keep the other one simply as 'template'? I don't see a description explaining what it means...

MarianRaphael commented 1 year ago

Good point, @Yndira-FlowForge. Let's keep the terminology for Templates as it is and call the new "templates" Flow Blueprints. The collection of Blueprints would be the FlowFuse Library

knolleary commented 1 year ago

In production, we only have one (Project) Template, which causes this row to be hidden as there is no choice for the user. In staging we have two templates - hence why it shows that row.

For the majority of FF Cloud users, the existing 'Template' terminology isn't going to be something they have had to learn about. So I think we do have some ability to relabel if we see fit.

knolleary commented 1 year ago

@Pezmc I've added a couple curl commands here for listing and injecting templates into the database.

Yndira-E commented 1 year ago

@MarianRaphael I know we discussed a pop-up, but how about this for the smallest possible iteration?

This would be more aligned with:

A single new row in the Create Instance form, which defaults already to "Blank Template" and provides an option to "Choose Another/Alternative

1st state: without choosing an instance type. Create Application

2nd state: after choosing the instance type Create Application

MarianRaphael commented 1 year ago

Yes, this works for the first iteration. The next step, as discussed, would be to implement a popup following Joe's proposal: https://github.com/FlowFuse/flowfuse/issues/2828#issuecomment-1735335432

Pezmc commented 1 year ago

MVP implementation here:

Screenshot 2023-10-11 at 09 32 21