Re: [css-houdini-drafts] [css-typed-om] Switch CSSUnparsedValue and CSSTransformValue to having an arrayish member? (#948)

The CSS Working Group just discussed `using ObservableArray for the list-ish values in TypedOM`, and agreed to the following:

* `RESOLVED: put the list in a "value" property, and add a forwarding for compat`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: using ObservableArray for the list-ish values in TypedOM<br>
&lt;TabAtkins> github: https://github.com/w3c/css-houdini-drafts/issues/948<br>
&lt;fremy> ScribeNick: fremy<br>
&lt;fremy> TabAtkins: I tried to get better support for array-like classes in WebIDL<br>
&lt;fremy> TabAtkins: because we have three things that expose lists, and could benefit from this<br>
&lt;fremy> TabAtkins: but given I made no progress, I ended up using the legacy "getter/indexer" of WebIDL<br>
&lt;fremy> TabAtkins: but sadly that means that it's not an array<br>
&lt;fremy> TabAtkins: and you cannot use forEach etc on them<br>
&lt;fremy> TabAtkins: you have to convert them to an array first<br>
&lt;TabAtkins> https://heycam.github.io/webidl/#idl-observable-array<br>
&lt;fremy> TabAtkins: but domenic fixed this for me<br>
&lt;fremy> TabAtkins: and we have the observable array type<br>
&lt;fremy> TabAtkins: for the javascript user, it looks like an array<br>
&lt;fremy> TabAtkins: but it still triggers callbacks that allow us to type check things<br>
&lt;fremy> TabAtkins: so I'd like to switch to that<br>
&lt;fremy> TabAtkins: unfortunately that would result in a breaking change<br>
&lt;fremy> TabAtkins: indeed, the value itself cannot be an array<br>
&lt;fremy> TabAtkins: because it has to subclass the CSSValue type<br>
&lt;fremy> TabAtkins: so we need to store the list in a "values" member<br>
&lt;AmeliaBR> q+<br>
&lt;fremy> TabAtkins: for the math-value types, it's easier because it's already a FrozenArray<br>
&lt;fremy> TabAtkins: so I can just switch it<br>
&lt;fremy> TabAtkins: any objection to do this change?<br>
&lt;fremy> AmeliaBR: so, if I understand, you now need to do "x.values[0]" instead of "x[0]"?<br>
&lt;fremy> TabAtkins: if I don't accomodate that by making a special behavor, yes<br>
&lt;fremy> AmeliaBR: could we then make a putforward?<br>
&lt;fremy> TabAtkins: yes, we definitely can<br>
&lt;fremy> q+<br>
&lt;fremy> TabAtkins: and we could do that by just updating the code to do that and lookup in the array<br>
&lt;fremy> AmeliaBR: browser support?<br>
&lt;fremy> TabAtkins: yes, typedom is shipped in chrome<br>
&lt;fremy> TabAtkins: because paint api<br>
&lt;fremy> AmeliaBR: I would not like to break demos<br>
&lt;fremy> TabAtkins: yes, let's make the accomodation, it's not worth breaking the demos<br>
&lt;fremy> AmeliaBR: (restates)<br>
&lt;fremy> TabAtkins: (yes)<br>
&lt;AmeliaBR> ack AmeliaBR<br>
&lt;Rossen___> ack AmeliaBR<br>
&lt;Rossen___> ack fremy<br>
&lt;fantasai> fremy: I'm entirely in favor<br>
&lt;fantasai> fremy: Always thought it was really weird that ? and ?? you couldn't index it<br>
&lt;fantasai> fremy: so much cleaner for the PAI<br>
&lt;fantasai> fremy: not only improvement that you get an array<br>
&lt;fantasai> fremy: definitely in favor<br>
&lt;fantasai> fremy: and ??? sounds like a no-brainer<br>
&lt;fremy> TabAtkins: ok<br>
&lt;bkardell_> s/PAI/API ?<br>
&lt;fremy> s/??/forwarding<br>
&lt;fremy> TabAtkins: any concern from implementers?<br>
&lt;fremy> TabAtkins: looks like no?<br>
&lt;astearns> s/???/forwarding<br>
&lt;fremy> TabAtkins: any objection to adopt the change in the issue, with forwarding kept in?<br>
&lt;fremy> RESOLVED: put the list in a "value" property, and add a forwarding for compat<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/948#issuecomment-667245477 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 31 July 2020 17:35:20 UTC