mirror of
https://github.com/BoostIO/BoostNote-App.git
synced 2026-04-26 21:05:55 +03:00
[GH-ISSUE #306] Plugins: Discussion of design #112
Labels
No labels
android 🤖
assigned to core 🦹
bug 🐛
documentation 📚
documentation 📚
duplicate 🚫
external issue 🔼
external issue 🔼
feature request 🌟
funded on issuehunt 💵
help wanted 🆘
improvement request 🔨
improvement request 🔨
ios 🍎
mobile 📱
needs investigation 🔬
needs more info ℹ️
needs specs 📐
plugin idea 🔌
plugin idea 🔌
poll 🗳️
pull-request
question ❓
rewarded on issuehunt 🎁
security issue 🔑
won’t fix ❌
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/BoostNote-App#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shmolf on GitHub (Jan 19, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/306
Plugins: Some want them, all need them [see your local physician for details]
I think plugins could help expand and encapsulate functionality in the new application.
If one user wants charts, and another wants WordPress sync support, then all users should not be subjected to load time and functionality where not desired. For if one JS function fails, it could at least disrupt other functionality.
This begs the question of how to design, implement, and assign responsibility for various plugins.
The foundation of a plugin system needs to consider numerous points of conflict of views, and enable independent plugins that can share resources, whilst not disabling another (except where dependencies lay).
I myself have my own considerations, but this issue is to open a topic for other's points of view to declare their thoughts.
@qrospars commented on GitHub (Jan 25, 2020):
I don't have enough knowledge about this type of questions so I can't really help. But it is an important topic that should probably be discussed.
For example, I don't know if it could be considered as a plugin, but the different supports for Latex or Mermaid that we could find in the old version of Boostnote were super useful for me.
Also, I really liked the fact that loading my notes was super fast (<1s) so I would always recommend personnally to put that in front instead of plugins.
@arcturus140 commented on GitHub (Jan 29, 2020):
is it necessary to introduce all these concepts from the beginning? I don't know if for example sibling plugins can be supported later on?
I am really missing my admonitions in Boost Note, that should be a small and easy plugin to start with.
@shmolf commented on GitHub (Jan 30, 2020):
TLDR: Plugin interaction can have side affects. Basic plugin system would be a good start.
A plugin might encompass direct Dropbox Sync support.
This is way not all extensions are compatible with your browser. Because the primary application might develop beyond the compatibility of an extension.
momentlibrary), then they all need have the same version compatibility.Something as important as synchronization might be important for someone who accesses their notes across devices (but isn't using the proprietary cloud storage).
How plugins should interact, and what limitations/responsibilities they should have, are crucial to the foundational architecture of a plugin system.
@ZeroX-DG commented on GitHub (Jan 30, 2020):
I agree with this idea. We need to plan out this plugin architecture as soon as possible otherwise the app will need to be restructuring and that could cost a lot of time. That's why I open an issue when this repo was first back in development: https://github.com/BoostIO/BoostNote.next/issues/48
@shmolf commented on GitHub (Jan 30, 2020):
NPM and Composer use semantic versioning. I think it'd be good to follow through to base any plugin versioning on the this same system.
Versioning
package.json, I'm guessing).node_modulesand such), and if it's properly tagged, then the user can load the appropriate files for the specific plugin version they need.Installation
Dependency
Blocking
Plugin install/removal
@ZeroX-DG commented on GitHub (Jan 30, 2020):
Yeah good ideas. Another way of installing the plugin is via
gitand clone the repo to the app directory but it will require git to be installed. However it's also a good way to consider.If we were going to allow sibling plugin then we have to support a kind of mechanism to prevent a plugin from being removed if another plugin is depending on it.
@Rokt33r commented on GitHub (Feb 11, 2020):
What I'm thinking is like this. https://github.com/denoland/deno_website2/blob/master/src/database.json
A single repository(should be this repo) will have a file like the
database.json. The file is having github url of each available plugins. To register a plugin, plugin dev will submit a PR. Once it is registered, the app will fetch the plugin's compiled asset from its releases page.@Rokt33r commented on GitHub (Feb 11, 2020):
@ZeroX-DG @shmolf And thanks for sharing your idea. It is really helpful. I'll keep checking further discussion.
@shmolf commented on GitHub (Feb 15, 2020):
I like the database option. And if it pulls from the Release's page, that would be ideal. It alleviates the need for calling
git clone.One of my projects has a sort of permissions controller. Making sure an action can be taken, before it actually is.
An example of a negative scenario that might be preventable.
I don't think it's impossible to prevent a plugin from accessing any part of the application, and intentionally breaking the user's experience. But the idea is that the plugins will be made to enhance the users experience, so hopefully the plugin would be written with good-intentions in mind.
If a basic application interface was created to give access points for plugins to work with, it would allow for plugins to safely communicate to the application, without inadvertently breaking anything.
Similarly, each plugin should be required to implement a common interface expected by the note application, so that basic communication can exist, such as version checks and the like.
Here's where I may be "tool shedding"
Even with a basic application API for which plugins can interface, it could still allow a plugin too much access. Using the Plugin list, adding another attribute for permissions would allow the application to grant specific or a collection of methods to the plugin.
Specific Boostnote Module/Lib
Boostnote-defined Permission List for API.
coffee.drinkwouldn't necessarily have access tocoffee.And taking from @Rokt33r's database.json example
The benefit of this structure, is that as long as the Plugin interfaces only through the API, they would be limited to the permissions designated.
@shmolf commented on GitHub (Feb 15, 2020):
Correction, the permissions shouldn't point to a specific
Specific Boostnote Module/Lib. They should only point to API functions. TheSpecific Boostnote Module/Libshould not be directly accessible by the plugins.@RonWalker22 commented on GitHub (Mar 12, 2020):
@ZeroX-DG
Sorry I'm late to the party.....
The "Central API", as mentioned in #48, is key. All the core features should be plugins based off the Central API. That's how VS Code does it:
source: https://code.visualstudio.com/api
@Rokt33r commented on GitHub (Mar 25, 2020):
@RonWalker22 Thanks for the information. I guess I should try to make some VSCode plugin and figure out how how should we present DX.