Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating individual plugins for core plugins #126

Closed
z3t0 opened this issue Nov 21, 2016 · 11 comments
Closed

Creating individual plugins for core plugins #126

z3t0 opened this issue Nov 21, 2016 · 11 comments

Comments

@z3t0
Copy link
Contributor

z3t0 commented Nov 21, 2016

Is there any particular reason for having "core" plugins? In my opinion it would be easier to maintain them if they were separate. Also, those only interested in a particular feature would find it easier to say work on the screenshot plugin if it was its own project.

Thoughts?

@vutran
Copy link
Member

vutran commented Nov 21, 2016

Open for discussions as I previously had core plugins externalized from the app. I bundled it into core since a lot of users expected the general functionalities available as part of the app.

@z3t0
Copy link
Contributor Author

z3t0 commented Nov 21, 2016

That's a fair point, since it would be confusing for a lot of users if the core app can't do any of the things advertised.

Instead how about having a configuration file that would automatically download and update apps and etc?

E.g

// Plugins
"z3t0/someplugin" : 0.1,
"vutran/dext-screensaver": 0.2^

essentially something similar to vim's plugin management (if you've used that before), or even a lot like npm package.json files.

Then we can supply a default configuration with all the "core" plugins listed so that the functionality comes out of the box, but is still developed separately?

Just seems like the best of both worlds in my opinion

@vutran
Copy link
Member

vutran commented Nov 21, 2016

I like that idea. Currently, we do have a way to manage plugins via the ~/.dext/config.json file but it doesn't track versions. This is something we'll need to expand on discussions if we want more granular control moving forwards. We do have plans for an easy to use settings window in the future which may make things easier since the dpm cli tool is more for power users

@z3t0
Copy link
Contributor Author

z3t0 commented Nov 21, 2016

It seems that the config.json already has support for keeping track of plugins, we simply need to add a built in packagement management tool for dext so that it can read the config file and auto install / update?

@vutran
Copy link
Member

vutran commented Nov 21, 2016

We do have an external CLI tool here and I'm currently working on building an internal plugin that interfaces with this within the dext bar itself.

@vutran
Copy link
Member

vutran commented Jan 11, 2017

I want to pick this issue up again. Now that we are splitting up some of the core plugins into external packages, we'll need a way for Dext to automatically download and install pre-packaged plugins that is found in the ~/.dext/config.json file.

@Magellol
Copy link
Collaborator

Magellol commented Jan 24, 2017

Just a thought:
Can't we extract them into their own repo/npm packages, making them dependencies of Dext and requiring them in the code. Maybe that'd solve the two issues (having them separated but at the same time still in the core functionalities).

EDIT: Actually after reading this thread again maybe that's what @z3t0 meant in this comment 🙊

@vutran
Copy link
Member

vutran commented Jan 24, 2017

Can't we extract them into their own repo/npm packages, making them dependencies of Dext and requiring them in the code. Maybe that'd solve the two issues (having them separated but at the same time still in the core functionalities).

I must have misinterpreted the original issue but I think what @z3t0 is referring to is an option for the app to automatically check and install plugins that are listed in the ~/.dext/config.json` file similar to how Hyper works.

Ways I can see this being beneficial for Dext:

  • specify default plugins (per platform) on boot.
  • users can save their ~/.dext/config.json file like any other dotfile and sync between computers and Dext will autoload/install upon boot.

I really do think this is great idea and to expand on it, we can namespace all core plugins on npm as scoped packages (eg: @dext/darwin-applications-plugin) to distinguish between core apps and community apps.

@Magellol
Copy link
Collaborator

Oh my, I think I've misinterpreted it then :) This all makes sense.

I think this bit mislead me.

Is there any particular reason for having "core" plugins? In my opinion it would be easier to maintain them if they were separate

That's why I thought about having separate NPM packages for them, which I still think could be interesting but may be out of this issue's scope.

@mrjohnyhats
Copy link

not sure if this is the right thread to put this in, but I heard settings window mentioned so I made one with react/redux/radium and served by electron. It's a bit barebones right now, but what is there should work, and adding new features shouldn't be too difficult.

@adnasa
Copy link
Member

adnasa commented Apr 5, 2018

Hey guys,

I'm going to close this issue for a handful, some obvious reasons:

  1. having core plugins as separate modules doesn't ease maintainability
  2. I for one am a strong proponent for mono-repo, which in my experience validates point 1 (see example below). Within this mono-repo, we will consolidate all "core" plugins in one, along with dext itself
  3. with a mono-repo, it will ease the release step of dext, and we wouldn't cause unnecessary cognitive overhead of having to maintaining versions of "core" plugins since they are bundled externally
/dext
  /app // the electron app
  /utils // previously `dext-core-utils`
  /cli // previously `dext-cli`
  /theme-* // any core theme prefixed with `theme-*`
  /plugin-* // any core plugin prefixed with `plugin-*`

As of this moment, this proposal (also my draft for dext) is interchangable, and I welcome suggestions, feedback and thoughts. For now, to do this effectively, create a new issue on this repo with the draft as reference. I highly encourage this approach, to avoid noise on the gist

ref: https://gist.github.com/adnasa/fec7c66d39f700371262437bb22732ad#lerna

@adnasa adnasa closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants