W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: [webcomponents] How about let's go with slots?

From: Hayato Ito <hayato@chromium.org>
Date: Tue, 19 May 2015 04:27:14 +0000
Message-ID: <CAFpjS_2m2p_pAT=Db7iMUs3myT8ysy2kyfOsBL7qTRvD0sfZaA@mail.gmail.com>
To: Dimitri Glazkov <dglazkov@google.com>
Cc: Domenic Denicola <d@domenic.me>, Justin Fagnani <justinfagnani@google.com>, "esprehn@chromium.org" <esprehn@chromium.org>, "philip@philipwalton.com" <philip@philipwalton.com>, "dfreedm@google.com" <dfreedm@google.com>, "sjmiles@google.com" <sjmiles@google.com>, "rniwa@apple.com" <rniwa@apple.com>, "eoconnor@apple.com" <eoconnor@apple.com>, "annevk@annevk.nl" <annevk@annevk.nl>, "travis.leithead@microsoft.com" <travis.leithead@microsoft.com>, "mjs@apple.com" <mjs@apple.com>, "arronei@microsoft.com" <arronei@microsoft.com>, "slightlyoff@google.com" <slightlyoff@google.com>, "public-webapps@w3.org" <public-webapps@w3.org>
I think we can learn something from existing programming languages.
For example, I like Python's way to handle function's parameters. That
enables us to select:

- By Position
- By Keyword
- *args (Grab unused positional arguments)
- *kwds* (Grap unused keyword arguments)

I think this is over-engineering for us. But this might be interesting to
us as a reference.


On Tue, May 19, 2015 at 12:54 PM Hayato Ito <hayato@chromium.org> wrote:

> I think the problem we have to solve is:
>
> Problem: "Given that we have a list of nodes, what's the best way to
> select nodes from the list? We can give any *hint* to the nodes beforehand
> if we wish."
>
> Is this a correct problem statement? I think we don't have to limit our
> answers to this problem by the current select and the content-slot.
> Any better ideas can be acceptable, I think.
>
> The hint we can use is:
>
> - tag name
> - id attribute
> - class attribute
> - any other attributes. (Okay to have a dedicated attribute, such as
> 'content-slot')
> - The position of the node in the list
> - Other status, such as ":focused" (in CSS's terminology)
> - Anything else?
>
> I think the current <content select>  has been there in the spec for a
> long time. No one hasn't spent much time on thinking a replacement of it
> until recently.
> I hope that this discussion might be a good opportunity to get an
> agreement between us.
>
>
> On Tue, May 19, 2015 at 12:23 PM Dimitri Glazkov <dglazkov@google.com>
> wrote:
>
>> On Mon, May 18, 2015 at 8:18 PM, Hayato Ito <hayato@chromium.org> wrote:
>>>
>>> Thank you! I'm afraid that we don't have enough discussion about the
>>> pros and cons between "select nodes using a selector" and "select nodes by
>>> a fixed id using attribute".
>>>
>>
>> BTW, here's one bit of research I'd done:
>> https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Partial-Redistributions-Analysis.md
>>
>> :DG<
>>
>
Received on Tuesday, 19 May 2015 04:27:42 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC