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

Use a single-case name for meshGradient #181

Closed
AmeliaBR opened this issue Jun 27, 2016 · 10 comments
Closed

Use a single-case name for meshGradient #181

AmeliaBR opened this issue Jun 27, 2016 · 10 comments

Comments

@AmeliaBR
Copy link
Contributor

As explained in #140, we've opted to separate out the paint server aspect of mesh gradients from the renderable graphics aspect. Currently, the draft uses <meshGradient> and <mesh> respectively, but the camelCased <meshGradient> contradicts with the working group's commitment to not introduce new camelCase names (as discussed in #161).

@nikosandronikos has argued against the name <meshgradient> without camelCase (and I agree with him), because of inconsistency with the existing <linearGradient> and <radialGradient>. It's confusing enough that we have some camelCase and some single-case names, without having them so similar as well.

So we need a new name. Again, we're using the name <mesh> for an element that creates a painted shape on screen, the missing name is for the element that defines the shape and color stops.

My best recommendation: <meshgrid>. I think that makes clear that this is the element that contains <meshrow>s of <meshpatch>es.

@tabatkins
Copy link
Member

Sounds good.

@AmeliaBR
Copy link
Contributor Author

Adding to agenda so we can get a resolution:

PROPOSAL: Change the name of <meshGradient> to <meshgrid> to avoid mixed-case confusion.

@AmeliaBR AmeliaBR added this to the CR milestone Jun 30, 2016
@Tavmjong
Copy link
Contributor

We, as a group, agreed to no longer introduce new camelCase element names except for consistency with previously defined elements. I think fits this case. Try searching for images using the two terms, 'mesh grid' and 'mesh gradient'. The two searches yield dramatically different types of images; only 'mesh gradient' returns the expected images for a mesh paint server.

@tabatkins
Copy link
Member

I'm going to register a complaint if we try and introduce new camelCase names. There is a reason we're avoiding them (they'll cause compat problems until implementations converge, and every new name slightly increases the cost of some hot paths), and "we don't want to think of a different name for this new element" is not a strong justification to go against that.

@AmeliaBR
Copy link
Contributor Author

Discussed at the telcon of 30 June 2016. Those present agreed not to make any decision until we have further feedback. If anyone else shares @tabatkins' strong concerns about new mixed-case elements, please speak up.

If we do change to a single case name, @Tavmjong and @nikosandronikos are arguing for keeping it as <meshgradient>, for clarity of purpose over consistency with the old elements.

@annevk
Copy link
Member

annevk commented Jul 1, 2016

What @tabatkins raises are not just concerns, but arguments that have a basis in fact, right? We know that any new SVG element that does not follow the HTML (parser) conventions will require us to add a special case to the HTML parser.

I agree with @tabatkins that we should not do that.

@nikosandronikos
Copy link
Member

nikosandronikos commented Jul 3, 2016

Thanks for chiming in @annevk. It's not that we doubt Tab, but this is going to suck for users so we want to make sure the general consensus among browser implementers is to avoid special cases in the parser at all costs.

So on to the bikeshedding...
How about meshpaint?

I think ultimately I'd like to extend the content model of meshpatch to support elements other than stop. For example, a solid fill, or a uv mapped paint server. I think that the structure of mesh gradients is currently set up so that we could do that and it would make sense - as long as the outer element doesn't reference a particular type of paint server.

@AmeliaBR
Copy link
Contributor Author

Resolution from 7 July 2016:

RESOLUTION: Rename meshGradient to meshgradient, add a note in the spec asking for feedback from authors and implementors as to their preference for use and separately their feedback on the difficulty of implementing camelcased element names

@Tavmjong
Copy link
Contributor

Note in spec is missing.

@Tavmjong Tavmjong reopened this Jul 21, 2016
@annevk
Copy link
Member

annevk commented Jul 21, 2016

It seems somewhat pointless to have such a note. Implementers are not going to want this to change. And developers probably don't want it to change either since the transition pain in HTML land would be huge.

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

5 participants