[carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Ruwini Wijesiri
Hi All,

The widget generation wizard enables user to create widgets by configuring a data source and publisher information.

We have a requirement to enable user to create a autocomplete search bar using the widget generation wizard. The user will specify a column of the configured data source and the search bar will list down it's content. The value(s) selected using this widget will be published to its subscribers.

There are 2 approaches to implement this;

1. Include the autocomplete in react-vizgrammar 

Drawbacks:
      • All components available in react-vizgrammar are charts, since an autocomplete isn't a chart, putting it in react-vizgrammar seems like a misfit.
      • The autocomplete is implemented using material-ui 1.5.0 and this requires react 16.3.0 or above. Currently, react-vizgrammar is on react 16.0.0, therefore react versions needs to be bumped. An upgrade may cause issues in the existing implementation.
2. Generalize the implementation universal-widget and introduce 2 new modules to handle each type.

-parent-renderer
-vizgrammar-renderer
-search-renderer

Current implementation of universal widget can be refactored as above, where the 'parent-renderer' will contain the implementations common to all widgets such as publisher configuration creation, 'vizgrammar-renderer' contain implementation specific to rendering vizgrammar charts and 'search-renderercontain implementation specific to rendering the search bar.

Drawbacks:
      • Not backward compatible. The existing dashboards identifies the widget generation wizard by the name universal widget. Renaming universal widget to 'parent-renderer' will either require migration scripts to replace term universal widget with 'vizgrammar-renderer' or 'search-renderer' or this will need to be handled at dashboard level.
IMO i think the second approach would be better since;
  • Adding an autocomplete select along with charts seems a misfit
  • Scalable, can facilitate future introductions of other types of widgets into the widget generation wizard.

Any thoughts on these 2 approaches or any other approach is highly appreciated. 

Thanks,
Regards,
Ruwini

Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Tanya Madurapperuma
+1 for the second approach.

On Thu, Sep 20, 2018 at 5:33 PM, Ruwini Wijesiri <[hidden email]> wrote:
Hi All,

The widget generation wizard enables user to create widgets by configuring a data source and publisher information.

We have a requirement to enable user to create a autocomplete search bar using the widget generation wizard. The user will specify a column of the configured data source and the search bar will list down it's content. The value(s) selected using this widget will be published to its subscribers.

There are 2 approaches to implement this;

1. Include the autocomplete in react-vizgrammar 

Drawbacks:
      • All components available in react-vizgrammar are charts, since an autocomplete isn't a chart, putting it in react-vizgrammar seems like a misfit.
      • The autocomplete is implemented using material-ui 1.5.0 and this requires react 16.3.0 or above. Currently, react-vizgrammar is on react 16.0.0, therefore react versions needs to be bumped. An upgrade may cause issues in the existing implementation.
2. Generalize the implementation universal-widget and introduce 2 new modules to handle each type.

-parent-renderer
-vizgrammar-renderer
-search-renderer

Current implementation of universal widget can be refactored as above, where the 'parent-renderer' will contain the implementations common to all widgets such as publisher configuration creation, 'vizgrammar-renderer' contain implementation specific to rendering vizgrammar charts and 'search-renderercontain implementation specific to rendering the search bar.

Drawbacks:
      • Not backward compatible. The existing dashboards identifies the widget generation wizard by the name universal widget. Renaming universal widget to 'parent-renderer' will either require migration scripts to replace term universal widget with 'vizgrammar-renderer' or 'search-renderer' or this will need to be handled at dashboard level. 
I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

Thanks,
Tanya
IMO i think the second approach would be better since;
  • Adding an autocomplete select along with charts seems a misfit
  • Scalable, can facilitate future introductions of other types of widgets into the widget generation wizard.

Any thoughts on these 2 approaches or any other approach is highly appreciated. 

Thanks,
Regards,
Ruwini

Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 





--
Tanya Madurapperuma | Associate Technical Lead| WSO2 Inc.
(m) +94718184439 | (e) [hidden email]





_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Ruwini Wijesiri
Hi Tanya,

Thank you for the response.

I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

+1 for this.  

Thanks,
Regards,
Ruwini.

On Fri, Sep 21, 2018 at 8:37 AM Tanya Madurapperuma <[hidden email]> wrote:
+1 for the second approach.


--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Sajith Ariyarathna
+1 for 2nd approach.
+1 for suggested migration implementation.

Thanks.

On Fri, Sep 21, 2018 at 9:38 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Tanya,

Thank you for the response.

I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

+1 for this.  

Thanks,
Regards,
Ruwini.

On Fri, Sep 21, 2018 at 8:37 AM Tanya Madurapperuma <[hidden email]> wrote:
+1 for the second approach.


--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Sajith Janaprasad Ariyarathna
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Ruwini Wijesiri
Hi Sajith,

Thanks for the response. 

I'll proceed with this approach.

Thanks,
Regards,
Ruwini

On Fri, Sep 21, 2018 at 9:44 AM Sajith Ariyarathna <[hidden email]> wrote:
+1 for 2nd approach.
+1 for suggested migration implementation.

Thanks.

On Fri, Sep 21, 2018 at 9:38 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Tanya,

Thank you for the response.

I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

+1 for this.  

Thanks,
Regards,
Ruwini.

On Fri, Sep 21, 2018 at 8:37 AM Tanya Madurapperuma <[hidden email]> wrote:
+1 for the second approach.


--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Sajith Janaprasad Ariyarathna
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/



--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Ruwini Wijesiri
Hi,

If we use the name 'UniversalWidget' instead of 'ParentRenderer' as shown below, it  will eliminate the backward compatibility issue. 

-universal-widget
-vizgrammar-renderer
-search-renderer

Appreciate your thoughts on this approach.

Thanks,
Regards,
Ruwini

On Fri, Sep 21, 2018 at 9:50 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Sajith,

Thanks for the response. 

I'll proceed with this approach.

Thanks,
Regards,
Ruwini

On Fri, Sep 21, 2018 at 9:44 AM Sajith Ariyarathna <[hidden email]> wrote:
+1 for 2nd approach.
+1 for suggested migration implementation.

Thanks.

On Fri, Sep 21, 2018 at 9:38 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Tanya,

Thank you for the response.

I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

+1 for this.  

Thanks,
Regards,
Ruwini.

On Fri, Sep 21, 2018 at 8:37 AM Tanya Madurapperuma <[hidden email]> wrote:
+1 for the second approach.


--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Sajith Janaprasad Ariyarathna
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/



--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [carbon-dashboards][widget-generation-wizard]Create an autocomplete search using widget generation wizard

Tanya Madurapperuma
To add bit more to what Ruwini has explained..

Universal widget currently reads the provider configuration and fetches data from the data source and render the vizgrammar chart using the fetched data according to the chart configuration. 
In the proposed approach we will still keep the provider configuration reading and fetching data related logic in the Universal Widget as it is and hand over the rendering to the specific rendering component based on the visual element type (i.e vizgrammer or search)
And Universal widget + renderers will get packed as a single module instead of multiple modules based on visual element renderer since it will avoid the backward compatibility issue.

Thanks,
Tanya

On Fri, Sep 21, 2018 at 10:44 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi,

If we use the name 'UniversalWidget' instead of 'ParentRenderer' as shown below, it  will eliminate the backward compatibility issue. 

-universal-widget
-vizgrammar-renderer
-search-renderer

Appreciate your thoughts on this approach.

Thanks,
Regards,
Ruwini

On Fri, Sep 21, 2018 at 9:50 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Sajith,

Thanks for the response. 

I'll proceed with this approach.

Thanks,
Regards,
Ruwini

On Fri, Sep 21, 2018 at 9:44 AM Sajith Ariyarathna <[hidden email]> wrote:
+1 for 2nd approach.
+1 for suggested migration implementation.

Thanks.

On Fri, Sep 21, 2018 at 9:38 AM Ruwini Wijesiri <[hidden email]> wrote:
Hi Tanya,

Thank you for the response.

I think its better to handle this at the dashboard level by making "UniversalWidget" a reserved word and replacing it with  "vizgrammar-renderer" in the Dashboard json before passing it to Golden Layout. So that customers don't need to bother about any additional migration effort.

+1 for this.  

Thanks,
Regards,
Ruwini.

On Fri, Sep 21, 2018 at 8:37 AM Tanya Madurapperuma <[hidden email]> wrote:
+1 for the second approach.


--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Sajith Janaprasad Ariyarathna
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/



--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480 




--
Tanya Madurapperuma | Associate Technical Lead| WSO2 Inc.
(m) +94718184439 | (e) [hidden email]





_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture