Plugin system #6
Replies: 11 comments 18 replies
-
Not enough of a frontend dev here, but one of the advantages of having a "note plugin system" is that every remote synced trilium instance automatically inherited said plugins, without any setup burden. Perhaps the distribution system you're suggesting could come handy here, allowing a client to automatically pick up the same plugins as the server ? |
Beta Was this translation helpful? Give feedback.
-
As someone that's built multiple plugin systems before, I have a lot of thoughts when it comes to this. I'll try to gather them and update this comment, but I absolutely agree with everything you've said Elian. A proper plugin system is absolutely crucial to have. |
Beta Was this translation helpful? Give feedback.
-
This is a VERY good point, and i like the idea very much 👍 |
Beta Was this translation helpful? Give feedback.
-
For API, seems trilium is open-source, I think currently, we can just export trilium instance in backend API can allow any function we need. |
Beta Was this translation helpful? Give feedback.
-
As long as the plugins can be "stored like notes" like @rauenzi suggested so they will be synced to clients without them having to manually follow plugins, that's a very good idea :) |
Beta Was this translation helpful? Give feedback.
-
One thought I had while I was thinking about this is that if multi-user functionality is something desirable at some point, we need to be extra careful about where plugins are stored and where they are run (should plugins only ever run in the frontend and only interact with the backend through an API of some kind?) Another thing I was considering, and y'all may have more thoughts than me since you've probably interacted with the API more than I have, is that it could be nice for the plugin system to be able to leverage functionalities in libraries available to the languages for the supported plugin languages (currently it's just JavaScript and I'm fine with it staying that So, yeah, I'm probably scope creeping myself right now but they are cool ideas, just not sure about approaches. |
Beta Was this translation helpful? Give feedback.
-
I was talking about a plugin system with someone else and someone mentioned this right here: https://extism.org/ This may actually be helpful since people can already use code notes and so theoretically they could use any code note and as long as we have compilers for that language (which I feel like we could figure out how to make that only download as necessary or through a docker variant or something) then they could compile to wasm and be run on the front-end or the back-end. This more seems like an interesting concept but I will admit that I'm not sure how this will play with interacting with the dom which is rather important. |
Beta Was this translation helpful? Give feedback.
-
I agree, we need a distribution system. But we should keep the plugins as notes, still. That's consistent across instances/clients and makes it easy for people to edit them. How we will deal with plugin versions and updates might be a more complex subject. |
Beta Was this translation helpful? Give feedback.
-
I use many modifications in trilium. I place them in an "Extension" subnote. It has all the sync stuff etc. taken care of. The only painpoint is updating (external) modifications and I cannot publish my work (easily) because there is data in there that is specific for my instance. I propose creating some kind of metadata or leverage the existing metadata system to mark stuff as "variable". I.e. it is "emtied" or "defaulted" by using an "export as plugin" checkmark. And an extra checkmark for updating a tree so that all "variables" are kept as they are and not overwritten. This I think would keep the current spirit and make it easier to publish and update extensions. Then one could go further as to maybe import from a github repo or something like that. I propose to keep it as simple as possible to not add another layer of complexity and or more types of modification. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
For reference, this is being tracked as a Notes issue here: #107 |
Beta Was this translation helpful? Give feedback.
-
This would be one of the single most important changes, if implemented.
The idea is simple: I believe the current system of "plugins" is not scalable. Plugins are added by creating notes into your own note tree and they are distributed in various ways and in different repos.
All reputable note-taking applications (including big-guys such as Obsidian) have a plugin system. And we need this.
There are multiple challenges here:
Looking forward to your opinions.
Beta Was this translation helpful? Give feedback.
All reactions