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

Observable #292

Open
keithamus opened this issue Dec 23, 2023 · 9 comments
Open

Observable #292

keithamus opened this issue Dec 23, 2023 · 9 comments
Assignees
Labels
from: Google Proposed, edited, or co-edited by Google. topic: dom Spec relates to DOM (Document Object Model) topic: events Spec relates to DOM events venue: WICG Proposal is incubated in the Web Incubator Community Group

Comments

@keithamus
Copy link
Member

WebKittens

@annevk

Title of the spec

Observable

URL to the spec

https://wicg.github.io/observable/

URL to the spec's repository

https://github.com/WICG/observable

Issue Tracker URL

https://github.com/WICG/observable/issues

Explainer URL

https://github.com/WICG/observable/blob/master/README.md

TAG Design Review URL

w3ctag/design-reviews#902

Mozilla standards-positions issue URL

mozilla/standards-positions#945

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=266843

Radar URL

No response

Description

This is a new object data type. It also has extensions to the event interface. It was discussed at the most recent TPAC. Chrome has an implementation for evaluation.

/cc @domfarolino

@keithamus keithamus added venue: WICG Proposal is incubated in the Web Incubator Community Group topic: events Spec relates to DOM events from: Google Proposed, edited, or co-edited by Google. labels Dec 23, 2023
@nt1m
Copy link
Member

nt1m commented Dec 31, 2023

cc @cdumez @rniwa @Constellation

@annevk annevk added the topic: dom Spec relates to DOM (Document Object Model) label Jan 8, 2024
@annevk
Copy link
Contributor

annevk commented Jun 17, 2024

https://github.com/WICG/observable?tab=readme-ov-file#userland-libraries is really great to see. There's not many proposals that have such strong evidence for demand.

One thing colleagues and I were wondering about is whether this has been presented to/discussed with TC39 again more recently? As with Streams it might well be reasonable to standardize this elsewhere, but it would be good to solicit their technical feedback. (I did just notice the outreach in wintercg/proposal-minimum-common-api#72 which seems great!)

@esprehn I noticed feedback from you at https://x.com/ElliottZ/status/1685171508501716993 that never made it into the issue tracker. Is that still something you feel strongly about?

@domfarolino
Copy link

whether this has been presented to/discussed with TC39 again more recently?

No it hasn't. I had discussed with @littledan the possibility of bringing this to some TC39 meetings, which I need to follow up on!

@esprehn
Copy link

esprehn commented Jun 19, 2024

@annevk That feedback wasn't captured in a bug yet, but I can file one.

I also want to flag that linked the linked "userland-libraries" section seems like it might be (greatly) overestimating what things are Observables. It associates everything that has a subscribe(callback: (value: T) => void): () => void API as being the same contract as the spec, but proposes an API which not that (uses the Observable next/complete/etc. pattern).

@domfarolino
Copy link

It associates everything that has a subscribe(callback: (value: T) => void): () => void API as being the same contract as the spec.

Hmm, I guess it's true we list these things out as "observables", but I don't think we sell them as drop-in, API-compatible/conformant replacements for our API. For full transparency, in the very early iterations of the repository I do think we over-sold how many userland implementations matched the so-called "Observable contract" though. See WICG/observable#8 for discussion on this, including WICG/observable#8 (comment) where @benlesh further elaborates on the similarity between a few existing userland libraries listed, and our proposal.

but proposes an API which not that (uses the Observable next/complete/etc. pattern).

I don't follow this part.

@annevk
Copy link
Contributor

annevk commented Aug 19, 2024

@esprehn are you still planning to file that feedback?

@esprehn
Copy link

esprehn commented Aug 21, 2024

Yup, I filed a bug on the Observables repo.

@esprehn
Copy link

esprehn commented Oct 14, 2024

As an update on this I'm supportive of the direction in WICG/observable#178. I think a ref counted observable with async teardown (ex. in microtask or tasks) to avoid resubscription churn is a good compromise that addresses many of the sharp edges. It strikes a good balance between the predictability I've been advocating for, and the flexibility Ben Lesh has been advocating for.

@annevk
Copy link
Contributor

annevk commented Dec 5, 2024

Thank you @esprehn.

Colleagues and I think this makes for a good addition to the web platform and as such I suggest resolving this as "position: support" one week from now.

I do have one remaining concern around the venue. It seems this should be part of the WHATWG DOM Workstream. TC39 could also work, but that might be more work given AbortSignal and EventTarget object abstractions would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. topic: dom Spec relates to DOM (Document Object Model) topic: events Spec relates to DOM events venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
None yet
Development

No branches or pull requests

8 participants