Skip to content
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

Web extension #214

Closed
wants to merge 1 commit into from
Closed

Web extension #214

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 27, 2021

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

  • How can I create new prompts using the @withorbit/api-client package? Couldn't find a clear way to do this.
  • Is there a standardized way to extract the Page title from the current site?
  • 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 Remove firebase/auth from clients, use our own APIs instead #195?)
  • What should be the license?

Caveats

  • Only Chrome for now
  • Attachments not supported
  • Missing larger icons (48, 128)
  • Activation using keyboard shortcut doesn't work (_execute_action)

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

@CLAassistant
Copy link

CLAassistant commented May 27, 2021

CLA assistant check
All committers have signed the CLA.

@andymatuschak
Copy link
Owner

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: #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".

@ghost ghost closed this Jun 8, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants