Decouple client from h in dev

26 views
Skip to first unread message

Thomas Giardina

unread,
Dec 31, 2020, 12:44:59 PM12/31/20
to dev
Setting up a full dev environment is hard and a huge barrier of entry to anyone who wants to tinker with the client. Can we create a light-weight mock h so that tinkering with the client is easy?


Robert Knight

unread,
Dec 31, 2020, 6:43:40 PM12/31/20
to Thomas Giardina, dev
Hello,

I agree that setting up a full instance of H is quite a bit of extra work for developers who only want to experiment with changes to the client. For that use case I think the best path forwards will be to make it easier to get the client working with the production server. One way that this can be done today is with the browser extension, although it is a little fiddly to set up and we accidentally broke the combination of local dev client + locally-built browser extension + production server recently (See https://github.com/hypothesis/browser-extension/pull/469 for a fix).

The production server already supports API access from custom clients. We could preconfigure an OAuth client for the client's dev server or enable users to register their own OAuth clients, subject to some kind of vetting process before deployment beyond localhost.

Kind Regards,
Rob.

> On 31 Dec 2020, at 17:44, Thomas Giardina <tommy.g...@gmail.com> wrote:
>
> Setting up a full dev environment is hard and a huge barrier of entry to anyone who wants to tinker with the client. Can we create a light-weight mock h so that tinkering with the client is easy?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@list.hypothes.is.
> To view this discussion on the web visit https://groups.google.com/a/list.hypothes.is/d/msgid/dev/cc8a9fb6-e5b6-4ae1-b3c2-faf56b2667ccn%40list.hypothes.is.

Thomas Giardina

unread,
Jan 4, 2021, 10:52:06 AM1/4/21
to dev, Robert Knight, dev, Thomas Giardina

> For that use case I think the best path forwards will be to make it easier to get the client working with the production server.
I agree with this.
> One way that this can be done today is with the browser extension
There are two problems with this:
  1. I wasn't able to get this work and don't think it's currently easier than setting up h.
  2. I'm trying to demo Hypothesis for management. A big reason I think they'll like Hypothesis is the ability to use iframes to annotate PDFs (without annotating the rest of the page). If I use the extension, I will not be able to demo this feature.
> enable users to register their own OAuth clients, subject to some kind of vetting process before deployment beyond localhost.
Again, I agree with this. Getting a dev environment up and running on localhost should be easy and shouldn't require formal interaction with Hypothesis. Loosely speaking, this is just a separation of concerns problem: I should only have to worry about my production environment when deploying to production.

Anyway, those are my two cents.
Reply all
Reply to author
Forward
0 new messages