erlangpl-ui icon indicating copy to clipboard operation
erlangpl-ui copied to clipboard

Plugin system

Open baransu opened this issue 8 years ago • 5 comments

This issue is an umbrella issue for Erlang Performance Lab UI plugin system.

We're working on plugin system which will provide other developers easy way for creating new functionality for Erlang Performance Lab.

Our key part are epl-scripts. This is Node dependency providing dev, build and test functionality for every plugin. It's preconfigured blackbox with all required parts for new EPL plugin development. Because by default epl-scripts are preconfigured we support almost none additional configuration. But there comes eject functionality. You can eject your project which move all epl-scripts config and scripts into your project. This allow you to tweak configs and/or add custom functionality which we don't support. This is one way path. You cannot revert ejection.

Another part are epl-components. This dependency will provide styled component for building new EPL views as well as some helper functions for socket connection, Footer and Menu API, etc. Both epl-scripts and epl-components will be published to npm.

erlangpl-ui will require some refactoring to allow plugins loading in both development mode as well as production mode. In later phase we're thinking about loading additional plugins at runtime, but this may change in the future.

epl-scripts

  • [ ] Add Elm support https://github.com/erlanglab/epl-scripts/issues/2
  • [ ] Make eject work https://github.com/erlanglab/epl-scripts/issues/3
  • [x] CSS and static files export/import https://github.com/erlanglab/epl-scripts/issues/4

epl-components

To be defained

erlangpl-ui

  • [x] figure out development method
  • [x] inject styles and scripts for prebuilt plugins
  • [x] register Component, reducer, and navigation for every available plugin

baransu avatar Mar 29 '17 21:03 baransu

Can you please explain eject functionality? I'm not sure I get it 😦

arkgil avatar Mar 29 '17 21:03 arkgil

This is concept borrowed from create-react-app. This will remove one dependency (epl-scripts) and move all config/scripts from this into your project so you can tweak them and adjust as you want.

baransu avatar Mar 29 '17 21:03 baransu

erlangpl-ui started as create-react-app project and right now, we're ejected which gives us full control over configuration. It was required to support Elm for example.

baransu avatar Mar 29 '17 21:03 baransu

Thanks, now I understand :) Sounds good 👍

arkgil avatar Mar 29 '17 22:03 arkgil

I'm going to merge experimental plugin system as fast as possible because we want to merge erlangpl-ui into erlangpl repo. This issue will be updated to contain all things for complete plugins system for both UI and Erlang part.

baransu avatar Apr 05 '17 20:04 baransu