elastic / template-kibana-plugin

sao.js template for kibana plugins
Apache License 2.0
64 stars 34 forks source link

generate ReactJS based plugin #13

Closed blacktop closed 6 years ago

blacktop commented 6 years ago

I know that the UI is moving towards React components, so it would be awesome to get a reactJS version of a base plugin to start playing with? 😁

blacktop commented 6 years ago

or one that uses https://github.com/elastic/eui ?

w33ble commented 6 years ago

@elastic/kibana-platform if we were going to add this, do we have a canonical way to bootstrap React apps?

kimjoar commented 6 years ago

@w33ble Hm, I don't think we have that yet. We've of course got the plugins using it, but no canonical setup as far as I know. I haven't really done React/UI work lately, so I'm not fully up-to-date on how we handle things right now. I know there's some details around the router and things like that too (cc @bmcconaghy, who worked on that).

Would be great to have a template with React + router setup + EUI.

cc @cjcenizal

bmcconaghy commented 6 years ago

Yeah I think we are at the point to build something like that. Do we already supply a base plugin template? @w33ble @kjbekkelund

kimjoar commented 6 years ago

@bmcconaghy Yep, check the template folder (https://github.com/elastic/template-kibana-plugin/tree/master/template) for the current template

w33ble commented 6 years ago

Do we already supply a base plugin template?

@bmcconaghy you mean... this repo? 😝

bmcconaghy commented 6 years ago

Can someone put in a PR to make the name more obvious :-)

cjcenizal commented 6 years ago

Would be great to have a template with React + router setup + EUI

I've added this to the EUIfication roadmap. This will be a priority for the current release cycle (6.3).

blacktop commented 6 years ago

me

bmcconaghy commented 6 years ago

I'm actually working some on it.

w33ble commented 6 years ago

The effort for this is happening upstream in kbn-plugin-generator. It's stalled, see https://github.com/elastic/kibana/pull/16937, but either way, the effort should happen upstream. Drop a comment on that PR, or maybe even open an issue in the Kibana repo about it.

zallan114 commented 6 years ago

I adaped one from kbn-plugin-generator to fit kibana 6.0.2 with latest React/Dom/React-Route, looks good. it's really better than angular one.

zallan114 commented 6 years ago

but the issue is why the compiled plugin bundle.js is so big, it's almost 10M.......

w33ble commented 6 years ago

why the compiled plugin bundle.js is so big, it's almost 10M.......

It includes a lot of stuff. Both react and angular, a bunch of addons for both, and a boatload of other dependencies. As you can see in the repo, the dependency list is not small.

satishwaghela commented 4 years ago

I created sample react visualisation plugin to play : https://github.com/satishwaghela/kibana-react-visualisation-example