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

Document policy for APIs that are experimental and/or not supported by all browsers #514

Closed
armanbilge opened this issue Aug 28, 2021 · 10 comments
Labels
Milestone

Comments

@armanbilge
Copy link
Member

This comes up time and time again e.g. in #469. If we can determine some guidelines for this, should be easy enough to follow.

@armanbilge
Copy link
Member Author

See #469 (comment), this seems like the way forward.

@japgolly
Copy link
Contributor

@sjrd says:

I would suggest leaving experimental in the past, and represent instead the full spec, independently of browser support. Otherwise, there's never a good time nor a good way to have things "graduate" out of experimental anyway.

Yeah ok makes sense. So experimental goes in the bin and our API is just everything available, with the onus on users to know the availability status of the API they choose to call.

Semi-separately, I think it would be a good idea to have browser-specific packages for browser-specific API too. Eg. a chrome package with Chrome-only API. Thoughts?

@armanbilge
Copy link
Member Author

armanbilge commented Aug 29, 2021

Semi-separately, I think it would be a good idea to have browser-specific packages for browser-specific API too.

Interesting! What's an example of e.g. a Chrome-only API?

@japgolly
Copy link
Contributor

Also, it would be good if we could somehow indicate browser support somehow though, and in a backwards-compatible way. Ideas:

  • mention in ScalaDoc
  • annotations
  • encode in term/type names (eg. @JSName("x") def x_experimental which we then deprecate and replace over time if necessary)
  • ???

None of these options seem amazing. I kind of like the annotations idea because

  1. a quick look at the source is all that's needed, don't even have to really read unlike ScalaDoc
  2. could be used be IDE plugins
  3. super-low cost on maintenance

But is it even worth it? I weakly feel that it might be a good tradeoff. Thoughts?

@armanbilge
Copy link
Member Author

If I had to choose one, I'd say annotations as well. But it seems like a lot of work to keep the statuses up-to-date?

@armanbilge
Copy link
Member Author

armanbilge commented Aug 29, 2021

Thinking about automation: could we query www.caniuse.com via an API to add this information programatically?

Update: cool, looks like it's all available here: https://github.com/Fyrd/caniuse

@japgolly
Copy link
Contributor

Hmmm, now that I've let this simmer a bit, I think it's not worth it. Mainly because we aren't getting paid to work on this (and I personally don't have any income lol!) so although it's a nice idea, I personally don't want to spend the time on it. You wanna take this on @armanbilge or shall we close it?

(This would be good to reopen if we end up generating everything from ts.)

@armanbilge
Copy link
Member Author

Agree, let's roll that idea into the mythical #487.

@japgolly
Copy link
Contributor

Hahaha i actually laughed out loud at that. Look I don't know if there'll ever be an implementation for #487 but the myth will certainly be legend. 😆

@armanbilge
Copy link
Member Author

armanbilge commented Sep 4, 2021

In summary, the way forward #469 (comment):

I would suggest leaving experimental in the past, and represent instead the full spec, independently of browser support. Otherwise, there's never a good time nor a good way to have things "graduate" out of experimental anyway.

Decided in #514 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants