14:49:47 RRSAgent has joined #webcomponents 14:49:51 logging to https://www.w3.org/2024/09/25-webcomponents-irc 14:49:51 RRSAgent, do not leave 14:49:52 RRSAgent, make logs public 14:49:53 Meeting: Scoped custom element registry 14:49:53 Chair: Ryosuke Niwa 14:49:53 Agenda: https://github.com/w3c/tpac2024-breakouts/issues/26 14:49:53 Zakim has joined #webcomponents 14:49:54 Zakim, clear agenda 14:49:54 agenda cleared 14:49:54 Zakim, agenda+ Pick a scribe 14:49:55 agendum 1 added 14:49:55 Zakim, agenda+ Reminders: code of conduct, health policies, recorded session policy 14:49:56 agendum 2 added 14:49:56 Zakim, agenda+ Goal of this session 14:49:58 agendum 3 added 14:49:58 Zakim, agenda+ Discussion 14:49:58 agendum 4 added 14:49:58 Zakim, agenda+ Next steps / where discussion continues 14:49:59 agendum 5 added 14:50:00 tpac-breakout-bot has left #webcomponents 15:49:47 bkardell_ has joined #webcomponents 16:29:11 obuckley has joined #webcomponents 16:42:13 lea has joined #webcomponents 17:02:59 oriol has joined #webcomponents 17:21:48 westbrook has joined #webcomponents 17:31:22 JRJurman has joined #webcomponents 17:32:31 masonf has joined #webcomponents 17:32:35 sanketj has joined #webcomponents 17:32:35 present+ 17:32:36 keithamus has joined #webcomponents 17:32:41 present+ 17:32:42 q? 17:32:43 Di has joined #webcomponents 17:32:44 present+ 17:32:47 present+ 17:32:50 rniwa has joined #webcomponents 17:32:55 jarhar has joined #webcomponents 17:33:28 justinf has joined #webcomponents 17:33:52 kzms2 has joined #webcomponents 17:33:58 present+ 17:33:58 scribenick: jarhar 17:34:02 https://github.com/w3c/tpac2024-breakouts/issues/26 17:34:45 justinf: we had 3 open questions last time and we settled all of them 17:35:06 steve: have a registry on the apis for creating elements that are disconnected 17:35:18 steve: sethtml can have an option bag which can specify a registry 17:35:37 steve: that was resolved to be the simplest at the f2f, and its capture in the issue on this 17:35:58 masonf: to clarify: the proposal is that innerhtml will use the global registry, but sethtml/sethtmlunsafe will have an additional argument to use a registry 17:36:01 sorvell has joined #webcomponents 17:36:17 sorvell: my sense is that while its not ideal it makes the feature reasonable 17:36:27 rniwa: sethtml and sethtmlunsafe - we want to add the argument to both of them 17:36:29 sorvell: ideally yeah 17:36:54 presumably parseHtml and parseHtmlUnsafe() also? 17:37:00 justinf: related: how to get registry for disconnected tree but also for a library ... 17:37:07 justinf: they could have similar solutions or different 17:37:20 sorvell: that is captured. i tried to make a summary of the issues in the breakout session github issue at the bottom 17:37:27 sorvell: rob made an issue for that and i had a separate issue for that 17:37:52 sorvell: my recollection at the last f2f was that we had discussed that those could be follow ons as long as we solve this disconnected issues which was needed for an mvp 17:38:14 sorvell: the two proposals around framework integration were trying to make that more seamless 17:38:16 q? 17:38:26 sorvell: theres the steps to find the custom element registry. look for a root or use the global 17:38:43 sorvell: robs idea was that you could make a function wrapper - any time inside this callback, use this registry that im giving you 17:39:29 sorvell: my proposal was different - you could define a custom element - the problem is that in this disconnected state you can customize if youre in the global registry. you can define an element and only upgrade this element dont customize when its created. it wouldnt customize when its created. it would only customize when its connected to the 17:39:29 root that has the registry that you want, which is how upgrades work 17:39:57 sorvell: both of them are too hard to try to get through to get this landed. both of them could be done as a follow on to do better framework integration. in the meantime they can work around it 17:40:24 q? 17:40:25 q+ 17:40:28 sorvell: this is the lit communitys most requested thing, i would love to see us get the mvp specified and on the road to impl 17:40:35 rniwa: could you qualify the problem statement? 17:41:18 q+ 17:41:27 sorvell: react and frameworks dont use special api to create dom, which you will have to use. to get those frameworks to use a new api to create dom it will be hard. to make this as seamless as we can for them to get this stuff for free that would be great. they dont use shadowdom, but you can make a react element or a framework element that stamps 17:41:27 into shadowdom 17:41:52 sorvell: we should do framework integration as a followon 17:42:26 ack keithamus 17:42:32 keithamus: i dont think we should be specifying features to work aroudn existing limitations of frameworks. we should write patches for those frameworks or ask them to. the idea of executing a block of code by ... it would create more problems than it solves 17:42:35 q+ 17:42:46 keithamus: the most ergonomic way to do this is to hang apis off of getrootnode and ask them to use that instead of document 17:43:04 sorvell: thats a solid argument. that discussion should not block the core feature 17:43:04 ack justin 17:44:11 justinf: i disagree with keith. theres a long history in the web components space of saying this is the new reality and - its taken 10 years for react to support custom elements with attributes and properties. we need to build bridges to those destinations. maybe react will never move away from document.createelement. being able to say im going to 17:44:11 call this library and this library calls document.createelement 17:44:14 ack rniwa 17:44:36 rniwa: this isnt really a framework integration as much as its making the framework use your registry. you want to force it to integrate 17:45:38 keithamus: force is the word. i respect the argument that frameworks can be very slow to adopt these features, but if we introduce code that forces a situation, we might see the opposite effect where theyre quick to work around it. we're making a hostile situation in their code. the expectations of how their code is being executed is changing 17:45:38 because outside is forcing it, and frameworks try to address this, and it will have the opposite effect that we want. 17:46:01 justinf: isnt the global registry forcing them to use custom elements? were changing which definitions to use. theyre already unaware of the registry anyway 17:46:01 q+ 17:46:24 rniwa: lets say were going to do this thing in this function that uses document.createelement. what happens when someone uses innerhtml on it after? 17:46:39 justinf: if that was attached to the shadowroot then the current steps work. otherwise its an open question, what to do about detached trees 17:46:48 q+ 17:47:11 keithamus: its your point around timing. if youre saying that during the lifetime of a function we're using this registry. if they do a single await or settimeout then suddenly we changed the pointer of the scoped registry and you have an intermediate set of 17:47:36 justinf: the react patch is to patch the owner on prototype and not be a document but use a scoped registry. its sync and fragile but its what you have to do to get react to work 17:47:46 keithamus: make that a proper part of the spec including the fragility 17:47:57 q+ 17:48:17 ack masonf 17:48:47 masonf: im sympathetic to keith, lets not write an api for frameworks but lets make it good. justins point is a good one, the global registry is already happening and frameworks dont know. a similar api effect would be document.defaultregistry and set it to what you want and then run your code. its similar to the global registry, were just changing 17:48:47 how custom elements work 17:48:53 keithamus: you can mitigate timing issues 17:49:23 rniwa: isnt the whole point of scoped registries that you want multiple scoped registries? presumably different parts of the document are trying to use different scoped registries. 17:49:24 q? 17:49:38 justinf: its a workaround when youre rendering into a shadowroot but the framework isnt aware of that 17:50:07 ack justin 17:50:08 justinf: it could be used for micro frontned architectures. i have an element defined and i want to use it but i cant because it appears at the top of the document. if theres a way to create an element and force it to use a particular registry that would be useful 17:50:32 justinf: i want to take a step back. we have two open questions and we have zerod in on one of them. i dont know if people agree that the disconnected trees one is more important 17:50:51 rniwa: this uses different registry hinges on what we do with a disconnected tree, they are very related 17:50:58 justinf: how do people feel about that? 17:51:26 keithamus: if we have the same suite of apis on shadowroots then we avoid the problem of disconnected trees. people will have to use getrootnode 17:51:41 justinf: the spec does include putting a subset of element creation apis 17:51:52 justinf: if people started using that 17:51:58 sorvell: theres still a problem of innerhtml 17:52:01 ack sorvell 17:52:29 sorvell: the core issue is innerhtmling which shadowroot innerhtml which doesnt work in the prototype yet. sethtml should work at the least 17:52:41 q+ 17:52:43 Referencing: https://issues.chromium.org/issues/336984024 17:52:50 sorvell: if we have sethtml and we have a solution that does match this idea of - it is not a framework related solution we need a way of creating dom in a registry on an element 17:52:57 keithamus: thats where i think having everything on a root node solves that 17:53:04 sorvell: how does it solve inner html? 17:53:07 ack justinf 17:53:31 justinf: the lookup registry steps use the global registry. there was concern about the memory overhead of having a pointer on a node 17:53:38 justinf: i wonder if we can hang a rare data... 17:53:46 sorvell: at the last f2f the implementors said no 17:54:05 justinf: the lookup a registry steps look to see if theres a registry on the root node 17:54:05 q+ 17:54:28 keithamus: innerhtml is deprecated, sethtml and gethtml should be used, they have an options bag and you can pass in a registry. does that solve the issue? 17:54:56 sorvell: it solves the i need to do some inner html on this disconnected node. option bag is on element. if you dont know the registry 17:55:24 keithamus: if you did shadowroot.createelement, it would be disconnected and wouldnt be inside the shadowroot. if you did sethtml you already have a registry but tractable. is the registry a public part of the shadowroot? 17:55:37 justinf: does someone know the right registry to pass? if you create an element with a scoped registry and hand it off? 17:55:54 keithamus: thats always the same problem. you still have to have a reference to the registry at some point 17:56:04 justinf: if the root node knows its registry 17:56:10 justinf: for a disconnected tree 17:56:25 sorvell: it could function like owner document. once you put it in a new document it changes 17:56:32 sorvell: that would probably be better, but implementors said no already 17:56:37 sorvell: so this is the next best thing 17:56:37 q? 17:56:42 ack sanketj 17:56:44 sanketj: could you elaborate on the implementors saying no? 17:57:03 keithamus: elements dont have a pointer to the scoped registry because the default lregistry is going to be the specified one 17:57:14 keithamus: adding a pointer to every element would be a lot 17:57:26 rniwa: it would not be rare though 17:58:01 keithamus: createelement would have to return some sort of boxed value. if its an element then you have a box which says this is the custom element and this is the registry and unpacking it would be a bunch of extra work 17:58:22 justinf: if you do create element without a registry it would use the global registry. if you do it in a shadowroot then it would set it 17:58:38 masonf: if you attached it to a tree it could delete that rare thing 17:58:47 sorvell: if you disconnect you have to put it back 17:58:55 q? 17:59:09 sanketj: i thought steve was saying tha tthe registry should live on the document or root and you have this to do the lookup, and that was the thing that was implementor objected about 17:59:24 justinf: the objection was to have a new pointer that every element has to have 17:59:55 sorvell: i think that the sethtml having an arguments bag is enough to move forward on this. its not ideal but i think its a ocmpropose thats reasonable and gets this feature off the ground. 18:00:12 sorvell: this is incredibly problematic for a lot of use cases, and if we can solve it then its awesome 18:01:27 q+ 18:01:31 jeff: im one of those people. ?? you lose out on some of those features like innerhtml or createelement. this whole system with registries sounds like its going to be cumbersome and how do i create a library that people can use? i really tried to use native elements instead of frameworks but i still hit that wall. if theres still going to be a wall 18:01:31 that im going to hit, especially with slots 18:01:52 rniwa: we are at time. we need to take the discussion offline 18:02:31 masonf: can somebody post the issue? i feel like we got close to adding an options bag to setinnerhtml 18:02:44 https://github.com/WICG/webcomponents/issues/1040 18:03:16 https://github.com/WICG/webcomponents/issues/1040#issuecomment-2093725017 18:03:20 justinf: i can create a pr and we can argue about whether to merge it 18:04:08 topic: sdfsdf 18:04:10 title: Sdfsdf 18:07:17 jarhar has joined #webcomponents 18:09:44 dandclark has joined #webcomponents 18:11:58 masonf has joined #webcomponents 18:12:10 alisonmaher has joined #webcomponents 18:13:54 alice has joined #webcomponents 18:14:05 present+ 18:14:15 present+ 18:14:53 present+ 18:14:54 present+ 18:15:13 present+ 18:15:22 present+ 18:15:25 present+ 18:15:30 Di has joined #webcomponents 18:16:50 https://1drv.ms/p/s!AtmAxiCADIM8nq09hubFJwqEsUqBDg?e=gmm2J1 18:17:00 present+ 18:17:02 ZoeBijl has joined #webcomponents 18:17:04 gregwhitworth has joined #webcomponents 18:17:08 Present+ 18:17:10 Jamie has joined #webcomponents 18:17:16 present+ 18:17:27 present+ 18:17:34 topic: https://github.com/w3c/tpac2024-breakouts/issues/30 18:17:35 scribenick: sanketj 18:17:44 jocelyntran3 has joined #webcomponents 18:17:44 present+ 18:17:59 jyasskin has joined #webcomponents 18:18:03 present+ 18:18:18 present+ 18:18:18 dandclark: presenting https://1drv.ms/p/s!AtmAxiCADIM8nq09hubFJwqEsUqBDg?e=gmm2J1 18:18:18 aaronlev has joined #webcomponents 18:18:18 rniwa has joined #webcomponents 18:18:25 xiaochengh has joined #webcomponents 18:18:27 Di has changed the topic to: Breakout: webcomponents & ARIA - Catalina 3 - 11:15-12:15 18:18:32 rniwa has changed the topic to: "Custom elements and ARIA" 18:18:36 siye has joined #webcomponents 18:18:37 Michael_Warren0 has joined #webcomponents 18:19:05 spectranaut_ has joined #webcomponents 18:19:07 dandclark: Shadow roots provide encapsulation, but sometimes ID-based refs needed to cross shadow DOM, ex. ARIA 18:19:19 dandclark: Without totally exposing IDs and breaking encapsulation 18:19:56 ...: Reflected ARIA properties work for references out of shadow, but not into 18:20:11 ...: Focused on other direction today - unsolved problem 18:20:16 Am I reading right that the first direction only works with Javascript enabled? 18:20:29 sarah has joined #webcomponents 18:20:31 ...: No way to associate label outside shadow with input inside shadow 18:21:27 ...: Proposal is to add a property on the shadow DOM called referenceTarget to forward external ID references into shadow DOM 18:21:43 q+ 18:21:53 ...: shadowrootreferencetarget for declarative shadow DOM 18:22:32 ...: Want this to work generally for all ID-based attrs, ie. aria, form, popovertarget, for, etc. 18:22:42 ...: aria-owns is an exception, reparents parts of accessibility tree, hard to get right 18:23:00 ...: so aria-owns excluded, no use case found for this either 18:23:18 ...: Would like to hear if there is a reason to support aria-owns 18:23:22 ive never even heard of aria-owns :) 18:23:35 ...: Properties are reflected in the DOM, but cannot leak shadow contents 18:23:37 present+ 18:23:40 q? 18:23:42 q+ 18:23:55 ...: Quering properties in DOM will just get the host element's info 18:24:09 ...: Works with nested shadow tree, can pass through to deeper shadows 18:24:24 ...: Prototyped in Blink already 18:24:24 ethanjv has joined #webcomponents 18:25:03 ...: Forward looking, think about expanding to multiple ref forwarding via a ReferenceTargetMap 18:25:17 ...: Different attributes needed to target different elements 18:25:26 ...: Can name each property individually 18:25:37 ...: Will have both declarative and imperative versions 18:26:04 ...: ReferenceTargetMap and ReferenceTarget can be used together 18:26:33 ...: There is an open issue about reflection of properties with invariants 18:26:47 ...: form attr reflects form relationship, ex. a button associating with a form in shadow DOM 18:27:26 ...: need to reflect attr without leaking shadow contents 18:27:36 jcraig has joined #webcomponents 18:27:56 ...: One solution is to have property to reflect the host element (loosen invariant) 18:28:00 null seems bad 18:28:03 q? 18:28:05 ...: Another issue is association with invalid id 18:28:06 q+ 18:28:07 ...: 18:28:15 ...: No associated created, how to reflect that? 18:28:25 ...: One option is to return null, since no relationship 18:28:40 ...: But that is kind of leaking info about breakage in the shadow DOM 18:28:41 q+ 18:28:47 ...: Other option is to always reflect the host. 18:29:08 q+ 18:29:21 Put this in formAssociated custom elements and provide a way to set the form the element is providing 18:29:25 ...: Looking for feedback on problem, solution, specific issues, etc. 18:29:30 q? 18:29:30 q? 18:29:44 q- 18:29:45 q+ 18:29:48 q+ jyasskin to ask about CSS alignment 18:29:52 ack justinf 18:29:58 ack rniwa 18:30:13 rniwa: One interesting thing with this feature is that there is a parallel to delegatesfocus 18:30:22 ...: That also forwards reference inside shadow tree 18:30:48 ...: There was a proposal for each attribute to have a target variant. 18:30:54 ...: Any reason for not doing that? 18:31:14 q? 18:31:25 dandclark: Ben might know, but seems like dev ergonomics and future looking are good reasons 18:31:35 ...: Maybe others have more context 18:31:49 CurtBellew has joined #webcomponents 18:31:54 alice: That's right. Want there to be a default forwarding option. 18:32:20 ...: Ex: the label/input example is a good one 18:32:54 kschmi has joined #webcomponents 18:33:00 keith: having microsyntax of id-to-map is novel and might be better to avoid 18:33:01 rniwa are you referring to cross-root aria? https://github.com/leobalter/cross-root-aria-delegation/blob/main/explainer.md 18:33:08 s/keith/rniwa 18:33:23 westbrook: microsyntax can help prevent explosion of attributes 18:33:43 ...: lots of new attributes being brought in 18:34:07 There's the `data-` -> `dataset` precedent. Could do `shadowrootreferencetarget-aria-controls=foo` 18:34:17 masonf: exception would be listing them all 18:34:21 +1 to what masonf said 18:34:34 ...: like that you only list one where the target is different from fallback 18:34:34 q- 18:34:38 rniwa: agree with mason 18:34:56 TylerWilcock has joined #webcomponents 18:35:03 q? 18:35:17 q? 18:35:27 dandclark: imperative side of reftargetmap allows you set separate properties for each of them, but listing only those differing from fallback for declarative one seems like a good thing 18:35:40 rniwa: maybe update delegatesfocus too in the same way 18:35:54 masonf: like this overall, but tricky to make sure we don't expose the shadow root 18:36:00 ...: more of an implementation concern 18:36:23 q? 18:36:26 ...: for form property, would be compatible to switch to a different property, but not if used in wrong ways 18:36:28 ack masonf 18:36:31 ack sorvell 18:37:16 sorvell: element could provide real form inside 18:37:36 ...: if there was something the element could opt into, that would solve it 18:37:47 ...: want a real form since this is a form API 18:38:04 ...: correct me if i'm wrong, but we shouldn't block the core feature on this 18:38:04 ack aaronlev 18:38:07 masonf: +1 18:38:35 aaronlev: noticed a pattern of creating a custom element and putting an aria label on it 18:38:46 ...: when widget is used, attr is copied 18:39:00 ...: problem is that there are two separate object in AX tree, can cause double speaking 18:39:27 q? 18:39:29 ...: worried that this is problematic since very hard to fix once component has starting doing this 18:39:35 q? 18:39:37 q+ 18:39:38 https://github.com/w3c/aria/issues/2303 18:39:46 q+ 18:39:57 ...: filed above issue to give component authors to put role: none 18:40:11 q? 18:40:13 ...: will allow removing element to be removed from AX tree 18:40:16 ack jyasskin 18:40:16 jyasskin, you wanted to ask about CSS alignment 18:40:22 definitely a real issue, but imo thats separate from idref 18:40:22 +1 to what jyasskin 18:40:27 said 18:40:29 aria-labels arent idrefs etc 18:40:54 jyasskin: ref target seems inconsistent with how CSS exposes parts 18:41:01 ...: why? 18:41:15 keith: was proposed that way previously, don't remember why we moved to this 18:41:20 alice: that was more verbose 18:41:30 Can we add my issue to a future agenda since I basically just don't want it to be dropped 18:41:32 sarah has joined #webcomponents 18:41:34 masonf: this is more generic, other approach needs to know more about component 18:41:41 I guess i can just file an issue in web components 18:42:02 q+ 18:42:05 rniwa: in the case where you want to forward all refs to one element, much more verbose 18:42:08 q? 18:42:13 ack sorvell 18:42:30 +1 I would argue that label -> input is a lot of the implementation that would be used 18:42:41 sorvell: Seen pattern of moving instead of copying 18:42:50 ...: Point is we need to get this feature landed 18:43:02 ack lea 18:43:02 lea: Much better than prev solutions 18:43:29 ...: in response to Aaron, what you said highlights a big pain point, need to find a solution 18:43:55 ...: not just about ARIA, for native elements, need to copy properties, etc. 18:44:07 ...: wanted to ask if reftarget can be read outside the shadow DOM somehow 18:44:07 Level 2 converastion: https://github.com/WICG/webcomponents/issues/1068 18:44:28 q+ 18:44:35 ...: would provide a natural solution to the 2nd open issue, will get host normally 18:44:48 ...: would also be nice for authors to define their own id ref down the line 18:44:51 ...: much much later 18:44:57 ...: shouldn't make that impossible though 18:45:13 ...: map needs to be able to ref the element itself, may need to specify the host as the reftarget 18:45:37 if the host is the reference target, wouldnt that just be adding an ID onto the host which is already doable? 18:45:45 dandclark: if reftargetmap doesn't specify reftarget explicitly, will fallback to the host 18:46:02 ack westbrook 18:46:09 ...: for open shadow root, reftarget reflects actual thing in shadow tree 18:46:19 ...: obviously doesn't work for closed shadows 18:46:47 westbrook: web components CG has been reporting since 2021 that this is one of the top issues that needs to be addressed 18:47:13 ...: want to make sure that feature expansion doesn't block progress 18:47:41 +1 to westbrook 18:47:44 ...: still good to think about level 2 and get agreement from implementors about direction 18:48:01 masonf: agree we are going in the right direction 18:48:06 smaug: me too 18:48:19 masonf: is reftarget is v1 and reftargetmap v2? 18:48:20 +1 phased approach 18:48:25 dandclark: yes 18:48:26 q? 18:48:45 q+ 18:48:48 rniwa: need to check on support 18:48:53 westbrook: when? 18:49:05 rniwa: will try to get an answer ASAP 18:49:07 ack keith 18:49:25 keith: for form, submit bubble isn't composed 18:49:38 ...: is form already exposed via other means? 18:49:47 ...: if not, returning host element is fine 18:50:12 I don't think submit is composed, but not sure. 18:50:19 ...: for open shadows, if submit happens outside form, can get the form? 18:50:39 dandclark: don't want it to be different between open vs closed, but interesting thought 18:50:51 sorvell: is submit really composed? 18:51:03 ack lea 18:51:06 [keith is looking] 18:51:11 q+ 18:51:27 lea: if reftarget ships in level 1 and reftargetmap in level 2, what are semantics of level 1? 18:51:37 ...: worried it won't cover any use cases 18:51:53 masonf: still useful when forwarding different things to different elements 18:52:19 rniwa: reftargetmap solves this problem 18:52:23 lea: but ships in l2 18:52:41 dandclark: reftargetmap broader solution, but reftarget still addresses simpler cases 18:52:46 I filed https://github.com/WICG/webcomponents/issues/1073 for my issue about duplicated properties 18:52:49 ...: will eventually need l2 18:52:55 q? 18:53:04 masonf: would be useful for minimal leaf nodes 18:53:19 westbrook: we think 80-90% of use cases to be covered 18:53:37 ...: perhaps authors are not making more complicated things because not possible 18:53:51 ack sarah 18:53:52 ...: maybe after reftarget/reftargetmap, we'll see more of those 18:54:08 https://lit.dev/playground/ submit event is not composed 18:54:24 sarah: have a component where we can mark one element as target, works well 18:54:46 ...:is it possible to have a default role for custom element with reftarget/reftargetmap defined? 18:54:47 per a playground I just did haha 18:54:59 Yeah it's not composed. Click events are so if you had the button inside the form you could still get the composedpath 18:55:00 dandclark: feasible, need to understand about need 18:55:22 ...: see this as a transparent pass through shadow DOM boundary 18:55:39 bah, sorry for the bad link haha 18:55:59 q? 18:56:35 sarah: idea is that aria-label, etc. apply to outer element but you want it applied to the inner element 18:56:46 ...: really want to forward everything to the shadow node 18:57:03 ...: would be nicer to implicitly forward rather than explicitly forwarding everything 18:57:15 ...: may encourage right patterns for authors 18:57:29 ..: proposal is to have a different default AAM mapping 18:57:39 alice: implicit role none? 18:57:44 rniwa: can be overriden? 18:57:48 sarah: yes and yes 18:58:05 dandclark: would only be if you supplied reftarget but not reftargetmap? 18:58:07 sarah: yes 18:58:12 q? 18:58:15 ...: current default role is generic 18:58:23 dandclark: will follow up with sarah 18:58:27 q+ 18:58:31 ...: would be possible 18:58:32 ack rniwa 18:58:42 rniwa: Webkit supportive of proposal 18:59:09 🥳 18:59:11 lea: Support from Mozilla? 18:59:13 q+ 18:59:13 woo! ship it! 18:59:17 q+ 18:59:22 everyone: Olli said yes earlier. 18:59:37 🚀 19:00:03 q+ 19:00:16 sarah has joined #webcomponents 19:00:25 rniwa: should we move the list of attributes onto the shadow root instead of the map? 19:00:36 ...: would resemble delegatesfocus 19:00:46 lea: maybe rename delegatesfocus? 19:01:22 alice: I think delegatesfocus is doing something different. Picking focus based on direction. 19:01:31 delegatesReferences? 19:01:38 ack westbrook 19:01:42 delegatesIds? delegatesTo? 19:02:00 rniwa: I think it might be better to have individual attributes instead of a map with a micro syntax to be consistent with delegatesFocus. 19:02:04 westbrook: do we have a spec writer on board? that would be helpful 19:02:24 dandclark: i'll do it, unless others want to be onboard 19:02:34 q? 19:02:37 keith: i'll do it with Dan 19:02:41 ack jrjurman 19:02:51 alice: i'll help Dan and Keith work on the spec 19:03:23 jesse: when custom element wraps an input, can we just inherit the role onto the host? 19:03:31 keith: shadow roots are transparent 19:03:42 ...: want the opposite, role should be none or generic 19:03:53 ack sorvell 19:04:01 masonf: yeah, would cause two nested elements with same role 19:04:15 sorvell: can we avoid long, verbose attribute names? 19:04:22 q? 19:04:22 ...: can we revisit something like data-? 19:04:24 q+ 19:04:25 q+ 19:04:31 ...: no concrete proposal though 19:04:33 ack keith 19:04:52 keith: don't mind on the attribute names, but microsyntax is worse than attributes 19:05:19 qq+ to say +1 for shorter attributes, but we need to avoid hyphens so we can have the option of custom attributes open 19:05:23 ...: easy to bundle attrs using templating libraries 19:06:20 sorvell: isn't that what happens with export parts? 19:06:28 rniwa: semantics very different 19:06:38 ack lea 19:06:38 lea, you wanted to react to keithamus to say +1 for shorter attributes, but we need to avoid hyphens so we can have the option of custom attributes open 19:06:39 ...: may be an argument for not doing microsyntax 19:06:55 q? 19:06:56 lea: custom attributes should still be explored 19:07:07 ack Michael 19:07:33 Michael_Warren: shorter attrs would be nice, especially people that hand write shadow DOM 19:07:38 ...: not everyone uses a build tool 19:07:45 q? 19:08:04 +1 to "not everyone uses a build tool" 19:08:28 dandclark: Next step is to write the spec, continue to work on prototype, potentially consider OT in Blink 19:08:40 masonf: Can we come back to the form question? Since we didn't get an answer. 19:08:55 dandclark: Also the question about broken ref. 19:09:02 masonf: Should just return the host? 19:09:09 lea: yes 19:09:41 lea: AX tree would also fallback to host, right/ 19:09:42 q? 19:09:42 ? 19:09:48 dandclark: yes 19:09:55 q+ 19:10:10 keith: would be good to try this on a test bench 19:10:25 ...: hard to come up with the expected answer 19:10:29 ack Michael 19:10:36 ...: weak argument though 19:11:00 q+ to go back to the
question if we have tiem 19:11:16 Michael_Warren: Someone said id ref different than other ARIA references. How different are the implementations? 19:11:50 dandclark: reftarget as proposed is not limited to ARIA 19:11:58 ...: supports all id based lookups 19:12:34 masonf: string based ones could technically be adapted too 19:12:46 rniwa: are we adjusting svg use too? 19:12:50 lea: uses href, not id 19:13:14 rniwa: resolved to change semantics, does use id for things with that SVG tree 19:13:23 dandclark: not adjusted those 19:13:37 rniwa: may need to review where id lookup is done 19:13:46 q? 19:13:55 q? 19:14:02 ack alice 19:14:02 alice, you wanted to go back to the question if we have tiem 19:14:32 alice: RE form question: Not sure about issues from leaking, but tells info about host, which means it can 'act' as an element you are targeting 19:14:35 keith: what about .form today on an element? 19:14:45 ...: that's undefined, right? 19:15:11 dandclark: yeah, might be compat since it returns null today and now invalid ref would cause it to return the host 19:16:47 keith: Restating... .form returns null if element not form participant, but if reftarget always fallbacks to host, then .form will always fallback to the host element and look like a form participant 19:17:10 dandclark: Maybe a good principal is that reftarget won't change property reflections or other internal associations 19:17:43 q+ 19:17:54 ...: For aria properties, would just change those internal associations, but not the property reflections 19:18:21 keith: No way to use form property on custom element, right? 19:18:49 ack xiaochengh 19:19:08 xiaochengh: Maybe shouldn't push reftargetmap to level 2? 19:19:30 lea: That's a lot more complex. Forwarding everything to one element is simpler and addresses a lot of use cases. 19:19:45 xiaochengh: Risky. Ex: How do we address form? 19:20:31 masonf: Maybe we try to address all properties first and strive for reftarget only in level 1. 20:10:33 rniwa has joined #webcomponents 20:10:53 rniwa has changed the topic to: "Open styleable shadow tree and theming" 20:15:35 JRJurman has joined #webcomponents 20:16:25 present+ 20:16:35 present+ 20:17:42 masonf has joined #webcomponents 20:17:47 present+ 20:17:56 present+ 20:18:01 jarhar has joined #webcomponents 20:18:49 kizu6 has joined #webcomponents 20:19:05 kschmi has joined #webcomponents 20:19:13 kbabbitt has joined #webcomponents 20:19:20 present+ 20:19:24 miriam has joined #webcomponents 20:19:29 TabAtkins has joined #webcomponents 20:19:46 https://github.com/w3c/tpac2024-breakouts/issues/27#issuecomment-2366847629 20:19:53 present+ 20:19:53 ray-schwartz has joined #webcomponents 20:20:02 present+ 20:20:04 giacomo-petri has joined #webcomponents 20:20:12 robglidden has joined #webcomponents 20:20:21 present+ 20:20:22 q+ 20:20:47 ack sorvell 20:21:09 justinf has joined #webcomponents 20:21:20 q+ 20:21:51 alisonmaher has joined #webcomponents 20:21:59 present+ 20:22:19 present+ 20:22:24 scribenick: dandclark 20:22:49 sorvell: Let's focus discussion on theming if we can, goals for how to do that. My 2c is we have two tools, custom props and parts 20:22:52 fantasai has joined #webcomponents 20:23:06 ...: Custom props apply narrowly and deeply , parts apply to any prop but shallowly 20:23:17 ...: Can we explore how to make parts apply deeply across the tree 20:23:26 I have made the request to generate https://www.w3.org/2024/09/25-webcomponents-minutes.html fantasai 20:23:41 emilio has joined #webcomponents 20:23:41 present+ 20:23:41 ...: We have export parts which are broken. No traction on issue. Simple fix is to expose via wildcards 20:23:46 ...: Have exponential @@@, have levels of shadow roots 20:23:49 s/...:/.../g 20:23:49 https://github.com/w3c/tpac2024-breakouts/issues/27#issuecomment-2366847629 20:23:50 https://github.com/WICG/webcomponents/issues/1051 20:24:12 I have made the request to generate https://www.w3.org/2024/09/25-webcomponents-minutes.html fantasai 20:24:31 ...Open styleable should be very specific tool to facilitae migrating old stylesheets 20:24:33 q? 20:24:39 ...Can discuss all of this in detail if we get there 20:24:49 ack justin 20:24:54 justinf: Want to reiterate, discuss theming outside open styleable 20:25:16 q 20:25:21 q+ 20:25:28 ...Want to take step back. We had ::parts selector and ::theme selector. Have idea on ::theme I'd like to talk about 20:25:31 q+ 20:25:38 ...Have two tools, one is deep, want to find something in between 20:25:52 ...Theme was blocked because people didn't want part attribute to imply something could be themed 20:25:57 ack sorvell 20:26:25 sorvell: I want to plant early seed -- I highly doubt we'll get that far today on defining theme thing. Lots of related issues. Want to see CSSWG get more involved 20:26:41 ...Especially because discussing how to match things across compose tree, how combinators work 20:27:02 masonf: The way you started as we should work on open styleable because it's easier. 20:27:03 q+ 20:27:11 justinf: They're different topics 20:27:14 ack masonf 20:27:29 ...Theming is adding hew capability for deep theming across shadows 20:27:43 sorvell: Open styling is simple proposal blossoms into different issues. 20:27:56 masonf: There's like 10 different use cases from I have a shadow and want to style 20:28:10 justinf: Need a solution that works for existing sheets. 20:28:30 masonf: I've heard use case of I have existing styles, and I have global styles that I want to apply to a button 20:29:03 ack rniwa 20:29:28 rniwa: Stepping back, we are trying to solve problem of you have a stylesheet in main doc, and want some part to apply to shadow. 20:29:44 q+ 20:29:46 ...People arguing these are sufficiently different to need 2 solutions. Do people agree? 20:29:49 ack sorvell 20:30:08 sorvell: yes. Open styleable blows away any type of encapsulation because everything is targetable. Theming API doesnt. 20:30:14 q+ 20:30:24 rniwa: Depends on what you mean by open shadow tree. Depends on semantics of what we define 20:30:36 masonf: Can hit use cases if you can control with an option 20:30:48 sorvell: Every shadow applying to shadow is very brittle 20:30:58 ...vs something like part where you explicitly state everything you want to style 20:30:58 ack Michael 20:31:15 Michael_Warren0: I don't think it breaks all encapsulation. Breaks outside in. 20:31:35 ...That's what folks who are used to how framework components expect. 20:31:38 to throw a wrench in this I would prefer to have web components and slots not require a shadow 20:31:42 ...The styles declared in component can't get out, but styles outside can get in 20:31:56 q+ 20:32:00 ...Doesn't break all encapsulation that way. Breaks outside in but in a way folks want. 20:32:07 +1 that's the complaint I've heard the most. 20:32:11 ...They have to deal with this today with React components 20:32:51 sabidussi_marco has joined #webcomponents 20:33:04 ...In some respects to the q of whether theyre sufficently different, comes down to the stylesheets. Looking at the issue there's not a lot of desire for limited API. Desire is for full application, and folks must manage risk of collisions 20:33:05 ack justin 20:33:28 justinf: Open styleable and theming are different set of capabilities. What we walked about with `::theme` was related to parts 20:33:57 ...Opening up shadow root is how you expose stuff in shadow. What is the role of part in this? Want something more controlled that doesn't throw out encapsulation. 20:34:03 justinf can you give/link to a quick summary/recap of your impression of ::theme? 20:34:14 ...Theme selector can target parts deep in shadow tree. Doesn't loose validity because we have this other use case. 20:34:22 q+ 20:34:36 ...We can make a more targeted API. We went down that path but didn't finish. 20:34:37 ack sorvell 20:34:42 q+ 20:34:44 sorvell: I want to echo Justin. This is a 'yes and'. 20:35:17 headless components is another big feature for open-stylable. in the case of headless comps where you do want to open up "all" of the internals for styling from the outside, how would ::theme work for that? 20:35:30 q+ 20:35:33 ...Problem is there are lots of use cases. Think if you did this with input. That div that you have contenteditable in, author can style it. This is about finishing part, making it reasonable. Like with open and closed shadow, there are different use cases. 20:35:37 q+ 20:35:38 ...You can do this today 20:35:39 q+ 20:36:03 if ::theme is meant to not be an "all stylable" solution, we'd have to also solve for headless components too in an "unlimited" kind of way that might be cumbersome from the limitations of what ::theme would have 20:36:08 q+ 20:36:16 masonf: There are 2 viewpoints in the room. Webcomponents users and webcomponent authors. Have heard often, 'I want slots'. Just want styles to keep working. That's the perspective of component users. 20:36:23 q? 20:36:23 ...We keep going back and forth between those 20:36:24 ack mason 20:37:06 justinf: I disagree with that characterization. People have problem with trying to fit component into page with existing stylesheet. People creating new components try the best they can with CSS custom props. Have limited styleability so can limp along with that. 20:37:25 masonf: Theres back compat, but also people used to doing this with non-shadow pages. They want to keep doing that. 20:37:30 ack greg 20:37:49 gregwhitworth: 2 points. I feel like it's been eternity since I've seen what `theme` is. Is there a link? 20:38:00 TabAtkins: Variant on `part`. Doesn't exist in spec now. 20:38:12 https://css-tricks.com/part-theme-explainer/ 20:38:32 Woops link through: https://meowni.ca/posts/shadow-dom/ 20:38:47 q+ 20:38:49 gregwhitworth: At salesforce we've moved away from native webcomponents. We have 3p extensions. People use extensions for e.g. a11y. They don't support native webcomponents. 20:39:10 ...We convert slots into light DOM 20:39:11 Inability to copy/paste right today: https://meowni.ca/posts/part-theme-explainer/ 20:39:20 q? 20:39:25 ...Don't get `slotted`, don't get `part`, but @@@ just works 20:39:28 ack rniwa 20:39:57 rniwa: I think solution for open styleable shadow and theming could be coherent with each other. Have one solution with ability be strict 20:40:07 ...Could also apply all the styles. No design restriction that these need to be separate. 20:40:19 ...Not saying that's what we want but we should consider the possibility. 20:40:25 ...Problem seems to come up in many use cases. 20:40:38 ...Don't want 3-4 solutions to same problem. Want single solution for most use cases. Or maybe 2 solutions. 20:40:51 +1 to @rniwa 20:40:55 ack miriam 20:41:15 miriam: As author of page using components, and author of components, don't think it breaks down so easily. 20:41:24 ...Sometimes I have specialized parts, so part approach makes sense 20:41:31 ...But sometimes I just have a button I want you to style 20:41:43 ...`part` doesn't work great, need to give button a specialized name. 20:42:10 ...The other thing with `part` is that sometimes I have chunk of component I want to keep specialized. And other parts I want to expose for styling. 20:42:14 ...So not total either-or. 20:42:30 ...Want to expose some parts for global styles, and expose others selectively or keep hidden. 20:42:32 +1 to miriam as our base components team uses native shadow for this 20:42:36 ...So it's a false dichotomy. 20:42:42 ack sorvell 20:43:04 q+ 20:43:14 sorvell: I agree with that. Enhancing parts is what I want to focus on because I think it's straightforward. But not a full set of solutions. 20:43:44 ack lea 20:43:46 ...Potentially advancing open styleable helps with this. To mason -- I agree people want light dom slotting but I don't know how. Want your ideas, but separately 20:44:17 Here is LWC's light DOM which takes a web component and renders it in Light DOM: https://lwc.dev/guide/light_dom 20:44:19 lea: Current style encapsulation is barrier for shadow DOM. One case is templating. Reusable widgets to enhance what HTML is able to do. 20:44:26 a few slides on an idea for how to make ::theme() work with parts: https://docs.google.com/presentation/d/13GJAJ_1WwxwTmusXnfobveDdYdaOr1TW-YRPhCzLDtg/edit?usp=sharing 20:44:30 q+ 20:44:31 ...All or nothing works well for templating, but not for reusable widgets 20:44:41 ...Encapsulation of some degree is desirable 20:44:56 ...right now we have the nothing, open styleable is the all, nothing cover all use cases 20:45:06 ...Want to opt in specific nodes, or remove specific nodes from what is exposed 20:45:26 (this is still using the dichotomy that I'm trying to argue against) 20:45:30 ...Not saying open styleable shouldn't advance, it covers chunk of use cases. But we need more granularity. 20:45:37 ...I posed proposal yesterday about exposing a subset. 20:45:50 q+ 20:45:55 ...Not sure if want to center discussion around that, main focus is the problem 20:46:10 q+ 20:46:13 ...I don't think I've ever needed full open styleability. 20:46:30 ...There's always something you don't want to expose. But almost everything is exposed when you use parts. 20:46:35 Big +1 on the "almost is important here" 20:46:49 ack mason 20:46:50 masonf: Rniwa has good point that more granular API can maybe handle fully open styles. 20:46:52 ack rniwa 20:47:07 +1. another thing people don't always want to expose is the tree structure relationship between parts... yes, sometimes they do 20:47:10 rniwa: Going back to use cases, expanding `part` is one approach. 20:47:26 ...Can generalize it, make it work across different trees. That's `theme` 20:47:41 ...Other approach is define back of props in CSS, have a way to apply those in your tree 20:47:50 ...And I'm sure there are other proposals 20:47:58 In the spirit of throwing ideas out, here’s the very very rough draft I mentioned: https://github.com/w3c/csswg-drafts/issues/10939 20:48:24 ack miriam 20:48:24 ...Can we go through more concrete proposals and evaluate which is more suitable for the use cases. People have vague ideas of what it should look like, but have been very vague about how we will accomplish it. 20:48:26 q+ 20:48:27 though thinking some more, I wonder if what is more suitable is opting nodes *out*, rather than opting them *in* 20:48:59 miriam: I keep hearing assumption about this dichotomy that's not my experience. Mine is not that either i'm providing should or should not be fully styleable 20:49:15 ...My assumption is always the page author knows what styles should or should not go inside 20:49:23 q? 20:49:30 ...And from both ends I want to apply some of my global styles to some of the things in the component 20:49:34 +1 to that bit Mia just said 20:49:39 ...It's not simple dichotomy 20:49:48 masonf: Makes sense, but what's the API look like? 20:49:48 ack sorvell 20:50:03 sorvell: I agree, we need to look at this as differnt pieces of overall puzzle. 20:50:07 q+ 20:50:32 ...I want to focus on what I see as easier problem: We have syntax which is for opting parts of trees in, that's `part`. But falls over with composition. Exportparts sucks 20:50:41 ...Because no wildcards. So should add those 20:50:44 qq+ 20:50:47 ...But still sucks, it's too fiddly 20:50:52 Wildcards are an easy fix, sorvell's exact idea was proposed back in 2018 (I linked in the issue) 20:51:02 ...Deep composition -- inside this special container thing I want to target some buttons, I need combinators 20:51:06 q+ 20:51:17 ...Shadow and deep from v0 spec was combinators into shadows 20:51:20 q+ 20:51:23 q- 20:51:32 ...We'd go really far with that capability but restricted to the `part` tree. 20:51:39 ...Then we have that aspect of theming 20:51:47 ...But don't know how that works in CSS 20:52:06 ...Those 2 thinks, fixing exportparts and making parts deeply addressable; at least for that aspect of the puzzle moves the ball forward 20:52:20 TabAtkins: Lea linked proposal from a few days ago that's exactly what you're saying sorvell. 20:52:27 q- 20:52:29 sorvell: Thanks! 20:52:37 can someone repost the link? 20:52:51 masonf: The specific proposal is `part` exposes part of the tree but it painful to use, so this @@@. 20:53:05 ack Michael 20:53:32 s/@@@/exposes all the parts as a reduced version of the shadow tree, selectable with combinators/ 20:53:39 Michael_Warren0: It's tempting to think about the problem and solution from component perspective. But it's multidimensional. Depends on who you are relative to the cmponent and the application that's using it 20:53:40 lea do you ahve the proposal link? 20:53:53 justinf: https://github.com/w3c/csswg-drafts/issues/10939 20:53:57 thanks! 20:54:14 ... @@@ isn't necessarily theming because I'm not just changing a color, there are other bigger things like layout I'm changing. 20:54:39 ...E.g. Shoelace, author has no knowledge of what exists in the component 20:54:56 q? 20:55:09 ack justin 20:55:09 ...Want to narrow down the relationship between the component and the environment. 20:55:20 q- 20:55:20 Thanks so much Lea, this proposal is amazing (https://github.com/w3c/csswg-drafts/issues/10939) 20:55:27 justinf: To rniwa's point about concrete proposals. We had thing that exist, CSS props and parts 20:55:43 ...upcoming CSS features like mixins, vague versions of `theme`. Each has pros and cons. 20:55:55 ...gatherting that might help us make a rubric for evaluating other things. 20:56:05 q+ 20:56:37 ...Important aspect of the solution is you can potentially merge different styles. 20:56:56 ack sorvell 20:57:01 ...If you go through these you will come up with the types of objectsions you'll need to just solutions by 20:57:22 sorvell: We use style isolation in shadowDom as big hammer for core problem with CSS 20:57:46 ...Want page to have styling policy where I say some user of lib can style certain things. But can't style others. 20:57:58 E.g. input has placeholder. Lots of props you can set on placeholder that break the input. 20:58:09 s/E.g./...e.g. 20:58:20 ...If browser had way to limit what you can do with that, that would be good 20:58:33 thanks sorvell, glad I posted it then! Took me a while to press the submit button, I thought it was so outside the Overton window and so ambitious that I'd lose all credibility 🤣 20:58:33 ...It's just a CSS concept we don't have. 20:58:41 q? 20:58:42 ...For lack of better word I'm calling it a policy 20:58:50 q+ 20:58:56 ack justin 20:59:29 justinf: Looking at nonwebcomonent solutions as well. It's common in corporate environments it's common to have policy that bans certain selectors. Have to use opaque classnames. 20:59:36 ...That's common with solutions like userland CSS modules 20:59:53 ...Points to people not using selectors like they could. 21:00:03 ...Maybe also indicates we don't need the full selector feature set. 21:00:12 ...People get by now using IDs and opaque classnames. 21:00:14 q? 21:00:31 q+ 21:00:36 ...I worry about exposing tree structure relationship of parts. Hvae seen components change where that changes, so that's a breaking change for the component. 21:00:36 ack gregwhitworth 21:00:48 +q 21:00:54 ack sorvell 21:01:04 q+ 21:01:34 q+ 21:01:37 q+ 21:01:38 sorvell: I think this is a big space. Have webcomponents CG but don't have CSS horsepower in that group. Want more participation. Know there's interest in CSSWG but not sure how we can do that. Ideas for that would be awesome 21:01:40 q+ 21:01:45 q+ 21:01:52 masonf: ONe specific idea was `::part` with some combinator. Can we look at that more? 21:01:59 ack mason 21:02:04 ack jrjurman 21:02:57 JRJurman: Thinking about what greg mentioned, I get the sense that as people put out components, if there was some way to expose some part for styling, there will probably be pressure to expose the whole thing. E.g. extensions that want to change everything. 21:03:22 ...Not sure if I'd ever want to say I"m making a thing and only some can be styled, then anticipate github issues about wanting more to be styleable 21:03:38 ...If people want to style it, there's pressure to let them 21:03:39 ack rniwa 21:03:57 rniwa: focusing on theming use cases might be valuable way to limit discussion. Problem space is v big. 21:04:18 ...Despite I said needs to be solution for all of them, maybe don't need solution for all use cases. 21:04:22 q+ 21:04:30 ack sanket 21:04:34 masonf: +1 let;s pick solution and see what cases it solves 21:04:48 sanketj: I agree. Let's outline what proposals we have, what they solve. 21:04:54 I'd like to present an idea for ::theme() that I think addresses a lot of problems with parts 21:04:55 +1 to Lea's proposal above. It seems like it would work for headless components (ie, in a tailwind global css env) and would work for design systems like web awesome 21:05:01 ...Maybe there's some lines we can continue to bring discussion forward 21:05:02 ack justin 21:05:54 https://docs.google.com/presentation/d/13GJAJ_1WwxwTmusXnfobveDdYdaOr1TW-YRPhCzLDtg/edit#slide=id.g2f8ba040b01_0_0 21:06:21 justinf: Tab and I looked at theme. Big problem was it selected too many things. People that added part attrs to their shadow maybe dind't want those to be exposed all the way up the tree 21:06:34 ...Component using child component doesn't necessarily want to expose all the child parts for theming 21:06:41 ...So wanted to make theming more targeteable. 21:07:16 to justin's point, a good thing about lea's proposal above is that it doesnt need names that would have conflicts 21:07:27 ...Also need a way to filter by host, but not by host tag name, might be different by component. Want host to opt into exposing things as theme, and establish some identifier for those. When selecting for those, select some theme name and part. 21:07:41 the point about having naming conflicts is a good one, so imo a solution should prevent that 21:07:42 ...Goes deeply down the page, is coherent with parts but more targeted. 21:08:06 ...Goes a long way towards letting design systems do what they want 21:08:12 ack sorvell 21:08:17 sorvell: I think that's interesting idea. 21:08:21 I'd love to see that written as a rough proposal, it would help me understand it a little better. 21:08:44 ...The reason I like having solution that includes combinators is my mental model for sytling is needs to satisfy: want to style one, want to style all, want to style some, where typically that's some subtree 21:08:50 +1 to sorvell 21:09:26 ...Main point is: we have exportparts. We have parts. Not great, cumbersome -- don't work because need to export parts on all the things, becomes burdensome. 21:09:32 +1 to this 21:09:38 ...Adding wildcards is very simple way to achieve something useful 21:09:46 justinf: It's more broken because of name collisions 21:09:59 https://github.com/WICG/webcomponents/issues/1051#issuecomment-2375196189 21:10:03 TabAtkins: Forwarding and prefix-changing was part of original proposal 21:10:21 sorvell: It's completely unusable. Shoelace uses but that's about it because it's so cumbersome 21:10:22 q? 21:10:29 exportparts="*" to forward all as-is, exportparts="foo-*: bar-*" to forward all the foo- prefixes, replaced with bar- prefixes 21:10:32 masonf: Seems like separate issue, but a good one 21:11:54 https://github.com/w3c/csswg-drafts/issues/10939 21:12:00 Go here https://www.w3.org/events/meetings/19813be0-9902-4bad-8d50-3ad49ba792e6/ 21:12:01 export parts seems tricky. if lea's proposal gets traction, i could see export parts being deprecated in favor of that feature. lea's proposal seems to be a re-imagining of parts in a more robust way 21:12:04 and click the join button 21:13:30 sorvell: I beg your patience because I respec the people in this room. One of the things as a component user is when there's awesome new stuff added CSS, but we wonder if it will work in shadow DOM. 21:13:47 ...The more we can make stuff so these questions are worked out the better. E.g. how does `has` work with shadow DOM is unclear 21:13:47 +1000 to awesome css features in shadow dom 21:13:57 ...The more we can get a genral solution the better 21:14:02 lea: 21:14:10 ...Filed this yesterday, wasn't sure if should post 21:15:11 ...Was thinking part is a huge pain point both when defining and using components. When defining because have to expose with reasonable names. When using you have to figure out names, build mental model of how fits together, and there's still stuff you can't do 21:15:40 ...I was thinking what is the real author intent? It's that we want to expose subset of shadow tree with `part`. 21:15:44 ...When people use part, over 90% of elements are exposed 21:15:51 ...Usually need reason *not* to expose something 21:16:02 ...Open styleable sort of solves this but usually still need to hide something 21:16:19 ...What if we had html attribute -- tentatively `export`; it just exports that element 21:16:36 ...Introduce combinator that gives you access to this exposed subtree. Don't know if you need mutiple or just once works 21:16:51 q+ 21:16:53 ...That subtee only consists of exposed elements. 21:16:55 q+ 21:17:08 ...Within it, selectors just work normally but only apply to that subtree 21:17:31 ...You could even use attribute selectors on `part` , making `part` work better 21:17:53 ...Can introduce more granularity, cutting out subtrees, or even granularity on sub-element level 21:18:10 q+ 21:18:13 q+ 21:18:14 ...Can even introduce syntax to allow aria to hook in 21:18:29 ...Or other parts of the platform. Depends on the overlap of what elements you want to expose for styling and for other purposes 21:18:44 ...Can also be used with native elements, instead of introducing a bunch of new pseudos 21:19:08 ...Maybe the element type would not be exposed so you can't use type selectors 21:19:20 ...Could even end up with a different structure then what you originally had 21:19:38 ... 21:19:58 ...But it could break expectations e.g. if you're applying grid 21:20:00 ...But part has the same problem 21:20:01 q+ 21:20:18 q+ 21:20:26 q- 21:20:39 q? 21:20:59 ...Open questions: Has access to full flattened subtree? And what if the better approach is to opt out rather than opt in? 21:21:09 ack justin 21:21:32 q- 21:21:41 justinf: think we need virtual DOM in this other place, where component can produce virtual subtree. 21:21:59 ...One detail is that custom element tagnames aren't reliable as selectors. Host needs to apply a stable label. 21:22:31 ...Material-button could be under any tagname. For this type of component, I want to expose this type of thing inside of it. That applies deeply 21:22:37 lea: You can just use part 21:22:44 justinf: But that's applied from the outside 21:22:44 q- 21:23:24 ack sorvell 21:24:09 sorvell: I like the direction of this. Exploring stuff like how do you want to export this is good. Might have internal classes I don't want to expose, but fine to export others. Other thing i want to expore is it seems like we're circling this idea of a policy of how I want to expose styling. Does this idea need to be locked in shadow DOM? 21:24:23 ...I'm describing what I want to be styleable. That's sort of what scope is doing 21:24:30 ack michael 21:24:36 Scope is selector-in. It can't handle this sort of thing 21:24:51 This sort of policy has to be DOM-out 21:25:02 Michael_Warren0: I think about this a lot -- stable names. Concern I have is applying that selector uses something considered internal to that component if it were a 3p. That introduces brittleness. 21:25:35 ...The component could change, that thing we exposed might not be the same anymore. Could break every selector. Needs to be something that isn't selector based. Maybe proposal doesn 21:25:56 ...'t let you use those. It's a place that can introduce brittleness. Class name might not exist later. 21:26:11 Rough... `@scope ... { appearance: exports-only; ... }` 21:26:11 masonf: Adding this export to your shadow means you're adding it to contract of your component 21:26:17 q? 21:26:44 justinf: Might have classes that are internal that you don't want to be exposed. @@@ 21:27:14 Michael_Warren0: I might refactor the component in a way that I don't know if it's breaking, because I don't know who's querying it. 21:27:27 ...Might want to thing about putting stable names back in this. 21:27:53 sorvell: Happy to follow up on that at some point (an issue?) but I'm not sure what you see that scoped appearance property doing. 21:27:53 ...Want to make them truly stable so they can't be changed 21:28:12 lea: I heard discussions about theming. that's what the next breakout is about, but on a lower level 21:28:19 https://www.w3.org/events/meetings/a9540089-cb3a-413b-966a-8c1034b31b11/ for the possible next session 21:40:03 masonf has joined #webcomponents 21:44:05 rniwa has joined #webcomponents 21:44:15 rniwa has changed the topic to: "CSS Modules" 21:46:11 kschmi has joined #webcomponents 21:46:12 annevk has joined #webcomponents 21:46:22 alisonmaher has joined #webcomponents 21:46:26 present+ 21:46:41 ethanjv has joined #webcomponents 21:46:44 kouhei has joined #webcomponents 21:46:46 rniwa: dan, can you summarize the state of the proposal? 21:47:00 present+ 21:47:01 q+ 21:47:06 dandclark: I can try to summarize the current state after this morning's discussion 21:47:18 https://github.com/WICG/webcomponents/blob/gh-pages/proposals/css-modules-v1-explainer.md 21:47:48 dandclark: css modules allow you to import your styles from CSS and then apply them dynamically with adopted stylesheets 21:48:05 ... I can have just one stylesheet and I can apply it to all those different shadow trees 21:48:10 ... that all works quite nicely 21:48:20 ... with declarative shadow dom this isn't the full story 21:48:31 ... because I don't want to need script to do this 21:48:47 ... we can look at other solutions to apply styles to declarative shadow trees 21:49:09 ... inline styles are not great and duplicate stuff 21:49:19 ... css modules might be the best way of dealing with this 21:49:42 kschmi: I think something like this (slide 5) is the best way to go 21:49:51 ... we had some discussion about 22:12:41 dandclark: we'd make the template either trigger the fetch 22:12:50 ... leaning not to do that 22:12:59 s/"style"/"css"/ 22:13:21 ... I think it's clearer if the template attribute just pulls from the module map 22:13:48 +1 to masonf 22:14:01 q? 22:14:09 q+ westbrook 22:14:12 q+ 22:14:12 q+ 22:14:12 masonf: There are two different things, `