Skip to content

Conversation

@queengooborg
Copy link
Contributor

This PR adds a feature for the Geometry Interfaces Module Level 1.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Sep 25, 2024
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

I think the key question here is: what APIs actually return these types today?

I'm having a hard time reviewing this feature because it reads as extremely generic and I can't find any developers actually talking about "geometry level 1." As written, this feature tells a very unlikely story: that browsers shipped—and developers want—an abstract facility for doing geometry math.

The spec (and searching Stack Overflow) hints that this is not really case:

The SVG interfaces SVGPoint, SVGRect and SVGMatrix are aliasing the here defined interfaces in favor for common interfaces used by SVG, Canvas 2D Context and CSS Transforms. [SVG11] [HTML] [CSS3-TRANSFORMS]

I don't know what the oldest thing is here but due to the limitations that we need to resolve in #971, I suspect these keys should (for now) reside with their oldest companion features, probably something like SVG or Canvas.

@dontcallmedom
Copy link
Member

I think the key question here is: what APIs actually return these types today?

see e.g. https://dontcallmedom.github.io/webidlpedia/names/DOMMatrix.html (section "Methods and attributes that return objects implementing DOMMatrix") - works for other names in the list as well.

I'm having a hard time reviewing this feature because it reads as extremely generic and I can't find any developers actually talking about "geometry level 1.

+1

I don't know what the oldest thing is here but due to the limitations that we need to resolve in #971, I suspect these keys should (for now) reside with their oldest companion features, probably something like SVG or Canvas.

Historically,

The transformation matrix interface replaces the SVGMatrix interface from SVG1.1

Among different usages, SVGMatrix was the type for the long-supported SVGTransform.matrix

@Elchi3 Elchi3 changed the title Add feature for Geometry Interfaces Module Level 1 Add feature for Geometric shapes Nov 22, 2024
@Elchi3
Copy link
Collaborator

Elchi3 commented Nov 22, 2024

I've updated name and description here. I think this is part of the DOM and is an abstract set of interfaces that serve multiple other APIs such as CSS, canvas and SVG. Developers will encounter it in these contexts and if they have worked with it in say CSS, it will be familiar in SVG or canvas. I think it is fine to have such abstract features. Array is also abstract in that sense. I think Python doesn't have builtin matrices either and so numpy is an abstract package ("feature") which will let you work with matrices as a general thing. Does all this move us forward in some direction with this PR?

@Elchi3 Elchi3 requested a review from ddbeck November 22, 2024 11:20
@Elchi3
Copy link
Collaborator

Elchi3 commented Dec 12, 2024

@ddbeck there are lots of keys here. I think an approach like with sensors (overlapping keys) would be impractical, what do you say?

@Elchi3 Elchi3 changed the title Add feature for Geometric shapes Add feature for DOM Geometry Dec 17, 2024
@Elchi3
Copy link
Collaborator

Elchi3 commented Dec 17, 2024

I discussed this with @ddbeck and we think landing this as "DOM Geometry" is best.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Thank you!

@ddbeck ddbeck merged commit f9171a3 into web-platform-dx:main Dec 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants