Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

feat(Component): add wrapElement parameter so that Components can be… #1335

Closed
wants to merge 1 commit into from

Conversation

Pajn
Copy link

@Pajn Pajn commented Aug 8, 2014

…placed in SVG

I'm submitting this to get some response. I don't know how to test this
as the template is loaded anyway, it just isn't rendered.

Closes #987

@mhevery
Copy link
Contributor

mhevery commented Aug 8, 2014

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement). CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form): http://code.google.com/legal/individual-cla-v1.0.html

@mhevery mhevery added cla: no and removed cla: yes labels Aug 8, 2014
@Pajn
Copy link
Author

Pajn commented Aug 8, 2014

I have signed to CLA using my primary email. Should I sign with the gmail instead?

@vicb
Copy link
Contributor

vicb commented Aug 9, 2014

I'm submitting this to get some response

Why is the question ?

Should I sign with the gmail instead?

You should sign the CLA for the email associated with the commit which apparently is ok

@Pajn
Copy link
Author

Pajn commented Aug 10, 2014

Why is the question ?
Sorry.
The namespaceUri works in Chrome (and Dartium) but not in IE. IE also requires svg to be used as tagname in Pajn@6e655d1#diff-b8155758b618de44582b59036af50e64R145
This would require that both namespaceUri and tagname is specified (as well as useShadowDom: false as SVG doesn't support shadow dom).
Just specifying the tagname (as in angular/angular.js@f0e12ea) doesn't work either (this is tried with dom.document.createElement("svg"), new dom.Element.tag("svg") and new dom.Element.html("<svg></svg>").

The alternative would be to add specific SVG support that sets tagname, namespaceUrl and shadown dom. In this case, should MathML be investigated as well?

EDIT: I found the wrap technique of AngularJS work if done like them and put it inside of the div.

@Pajn Pajn changed the title [WIP] feat(Component): add namespaceUri parameter so Components can be placed ... feat(Component): add wrapElement parameter so that Components can be placed in SVG Aug 10, 2014
@Pajn Pajn changed the title feat(Component): add wrapElement parameter so that Components can be placed in SVG feat(Component): add wrapElement parameter so that Components can be… Aug 10, 2014
@vicb
Copy link
Contributor

vicb commented Aug 13, 2014

I wonder how this work on the compiled version, don't the transformers need to be updated to take wrapElement into account ?

@Pajn
Copy link
Author

Pajn commented Aug 13, 2014

ie: indent by 4ws, onyl specified what's needed

Fixed.

is the di pkg really needed ?

Fixed.

Hi -> SVG based component

Fixed.

What prevent this PR from being tested by a regular test (rather an an e2e test which is more expensive)

As the test rather test how the browser handles the component rather than Angular I thought it were needed, but I will investigate if a unit test will do.

I wonder how this work on the compiled version, don't the transformers need to be updated to take wrapElement into account ?

It's tested in Chrome, Chromium and IE11 (all compiled), it's not tested in Firefox as I experience the same issue with this as with shadow_dom_components example (#1337). I don't have any mac so I can't test Safari.

@mhevery
Copy link
Contributor

mhevery commented Aug 26, 2014

Achievement unlocked: CLA signature found!

@naomiblack
Copy link
Contributor

SVG is not a high priority in pre-1.0. @vicb can you please take a quick look and see if this can be included without a lot of work elsewhere, or close?

@vicb
Copy link
Contributor

vicb commented Sep 4, 2014

@Pajn makes sense, we have no clear policy about removing els but it's better to be on the safe side.
LGTM.

@rkirov
Copy link
Contributor

rkirov commented Oct 9, 2014

This requires a trivial rebasing. Punting to post v1.0.

@naomiblack
Copy link
Contributor

It turns out that that this touches a lot of AngularDart code and the rebasing was non-trivial.
We're going to close this issue to focus on 2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Components doesn't work in SVG
6 participants