noflo / noflo-ui

NoFlo Development Environment
https://app.flowhub.io
MIT License
764 stars 174 forks source link

Nicer UI for port value input #309

Open mattbrailsford opened 9 years ago

mattbrailsford commented 9 years ago

It would be nice instead of just having small string input fields for all ports in the editor if component developers could some how provide a custom UI to promt the user for those fields.

Take for example the twitter component http://noflojs.org/library/noflo-twitter/. It requires OAuth data providing in a specific JSON format. As someone new to noflo, being presenting with a simple small input field didn't prompt me in any way as to what I needed to enter into the fields. It was only after digging into the source of the component did I discover what was needed.

It would be great if the component developer could define a custom UI to help prompt the user for the required fields, and have the UI format the value in whatever format the component requires. Ultimately it would still be using strings, but from an editors perspective, it's a much more meaningful / self explanatory UI.

bergie commented 9 years ago

@mattbrailsford thanks for posting this!

In both NoFlo and the FBP protocol that we use to talk to the runtimes, the ports have two different levels of type information:

Until now we've focused on the low-level datatypes since they're at least the base level we need to know about to be able to present a UI, and to help users to know which ports can be connected with each other.

Starting to support the higher-level types would allow us to give much nicer UIs for the special cases like OAuth tokens, URLs, whatever. But for this to happen there needs to be to things done:

  1. Components need to be annotated with the right information
  2. We need to then add special editing widgets for this

See some older discussion about types in https://github.com/noflo/noflo/issues/84

jonnor commented 8 years ago

Related: #184