Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Plugins / themes system #65

Closed
8 tasks done
QuiiBz opened this issue Mar 13, 2021 · 0 comments
Closed
8 tasks done

Plugins / themes system #65

QuiiBz opened this issue Mar 13, 2021 · 0 comments
Labels
📜 documentation Improvements or additions to documentation 🚀 enhancement New feature or request

Comments

@QuiiBz
Copy link
Collaborator

QuiiBz commented Mar 13, 2021

We need a powerful, easy plugin system. Below are all the available triggers.

Event

An event is a callback called when something happens. It can have an object in parameter. For example, the onAppLoaded event is called when the app loads for the first time and takes the electron’s app object in the parameter.

  • onLoad()
  • onAppLoaded(app: Electron.app)
  • onAppClose()
  • onWindowShow(window: Electron.BrowserWindow)

Providers

A provider is a callback called at the startup time, to provide the plugin a specific feature.
For example, the provider provideNotifications is called immediately and gives us a callback used to add a new notification from anywhere.

  • provideNotifications(addNotification: Provider<INotification>

Hooks

A hook is a callback called when the desired object load, and can be hooked to be modified by plugins. Hooks takes the object in parameter and returns the modified object.
For example, the hookConfig hook is called when the config loads for the first time and when it changes, and we can change the config passed in parameter and return it back.

  • hookWindowOptions(options: Electron.BrowserWindowConstructorOptions) => Electron.BrowserWindowConstructorOptions
  • hookConfig(config: IConfig) => IConfig
  • hookTabIcon({ window: IWindow, icon: IconResolverType }) => { window: IWindow, icon: IconResolverType }

PR: #71

@QuiiBz QuiiBz added 🚀 enhancement New feature or request 📜 documentation Improvements or additions to documentation labels Mar 13, 2021
This was referenced Mar 14, 2021
@QuiiBz QuiiBz changed the title Plugin system Plugins / themes system Mar 17, 2021
@QuiiBz QuiiBz closed this as completed May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📜 documentation Improvements or additions to documentation 🚀 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant