andymatuschak / orbit

Experimental spaced repetition platform for exploring ideas in memory augmentation and programmable attention
https://withorbit.com
Other
1.71k stars 54 forks source link

Web extension #214

Closed ghost closed 3 years ago

ghost commented 3 years ago

Motivation

Whenever I come across something interesting on the web I have the urge to incorporate that concept into my orbit. This browser extension would allow me to do so by making it possible to create Orbit prompts on any website.

Screen Shot 2021-05-28 at 00 01 17

For now, I've worked on the code structure and built some basic UI.

Questions

Caveats

Not sure if you'd like this to be part of the repo — just putting this out there.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

andymatuschak commented 3 years ago

Very cool! Some replies to your questions:

How can I create new prompts using the @withorbit/api-client package? Couldn't find a clear way to do this.

I'm sorry that the APIs aren't documented yet. As it happens, they're still in flux and not quite ready for adoption, so—beware!! But if you'd like to keep playing in the meantime, you'd create a new prompt by PATCHing /taskData with the prompt contents and ID (see orbitAPI.ts).

Is there a standardized way to extract the Page title from the current site?

Not that I know. You can see how the web component does this at /packages/api/web-component/src/metadataMonitor.ts.

How should authentication work? For now, I'd be fine with setting an ORBIT_TOKEN and saving it to local storage. (Might be worth waiting for #195?)

This looks like a great candidate for an OAuth client! i.e. so that an Orbit user can indicate that this plugin should be able to read/write their account. Filed: https://github.com/andymatuschak/orbit/issues/216

What should be the license? Not sure if you'd like this to be part of the repo — just putting this out there.

I'm excited that you're experimenting with this! Just for expediency, I'd suggest that you continue iterating on this package in a separate repo. (I'd be happy to keep providing comments / help there) If it evolves into something production-ready, we can figure out what it might mean to make it "official".