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

Fold SVGAnimatedPoints (a mixin) into SVGPolygonElement and SVGPolylineElement #5181

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

foolip
Copy link
Contributor

@foolip foolip commented May 21, 2021

Redirect it to SVGPolygonElement, an arbitrary choice between the two.

Document animatedPoints in a similar way to animVal here:
https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString

This ignores that the spec requires animatedPoints to be an alias of
points, because that does not match what's actually implemented (yet):
https://svgwg.org/svg2-draft/shapes.html#__svg__SVGAnimatedPoints__animatedPoints
https://wpt.fyi/results/svg/shapes/animatedPoints-non-animated.html?run_id=5709221590990848&run_id=5697986191425536&run_id=5747784122630144&run_id=5742635329257472

@foolip
Copy link
Contributor Author

foolip commented May 21, 2021

@Elchi3 I'm leaving this as a draft pull request since I unfortunately (per habit) looked too closely and discovered something terrible. points and animatedPoints are claimed to be aliases in the spec, but I checked Chromium's implementation and they're not aliases. What do do? 😢

@github-actions
Copy link
Contributor

github-actions bot commented May 21, 2021

Preview URLs

Flaws

URL: /en-US/docs/Web/API/SVGPolylineElement
Title: SVGPolylineElement
on GitHub
Flaw count: 5

  • macros:
    • /en-US/docs/Web/API/SVGPolylineElement/animatedPoints does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist
    • /en-US/docs/Web/API/SVGPolylineElement/points does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist

URL: /en-US/docs/Web/API/SVGPolygonElement
Title: SVGPolygonElement
on GitHub
Flaw count: 5

  • macros:
    • /en-US/docs/Web/API/SVGPolygonElement/animatedPoints does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist
    • /en-US/docs/Web/API/SVGPolygonElement/points does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist
    • /en-US/docs/Web/API/SVGPointList does not exist

External URLs

URL: /en-US/docs/Web/API/SVGPolylineElement
Title: SVGPolylineElement
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/SVGPolygonElement
Title: SVGPolygonElement
on GitHub

No new external URLs

(this comment was updated 2021-06-03 07:49:19.021350)

@Elchi3
Copy link
Member

Elchi3 commented May 21, 2021

@Elchi3 I'm leaving this as a draft pull request since I unfortunately (per habit) looked too closely and discovered something terrible. points and animatedPoints are claimed to be aliases in the spec, but I checked Chromium's implementation and they're not aliases. What do do? 😢

Looks like a spec change per https://www.w3.org/TR/SVG2/shapes.html#InterfaceSVGAnimatedPoints

We probably want to show this spec change in the docs and in BCD then. Currently BCD just says "only implements the SVG 1.1 specification of the interface." which is too abstract. We should talk about this specific change instead I assume.

@foolip
Copy link
Contributor Author

foolip commented May 21, 2021

Aha, so this might be what the notes were about! I frowned and sent a PR to remove them in mdn/browser-compat-data#10560, but maybe it should go together with demixing.

@foolip
Copy link
Contributor Author

foolip commented May 21, 2021

Judging by https://wpt.fyi/results/svg/shapes/animatedPoints-non-animated.html no browser has followed the spec change here, it's just something the spec editors hope for at this point. Should we just document what's actually implemented?

@Elchi3
Copy link
Member

Elchi3 commented May 21, 2021

I see. Well, then I guess we should try to document reality and that's SVG 1.1 and implementations and not SVG 2.

@foolip foolip marked this pull request as ready for review June 2, 2021 07:11
@foolip foolip requested review from a team as code owners June 2, 2021 07:11
@foolip foolip requested review from Rumyra and removed request for a team June 2, 2021 07:11
@foolip
Copy link
Contributor Author

foolip commented Jun 2, 2021

@Elchi3 I've tried to document reality, PTAL.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! There is a macro error but LGTM otherwise


<dl>
<dt>{{domxref("SVGPolygonElement.animatedPoints")}} {{readOnlyInline}}</dt>
<dd>A {{DOMxRef("SVGPointList")}} representing the animated value of the element's {{SVGAttr("points")}} attribute. If the { {SVGAttr("points")}} attribute is not being animated, it contains the same value as the <code>points</code> property.</dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the build fails because you have a line break in a macro call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a while to spot, but yeah I had { {.

…neElement

Redirect it to SVGPolygonElement, an arbitrary choice between the two.

Document animatedPoints in a similar way to animVal here:
https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString

This ignores that the spec requires animatedPoints to be an alias of
points, because that does not match what's actually implemented (yet):
https://svgwg.org/svg2-draft/shapes.html#__svg__SVGAnimatedPoints__animatedPoints
https://wpt.fyi/results/svg/shapes/animatedPoints-non-animated.html?run_id=5709221590990848&run_id=5697986191425536&run_id=5747784122630144&run_id=5742635329257472
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to the day we are in markdown and with as little kumascript macros as possible. :-)

files/en-us/web/api/svgpolylineelement/index.html Outdated Show resolved Hide resolved
files/en-us/web/api/svgpolygonelement/index.html Outdated Show resolved Hide resolved
@foolip
Copy link
Contributor Author

foolip commented Jun 3, 2021

Looking forward to the day we are in markdown and with as little kumascript macros as possible. :-)

What will xrefs look like with Markdown? Won't it still be a macro that one can mess up?

@Elchi3
Copy link
Member

Elchi3 commented Jun 3, 2021

What will xrefs look like with Markdown? Won't it still be a macro that one can mess up?

Initially, yes, but I hope we won't have xref macros forever.

@Elchi3 Elchi3 merged commit 8d8e80b into mdn:main Jun 3, 2021
@foolip foolip deleted the rm-SVGAnimatedPoints branch June 3, 2021 08:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants