w3c / tpac2023-breakouts

Repository setup to collect and organize breakout session proposals for TPAC 2023
4 stars 2 forks source link

Alternative to customized builtins (custom elements with is=) #44

Open rniwa opened 1 year ago

rniwa commented 1 year ago

Session description

This is a session to discuss an alternative to customized builtins based on the outcome of https://github.com/WebKit/standards-positions/issues/97

Session goal

Come up with a concrete alternative proposal with multi-vendor support to customized builtins

Additional session chairs (Optional)

No response

IRC channel (Optional)

webcomponents

Who can attend

Anyone may attend (Default)

Session duration

60 minutes (Default)

Other sessions where we should avoid scheduling conflicts (Optional)

13, #14, #15

Estimated number of in-person attendees

Don't know (Default)

Instructions for meeting planners (Optional)

No response

Agenda, minutes, slides, etc. (Optional)

rniwa commented 1 year ago

Here are some (non-exhaustive list of) concrete proposals:

tidoust commented 1 year ago

People not involved in Web Components discussions may wonder what "customized builtins" refers to. @rniwa, would you mind adjusting the title to better clarify the link to custom elements, e.g., "Alternative to customized builtins HTML elements"?

rniwa commented 1 year ago

Done.

keithamus commented 1 year ago

It would be great to add custom attributes to this list. See https://eisenbergeffect.medium.com/2023-state-of-web-components-c8feb21d4f16 or https://github.com/lume/custom-attributes

annevk commented 1 year ago

F2F session is starting now. Minutes will be created here: https://docs.google.com/document/d/10hRHzZWwBuz0aJqBZ63alfzYBxKdhN8WINHizioNfok/edit.

LeaVerou commented 1 year ago

My Notes from the meeting:

Scoping

Whichever solution we go with should support a mechanism for scoping to specific local names, classes (e.g. HTMLInputElement) or both.

Benefits of custom attributes

Drawbacks of custom attributes


The more I think about this, the more I'm convinced we need both, as a layered solution with one building on top of the other: custom attributes for simple enhancements that only require attributes, enhancements that build on top of custom attributes, but can also include other types of enhancements, inline with simple things being easy, and complex things being possible.

I will try to come up with a proposal that puts all of these pieces together.

bahrus commented 1 year ago

One point not raised yet (at the risk of jumping the shark to making complex things without first making easy things) -- do we want to filter out based on things like the type of the input element (text vs datepicker)? Maybe that could be done within the code, but just wanted to raise the question.

LeaVerou commented 1 year ago

One point not raised yet (at the risk of jumping the shark to making complex things without first making easy things) -- do we want to filter out based on things like the type of the input element (text vs datepicker)? Maybe that could be done within the code, but just wanted to raise the question.

It has been raised:

  • Classes can be too broad, e.g. HTMLHeadingElement spans <h1> to <h6>, HTMLMediaElement includes both <video> and <audio> etc. Unclear if there are use cases that require more specificity; also we do need to draw the line somewhere, e.g. there are use cases that require even more granularity than local names (e.g. what if I want to add a behavior to <input type="color">).
LeaVerou commented 1 year ago

Ok, I posted some initial thoughts here: https://github.com/WICG/webcomponents/issues/1029 Super handwavy at this point, but I wanted to get something out earlier rather than later.