Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement content select attribute #500

Closed
imjoshdean opened this issue Oct 16, 2013 · 18 comments
Closed

Implement content select attribute #500

imjoshdean opened this issue Oct 16, 2013 · 18 comments

Comments

@imjoshdean
Copy link
Contributor

VOTE HERE

http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/#toc-projection

Currently in can.Component, it seems that you can only use one tag in the component template, it seems like where components is going is to not only allow more than one content tag, but to specify what the content element projects. This is done via a select property on the content node.

Currently:

DOM:

<hello>Bob</hello>

"hello" Template:

<h1><content/></h1>

Rendered:

<hello><h1>Bob</h1></hello>

Proposal:

DOM:

<hello>
  <div class="name">Bob</div>
  <div class="email">[email protected]</div>
</hello>

"hello" Template:

<h1>My name is <content select=".name"/></h1>
<h2>Email me at <content select=".email"/></h2>

Rendered:

<hello>
  <h1>My name is Bob</h1>
  <h2>Email me at [email protected]</h2>
</hello>

VOTE FOR THIS HERE: http://bithub.com/event/25882

@justinbmeyer
Copy link
Contributor

@mihael has worked a bit on this.

Sent from my iPhone

On Oct 15, 2013, at 7:31 PM, Josh Dean [email protected] wrote:

http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/#toc-projection

Currently in can.Component, it seems that you can only use one tag in the component template, it seems like where components is going is to not only allow more than one content tag, but to specify what the content element projects. This is done via a select property on the content node.

Currently:

DOM:

Bob
"hello" Template:

Rendered:

Bob


Proposal:

DOM:

Bob
"hello" Template:

My name is

Email me at

Rendered:

My name is Bob

Email me at [email protected]

— Reply to this email directly or view it on GitHub.

@imjoshdean
Copy link
Contributor Author

So...2.1 milestone?

Sent from my iPhone

On Oct 15, 2013, at 9:01 PM, Justin Meyer [email protected] wrote:

@mihael has worked a bit on this.

Sent from my iPhone

On Oct 15, 2013, at 7:31 PM, Josh Dean [email protected] wrote:

http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/#toc-projection

Currently in can.Component, it seems that you can only use one tag in the component template, it seems like where components is going is to not only allow more than one content tag, but to specify what the content element projects. This is done via a select property on the content node.

Currently:

DOM:

Bob
"hello" Template:

Rendered:

Bob


Proposal:

DOM:

Bob
"hello" Template:

My name is

Email me at

Rendered:

My name is Bob

Email me at [email protected]

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

@wclr
Copy link
Contributor

wclr commented Dec 8, 2013

+1 that would be nice

@wclr
Copy link
Contributor

wclr commented Feb 7, 2014

Is it going to be in 2.1?

@ccummings ccummings modified the milestones: 2.2.0, 2.1.0 Apr 25, 2014
@wclr
Copy link
Contributor

wclr commented Jun 17, 2014

This feature is really needed.

@justinbmeyer
Copy link
Contributor

@whitecolor would you like to help make this happen? @matthewp has been working on it.

@gsmeets
Copy link
Contributor

gsmeets commented Jun 20, 2014

If this gets bumped to 2.1.4 I'm willing to participate. ;) This feature is also high on my wishlist. And I have it rather sooner than later.

@justinbmeyer
Copy link
Contributor

As it would be a new feature, it has to be 2.2 at a minimum.

Sent from my iPhone

On Jun 20, 2014, at 9:18 AM, Guido Smeets [email protected] wrote:

If this gets bumped to 2.1.4 I'm willing to participate. ;) This feature is also high on my wishlist. And I have it rather sooner than later.


Reply to this email directly or view it on GitHub.

@gsmeets
Copy link
Contributor

gsmeets commented Jul 2, 2014

Ofcourse, semver. ;) I'll see if I can make some headway this week on this feature. I don't see any active relevant branches by @matthewp regarding this matter? Is there anything I can branch off, or should I start from scratch?

@matthewp
Copy link
Contributor

matthewp commented Jul 2, 2014

@gsmeets I've been working on it in a separate project. If you'd like to help out that would definitely be appreciated. Do you have skype or anything so we can discuss? Email me [email protected]

@justinbmeyer justinbmeyer changed the title Proposal: Implement multiple content tags and select property for can.Component Implement content select attribute Aug 26, 2014
@wclr
Copy link
Contributor

wclr commented Dec 6, 2014

Just intresting, any new on this?

@gsmeets
Copy link
Contributor

gsmeets commented Dec 8, 2014

I haven't had the time to look into it after matthewp pointed me to his branch. I've changed a few things around on my end to where I don't need this feature for now.

@wclr
Copy link
Contributor

wclr commented Dec 8, 2014

I think it's no easy task to take on and complete for some one who is not in the loop. @matthewp is our oly chance.

@matthewp
Copy link
Contributor

matthewp commented Dec 8, 2014

I think I'm probably the last person who was working on this. I ran into a roadblock with the method I was using to trigger an update (MutationObservers) was too slow in older browsers. The way forward is either to A) Make this method fast; see shadow or B) Start from scratch with a new method.

We could also punt on the feature and instead make it work with native shadow DOM or the shadow DOM polyfill.

@wclr
Copy link
Contributor

wclr commented Dec 8, 2014

We could also punt on the feature and instead make it work with native shadow DOM or the shadow DOM polyfill.

What is wrong with this approach?

@wclr
Copy link
Contributor

wclr commented Jun 9, 2015

Is it going to be in 2.3 or anytime soon?

@matthewp
Copy link
Contributor

matthewp commented Jun 9, 2015

No, not in 2.3 at least.

@daffl daffl removed this from the 2.3.0 milestone Oct 22, 2015
@justinbmeyer
Copy link
Contributor

Closing for #2278 which will be far easier to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants