Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Plugin System #63

Closed
tangjeff0 opened this issue May 15, 2020 · 6 comments
Closed

Plugin System #63

tangjeff0 opened this issue May 15, 2020 · 6 comments

Comments

@tangjeff0
Copy link
Collaborator

tangjeff0 commented May 15, 2020

Currently, some Roam users download the browser extension roam-toolkit to get additional features such as custom CSS overrides and additional keybindings.

Given that Roam is a text editor, it makes more sense to me that customizations be a native experience. Can we take inspiration from Atom and VS Code to see what a modern plugin architecture looks like? This architecture ideally supports a variety of use cases:

  • custom themes
  • custom keybindings (e.g. Vim, Emacs)
  • arbitrarily executable and composable code

Some Inspirations

@tangjeff0
Copy link
Collaborator Author

Will re-open when after v1 is complete

@tangjeff0 tangjeff0 reopened this May 29, 2020
@tangjeff0 tangjeff0 changed the title Create a plugin architecture Plugin architecture May 29, 2020
@jeroenvandijk
Copy link
Contributor

TODO

  • Collect keycodes
  • Demonstrate activation of keycodes with devcards (write on-keypress event listeners)
  • Use event listeners in components

@thesophiaxu
Copy link
Contributor

Related: #291
It contains a sample plugin API of using custom event hooks w/ custom components and slash commands.
Closing that one (^) because we already have this.

@thesophiaxu thesophiaxu mentioned this issue Jul 23, 2020
5 tasks
@thesophiaxu
Copy link
Contributor

Agree a lot with @tangjeff0 's vision of building an extension architecture like VS Code. Here's its extension architecture and philosophy for reference: https://vscode-docs.readthedocs.io/en/stable/extensions/our-approach/ It basically has an extension host that is in a seperate worker thread which communicates with the parent thread primarily via events. Because VS Code is a desktop app, its plugin host is in a Node.js thread; but Athens could decide whether to use web workers (directly inside browsers) or build it into our Electron app.

What are your thoughts? @tangjeff0 @jeroenvandijk @itsrainingmani

@alaq
Copy link
Contributor

alaq commented Aug 4, 2020

Ideally extensions should be compatible with the desktop version as well as the web based version so maybe web workers are more appropriate? I believe you can also use web workers in Electron.

I also like borrowing VS Code's vision. It's encouraging that other applications are able to share extensions with VS Code, like onivim 2.

In terms of distribution, I like how Ulauncher is doing it. You can simply give it a git repository (so GitHub, GitLab, or self hosted git all work well), which doesn't prevent us from having a plugin registry. The plugin registry is another good project for learners (cc @tangjeff0 @itsrainingmani).

@thesophiaxu
Copy link
Contributor

@alaq Great input! Yes, web workers work in Electron as well. I am also thinking about talking to the devs of Obsidian to see how we can build a partially common API so that some plugins could be shared between Athens and Obsidian.

In terms of distribution, I think it's a bit too early to think about a full extension registry, but I do like your idea of using git repositories for extensions. In the relatively short term, we can have a temporary manual "featured" extension registry, while enabling custom extension imports via git repositories or zip files.

@tangjeff0 tangjeff0 changed the title Plugin architecture Plugin System Jan 22, 2021
@tangjeff0 tangjeff0 pinned this issue Jan 22, 2021
@tangjeff0 tangjeff0 unpinned this issue Feb 3, 2021
@athensresearch athensresearch locked and limited conversation to collaborators Feb 3, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants