syndesisio / syndesis-ui

The front end application or UI for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis.io/
14 stars 28 forks source link

Widget for adding keywords (building a Comma Separated List) #563

Closed KurtStam closed 7 years ago

KurtStam commented 7 years ago

As part of Search we need to support a widget so the user can add search keywords. The property meta data will be set to a String, or maybe an array if that makes more sense, I'm still looking into adding the component.

https://issues.jboss.org/browse/IPAAS-321

gashcrumb commented 7 years ago

@dongniwang haven't seen yet if there's a patternfly widget/example that covers this other than kind of the patternfly filter in a toolbar, but this is for the connection configuration form.

gashcrumb commented 7 years ago

@KurtStam for some of our previous form stuff we used to use a config kinda like:

type: 'array',
items: {
  type: 'string'
}

like here -> http://forms.hawt.io/forms2/array_example?main-tab=hawtio-forms2-tests-form2&sub-tab=hawtio-forms2-tests-form2-array_example

so could maybe be a potential way of having this configuration, though I'm not sure we'll go with a similar implementation as the linked page.

dongniwang commented 7 years ago

@KurtStam @gashcrumb I think what searching keyword(s) does is very similar to how filtering works. I'm working on the designs for filter, so maybe we can leverage some ideas from the filter designs.

Also, are we talking about something like this:https://twitter.com/search-advanced?lang=en Or this: https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/

@gashcrumb - to your point, yes, the PatternFly filter in a toolbar is the closest we have right now.

gashcrumb commented 7 years ago

@dongniwang yeah, the bootstrap tags input widget definitely came to mind. I'll probably want to go and find a non-jquery version though.

KurtStam commented 7 years ago

@dongniwang There are 2 ways to search

  1. Using simple comma separated keywords
  2. 'Advanced Filtering' which allows twitter search syntax (adding 'AND' or 'OR' etc.

We will target 1, before targeting 2. I think 1 can be satisfied with the bootstrap widget. At some point the question will be if we create 2 search components or one that supports both types. But we don't have to discuss that right now.

dongniwang commented 7 years ago

@KurtStam Thanks for clarifying this!

@gashcrumb Let me know if you need anything else. Is a screen design needed for this sprint?

gashcrumb commented 7 years ago

@dongniwang I don't think a screen design should be necessary.

gashcrumb commented 7 years ago

@KurtStam how would you expect the data in this case? An array or comma-separated values? I'm kind of assuming the former unless I hear otherwise...

jimmidyson commented 7 years ago

Definitely an array.

KurtStam commented 7 years ago

@gashcrumb at the moment (https://github.com/KurtStam/camel/blob/master/connectors/examples/twitter-search-connector/src/main/resources/camel-connector-schema.json#L27) the existing connector has it defined as a comma separated string. I will check how easy it is to change it.

gashcrumb commented 7 years ago

@KurtStam yeah, this will need the schema updated so that we know what widget to use, so the type can't be just string like it is now. If we want it to be an array, use type: 'array'. If we think there might be other possibilities for inputting multiple properties, maybe we should have a specific tag list type like type: 'taglist'.

In any case, I definitely think we should avoid comma-separated values in forms whenever possible, as then we've additional sanitization of user input that'd be needed in multiple layers.

gashcrumb commented 7 years ago

@KurtStam btw is there an issue in the connector project repo for this so I can see how it's coming along?

KurtStam commented 7 years ago

@gashcrumb yes as referenced in the IPaas issue, but here it is: https://github.com/syndesisio/syndesis-rest/issues/384

gashcrumb commented 7 years ago

I'm not sure that this should be closed, while the support is there for the widget the code isn't in place in the form generator to use it (if it's still required). @KurtStam in the component is it going to continue using a string input or did we decide to use taglist or something?

gashcrumb commented 7 years ago

Backend just wants a comma-separated string, so no UI work on this one currently needed.