onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.35k stars 301 forks source link

Plugins: UI Extensibility / Custom React components #412

Open bryphe opened 7 years ago

bryphe commented 7 years ago

Aside from just color schemes changes, I'd like to add plugin support for css styling / css skinning and theming.

This would open up the door for some very in-depth customization options, as well as slick animations. This would basically allow a plugin to include a stylesheet that is loaded - allowing the developer to customize font rendering, UI, etc.

This is a placeholder for now but will add more details as it materializes. Let me know if you have ideas / comments.

bryphe commented 6 years ago

A good example of the scenario I'd like to support is something like https://atom.io/packages/activate-power-mode.

bryphe commented 6 years ago

Also, add proof-of-concept by migrating the 'box-shadow' styling to a CSS file associated with onedark theme.

benjamin-rood commented 6 years ago

I'd been interested in pitching in to this if possible? Regular vim colour styles are fugly in general, and make Oni look bad. I find dark colour schemes much harder to read than light ones. It's clear that the functional direction for Oni is to have all the decorative customisation of an "electron" text editor but with (Neo) Vim tooling.

bryphe commented 6 years ago

Hi @benjamin-rood ,

Would be great to have your help here! We're starting to add the ability to customize colors beyond plain vim colorschemes - there's an example here: https://github.com/onivim/oni/blob/master/extensions/theme-onedark/colors/onedark.json

And then the ability to specify them via config: https://github.com/onivim/oni/blob/master/extensions/theme-onedark/colors/onedark.json

It's clear that the functional direction for Oni is to have all the decorative customisation of an "electron" text editor but with (Neo) Vim tooling.

Well put, yes, this is exactly the direction we're heading 👍

Beyond specifying colors, there are some next-level customizations we could do, by virtue of being an electron editor:

Let me know if you need any help getting started here - definitely appreciate your help!

IMO, a good litmus test for this level of extensibility is if we can support a plugin like this: https://atom.io/packages/activate-power-mode

If we can support something like that, we can likely support a wide breadth of customizations.

bryphe commented 6 years ago

Just a heads up @benjamin-rood - it looks like we're moving towards using styled-components in #1134 , so as opposed to bringing in a CSS file, for the deep extensibility we'll need to pursue the Custom React component approach.

veeramarni commented 6 years ago

wondering if we can inject extension component similar to described here

bryphe commented 6 years ago

@veeramarni - that's cool! I didn't know about that library. That would be perfect for this use case.