00:09:07 RRSAgent has joined #components 00:09:07 logging to https://www.w3.org/2019/09/17-components-irc 00:09:10 Zakim has joined #components 00:09:20 Scribe: Travis 00:09:41 Topic: Introductions 00:10:33 rniwa has joined #components 00:10:39 fergal_daly has joined #components 00:10:39 rakina has joined #components 00:10:55 masonfreed has joined #components 00:11:00 Scribe: jan 00:11:12 :) 00:12:26 jan: There was a q from apple; wanted to see an example of :part being used in practice.... 00:13:03 present+ Tomek Wytrębowicz 00:13:17 present+ 00:13:33 present+ 00:13:43 present+ 00:13:57 jan has joined #components 00:13:59 present+ 00:14:08 annevk: Mozilla has implemented a subset of ::part 00:14:29 rniwa: i think the contention was on forwarding 00:15:02 fergal_daly: the declarative syntax is the spec is what’s agreed 00:15:13 fergal_daly: the declarative map had agreement 00:16:05 John_dai has joined #components 00:16:22 tess: moving on to custom states 00:16:26 https://github.com/w3c/webcomponents/blob/gh-pages/proposals/custom-states-and-state-pseudo-class.md 00:17:17 rakina: curently we’re proposing just custom states, no built-in pseudo-classes 00:19:33 Rakina, could you please use the mic? 00:19:56 annevk: is there syntax incompatibility 00:20:37 fergal_daly: the same issue applies to part 00:20:45 ... you can specify a ::part you can’t select in CSS 00:21:26 rniwa: should this be a thing for custom elements or shadow roots? 00:21:42 rniwa: ... would it be possible to have a custom element without shadow root that has a state? 00:22:06 annevk: if we had ElementInternals before we had attachShadow, we would have put attachShadow on ElementInternals 00:22:35 annevk: so now we have this disconnect, and each time we have to decide where to put the API (ElementInternals or shadow root( 00:23:30 annevk: for new things, we should prefer using ElementInternals instead of shadow root 00:24:18 rniwa: do we allow pseudo-classes on a ::part? 00:24:26 diervo: we opened a bug 00:24:46 fergal_daly: yes, they don’t all work, but most of them do 00:24:49 ekashida has joined #components 00:25:13 fergal_daly: Tab said it should work 00:25:20 fergal_daly: I think he said he updated the spec 00:25:22 https://github.com/w3c/csswg-drafts/issues/3510 00:26:23 chrishtr: I think having custom states was the #1 request on top of parts 00:26:44 hober has joined #components 00:26:49 https://drafts.csswg.org/selectors/#pseudo-element-states 00:26:52 present+ 00:27:04 present+ 00:27:04 chrishtr: Is SalesForce using ::part 00:27:17 diervo: we will once there’s agreement that it will be implemented 00:27:39 diervo: is ::part going to be the way to style new things (e.g., toast( 00:28:12 diervo: it’s hard to do static analysis to determine the API for a component 00:28:24 diervo: it can be problematic if you can do anything you want to a ::part 00:28:48 diervo: while parts work well for built-in components, we’re concerned we’ll have to forward all the parts 00:30:08 diervo: we’re looking at ways to control what people using parts can do. 00:30:15 diervo: E.g., we think themes gives too much power 00:32:15 diervo: We’re fine with parts, but we’re still looking for a better solution to propose 00:32:31 jan: as far as static analysis... 00:32:45 .. for parts, I proposed a way to ask an element for what its parts are? 00:32:54 .. is there a similar thing for states? 00:33:04 hiroshige has joined #components 00:33:07 .. can an element expose its states programmatically? 00:33:30 .. would be interesting to expose a public/custom states to see what the full set of states are. 00:33:43 rakina: Sure, it's doable. 00:33:51 annevk: you can implement this yourself? 00:33:58 .. so far we haven't done that. 00:34:19 jan: I think its useful to anticipate cases... (we offer reflection in the process already) 00:34:30 .. these are generally good practice, rather then expect the component author to expose 00:34:51 hober: its an internal fact that the component is in the state... 00:35:40 jan: This proposal is about the public state... by adding to state's internal, you explicitly say "I want the outside world to key off of this state" 00:35:49 .. private state is tracked differently... 00:36:12 whsieh has joined #components 00:36:13 .. so this proposal is only about public states... why add it here and *not* want someone to know about it. 00:36:22 rniwa: too early to judge what the right thing to do here? 00:36:37 .. if other libraries are trying to add then we can make changes. 00:37:10 .. for static analysis, it doesn't help to expose JS aPI--it needs to be declarative. 00:37:22 .. hard to say what the right API is for the use case. 00:37:31 .. bottom line: too early. 00:37:47 fergal_daly: you just set a state; there's no list of values 00:38:07 .. in Chromium, there's nothing that tracks all the parts; takes a tree walk to figure it ou. 00:38:16 s/ou./out 00:38:49 diervo: we don't allow customers to use parts, so we try to be explicit... 00:39:01 .. we would probably disable that anyway. 00:40:04 smaug: if you are in multiple states, how to you select that 00:40:20 rniwa: is it :state(foo):state(bar) or :state(foo bar) 00:40:38 fergal_daly: the question is whether you want to do AND or OR 00:40:48 rniwa: Let’s not create a new OR 00:41:05 fergal_daly: So the proposal now only allows a single state 00:41:10 annevk: Yes 00:41:29 rakina: Yes 00:41:45 fergal_daly: Tab updates the ::part spec, specifically to get the OR effect 00:41:52 https://github.com/w3c/csswg-drafts/issues/3502 00:41:59 tess: Maybe we should drop that 00:42:03 s/we don't allow customers to use parts/we would restrict the use of parts to be explicit 00:42:10 rniwa: What does that mean, especially for ::part 00:42:18 fergal_daly: I’ll ask Tab why he did that 00:42:38 annevk: I think for ::part, a single part can consist of multiple parts in a single value 00:43:18 ... Example, if you want to select an active tab, you’d want ::part(tab active) 00:43:49 present+ 00:43:51 annevk: I think that’s a leftover from before we had custom states 00:43:59 fergal_daly: I’ll ask Tab to remove that 00:44:23 fergal_daly: You said we wouldn’t put this on non custom elements? 00:44:52 ... If we *did* allow this, then several of the existing pseudo-classes could be done as states 00:45:14 ... If you allow this on built-in elements, then you’d eliminate the need to introduce new pseudo-classes 00:46:36 rniwa: It’s good to keep custom states and built-in pseudo-classes in separate namespaces to avoid future name conflicts 00:48:22 hober: any more comments on the proposal? 00:48:28 annevk: spec it and test it 00:48:59 rniwa: what’s the question in spec about —foo? 00:50:09 tab: the reasons ::part can take multiple args is because parts are supposed to be equivalent to classes 00:50:30 annevk: but I think now that we have custom state, we don’t need that 00:51:42 tab: if we’re definitely pursuing state, then we could drop support for selecting multiple parts in ::part 00:52:07 hober: part is more like element names than class names 00:54:29 tab: the reason why I’m uncomfortable with dropping this, without this syntax, there’s no way to select something that has two part names — that lets you select both 00:55:13 ... given that people use multiple classes all the time (.foo.bar), I think it suggests we’ll want this for parts 00:55:17 rniwa: we could add it later 00:56:13 tab: the cost is low to support this 00:56:49 annevk: I think I’m somewhat convinced to keep this 00:58:08 rniwa: calendar example: in a calendar grid, you might want to reference days in various ways: by day of week, by week number, weekend/weekday 00:58:37 rniwa: you might want to have a single element that acts as multiple parts 00:59:01 ... but you probably only need to select an element as a single part at a time 00:59:37 meredithl has joined #components 00:59:37 fergal_daly: holiday example: you want style calendar days that are holidays, and days that are holidays-on-a-weekend 01:05:40 xiaoqian has joined #components 01:06:19 RRSAgent, make minutes 01:06:19 I have made the request to generate https://www.w3.org/2019/09/17-components-minutes.html xiaoqian 01:06:21 heycam has joined #components 01:06:35 RRSAgent: pointer 01:06:35 See https://www.w3.org/2019/09/17-components-irc#T01-06-35 01:12:25 JohnRiv has joined #components 01:18:28 jan has joined #components 01:18:38 https://github.com/w3c/webcomponents/issues/738#issuecomment-486897992 01:19:20 emilio has joined #components 01:20:02 emilio: https://github.com/w3c/webcomponents/issues/826 01:20:29 chrishall has joined #components 01:21:05 diervo has joined #components 01:21:10 scribe: 01:21:22 ekashida has joined #components 01:21:22 scribe: diervo 01:21:33 emilio: we didn't implement forwarding because we were unclear 01:21:42 rniwa has joined #components 01:21:45 danclark has joined #components 01:21:49 fergal_daly: it was consensus on the syntax 01:22:01 jacksteinberg has joined #components 01:22:23 ryosuke: the syntax might have to change due to the multiple part selector 01:22:42 fergal_daly: Wouldn't that work anyway? 01:23:17 riosuker: You can't define a forward as a singlely named part 01:23:19 s/ryosuke/rniwa 01:23:42 jan has joined #components 01:25:08 rniwa: Jus because it works doesn't mean its suficient 01:25:28 rniwa: maybe we should be able to forward a multiple part as one 01:27:12 hober: I can see how coalescing forwarded parts might be useful 01:28:22 tab: we could add grammar but it will make things more complicated 01:29:23 rniwa: we should have parity ergonomics for multiple part syntax multiple forward syntax 01:31:13 tab: the syntax seems easy to introduce 01:31:59 tab: the mental model for forwards was meant to be similar as desctructuring 01:32:09 hober: seems like a super set and that seems fine 01:33:28 annevk: seems like a reasonable addition 01:33:56 rniwa: today gecko supports only parts without multiple parts and forwarding 01:35:09 jan has joined #components 01:35:28 topic: delegate focus 01:36:17 rakina: Focus navigation today uses sequencial focus navigation which has certain constraints 01:37:09 rakina: the javascript focus method will only look at the tabIndex and that might not be sufficient 01:37:28 rakina: we want to change the focus delegation for hosts that have delegate focus, for cases when we call focus method of by clicking it 01:37:36 https://github.com/w3c/webcomponents/issues/830 01:37:43 jan has joined #components 01:37:48 rakina: but we want to keep the semantics 01:37:58 rakina: of the old behavior 01:39:31 rniwa: any concerns? 01:39:46 ekashida: we would love to have an api for now what can be focus 01:40:10 Domenic: the problem is that those apis are platform specific which is tricky 01:40:47 Emilio: Also the problem is that some of the focusability depends on the styles (it might need force style updates) 01:41:05 Domenic: not sure if we should design this API, but is worth discuss it 01:41:30 rniwa: Would people care about what element get focus? 01:41:50 whsieh has joined #components 01:41:52 rniwa: First click focusable 01:42:19 ekashida: As per the for overriding the default, nobody has asked for that 01:42:38 https://github.com/whatwg/html/pull/4731#issuecomment-529324420 01:42:46 Domenic: Consensus on what gets focus by default focus for click and programatic 01:43:15 dot-miniscule has joined #components 01:43:28 sanketj has joined #components 01:43:31 masonfreed has joined #components 01:45:08 Emilio: depending on where the rule comes from (from inside the shadow or outside the sahdow) how would that work? 01:45:56 rniwa: we might want to do :focus on the host for style the whole component 01:46:04 Emilio: :host:focus-within 01:46:25 Emilio: focus within will match 01:46:34 rniwa: we should match :focus 01:46:40 rniwa: for the outside 01:46:56 annevk: Does css has good ways to describe context? 01:47:10 Emilio: The input of selector matching is a list of trees 01:47:45 annevk: how the spec will work? 01:48:53 hober: within the shadow rom the host selector we want to be able to focus within so that the coponents can know, and in the outside focus within shouldnt match or doesn't matter 01:49:15 tab: we will have to do some magic but seems doable in spec 01:51:32 elsa: I have some arguments against it 01:52:39 Emilio: if you have a global focus rule, even though that its a button focus inside 01:53:07 elisa: Im worry about the focus ring due to interactivity 01:53:36 Domenic: Focus visible will only show it in the inner thing 01:54:08 elisa: The thing that has focus is the thing that will take key stroke 01:54:35 Domenic: it seems to be an implementation detail 01:55:57 rniwa: this is very confusing 01:56:16 rniwa: the :focus match is orghogonal to the focus-ring 01:56:42 fergal_daly: from the outside a component is one thing, but the reality is that is not 01:57:09 fergal_daly: what about iframes? 01:57:37 rniwa: frames get really wonky 01:57:50 Domenic: I think the mental model seems the same 01:58:22 Bocupp: is the active element from which the host exists, and inside has its own focus 01:58:44 data:text/html, 01:58:47 lol iframes are specifically excluded from :focus despite being in the focus chain 01:59:11 > For the purposes of the CSS :focus pseudo-class, an element has the focus when its top-level browsing context has the system focus, it is not itself a browsing context container, and it is one of the elements listed in the focus chain of the currently focused area of the top-level browsing context. 01:59:13 tab: what is focus-visible can be some sort of part? 01:59:54 ekashida has joined #components 01:59:55 tab: in general we dont want to expose the fact that there is a shadow-root, however parts explcitly exposes the fact that we are in a shadow 02:00:04 tab: mayb we can auto surface it as deeply as necesary 02:00:13 hober: Im concerned about that part 02:00:42 hober: parts are explicit, focus might not 02:00:44 Domenic: I wonder how that ended up being a thing 02:01:05 annevk: I wonder if it was done for reasons similar to aboxhall_'s reasoning. 02:01:17 hober: encapsulation concerns make sense, but piercing the encapsulation in this case might be needed. 02:01:33 hober: example about photoshop 02:02:00 note: the projector laptop is complaining about low battery. 02:02:38 hober: if the component wants to do specific focus rings, does the component needs to be smart about it? 02:02:40 tab: yes 02:02:55 rniwa: I don't think we ever going to do a piercing shadow boundary 02:03:07 Emilio: I agree with rniwa 02:03:40 Emilio: we have a consistent focus for the DOM, CSS should behave similarly 02:03:58 tab: auto piercing its controversial yes, but it might be justified maybe 02:04:21 hober: is there a particular isssue for this? 02:04:57 rniwa: we should file an issue on the css spec and or html 02:05:15 Domenic: they have spec really well the focusability 02:05:49 rniwa: I think elisa concerns are with focus-ring 02:07:18 The consensus in the room is that the focus should always match shadow-host focus-visible rule. We will file an issue on CSS and HTML to track the focus-ring 02:08:01 s/elisa/aboxhall 02:08:10 s/elisa/aboxhall 02:08:46 s/elsa/aboxhall 02:10:38 tomalec_ has joined #components 02:10:45 s/elsa/aboxhall/g 02:15:12 hiroshige has joined #components 02:16:21 rniwa has joined #components 02:17:53 scribe: annevk 02:18:03 Topic: scoped custom element registries 02:18:18 hober: who did this? 02:18:44 diervo: nothing has changed since the last time, Justin isn't here 02:18:58 Mason: Justin wanted this on the agenda, but he isn't here 02:19:09 Mason: he has an action item to make a concrete proposal 02:19:16 Mason: not sure what we should discuss beyond that 02:19:29 hober: he still has that action item and we're all excited about seeing that move forward 02:19:48 topic: constructable style sheets 02:20:14 Domenic: I have an idea on how to fix arrays 02:20:16 github: https://github.com/WICG/construct-stylesheets/issues/45 02:20:19 masonfreed has joined #components 02:20:20 hober: is there an issue against IDL? 02:20:24 Domenic: yes, it's kinda long 02:20:34 jan has joined #components 02:20:34 https://github.com/heycam/webidl/issues/796 02:20:52 emilio: I may have opinions 02:21:12 Tab: if we do something in IDL, typed OM will use it 02:21:25 emilio: I was thinking about style sheet manipulation APIs 02:21:43 Domenic: concretely the IDL proposal adds (see issue) 02:21:50 jan has joined #components 02:21:55 rniwa: would we change something? 02:21:58 Domenic: only new things 02:22:21 Domenic: it would mostly have more behavior, but would not have item() 02:22:45 emilio: can you feature-detect? 02:22:50 Domenic: Object.isFrozen() 02:23:04 rniwa: it's not great that we keep inventing new ways of doing things 02:23:13 rniwa: promises/callbacks, ways to do arrays 02:23:17 rniwa: why? 02:23:26 Domenic: that's why we tried to use FrozenArray 02:23:55 emilio: if I were to design it from scratch I'd add methods to ShadowRoot 02:24:26 rniwa: StyleSheetList 02:25:11 Domenic: options 02:25:30 Domenic: 1) we can do something specific for our use case per emilio's suggestion 02:25:39 Domenic: 2) or we can do something based on array in IDL 02:26:26 xiaoqian has joined #components 02:27:39 rniwa: why do we have constructable style sheets? 02:27:59 Tab: they want to load them via their object graph, reuse them more easily 02:28:37 emilio/Tab: with