Skip to content

Remove x moz errormessage#3364

Merged
Elchi3 merged 3 commits intomdn:masterfrom
chrisdavidmills:remove-x-moz-errormessage
Feb 19, 2019
Merged

Remove x moz errormessage#3364
Elchi3 merged 3 commits intomdn:masterfrom
chrisdavidmills:remove-x-moz-errormessage

Conversation

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Feb 1, 2019

As per https://bugzilla.mozilla.org/show_bug.cgi?id=1513890

I added an extra file to contain compat data for global input element attributes, as we didn't have a specific file just for general input element attributes. Let me know what you think ;-)

Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

Looking great!

@Elchi3 Elchi3 added the data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML label Feb 4, 2019
@Elchi3
Copy link
Member

Elchi3 commented Feb 4, 2019

There is also #3093 which adds a file for input attributes.
I thought that @wbamberg maybe has thoughts on how we want to arrange the global input attributes in bcd. If not, we can probably work this out together in the next few days or as a new task in the upcoming sprint. There are a few more "global" input attributes left to be done here.

@chrisdavidmills
Copy link
Contributor Author

Sure, I'm happy to wait for a discussion and decision on this. My addition is not exactly a critical piece of support info; just a nice to have really.

My thinking was that we would have a separate file for "global" input attributes (e.g. available on all input types), and then add support info for attributes that are only supported on specific info types into the JSON files for those types.

Of course, this doesn't mean we'd have to add explicit support info for all attributes; just ones that were added later and so don't fit the "Basic support" details.

@ddbeck ddbeck added the question Issues where a question or problem is stated and a discussion is held to gather opinions. label Feb 4, 2019
@wbamberg
Copy link
Contributor

wbamberg commented Feb 8, 2019

So the current approach for this is that described in #1698 (comment), and has us treating different types of input elements as different entities, from a BCD perspective.

At the moment this gives us compat tables like:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color#Browser_compatibility
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/range#Browser_compatibility
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Browser_compatibility

The main reasons for this are:

  • there are complex interdependencies between that BCD for "type" and the BCD for the other attributes. If we document them all in one table, we have to try to describe these, and it will not be pretty.
  • people use the different input types are if they were different elements: they don't come saying "I want to make an input element" they say "I want a radio button". Presenting them with the info they need on that page seems better for usability.

Documenting compat for other attributes, even global ones, at the level of input instead of at the level of the individual types means people have to look in two places to get a complete picture of the compat story for a particular input element, and also seems to mean we might need to describe the interrelationships between this attribute and the type attribute.

But that's just my opinion :).

@chrisdavidmills
Copy link
Contributor Author

This all makes sense. So what should we do about global input attributes then? It sounds you are saying we'll have to duplicate the attribute support info across all the attributes. Which won't be any fun.

@wbamberg
Copy link
Contributor

wbamberg commented Feb 18, 2019

The linked comment #1698 (comment) talks about this:

The (related) question is whether we should explicitly enumerate all attributes, even ones whose compat story is the same as "Basic support". Or should we only enumerate ones whose compat story is different from the "Basic support" row? (I think probably we should not enumerate all attributes, but I'm not sure about this.)

So that recommends that we should only list attributes, including global ones, when we have something interesting to say about them, and otherwise treat them we covered by the "Basic support" data for that input type.

Copy link
Contributor

@ExE-Boss ExE-Boss left a comment

Choose a reason for hiding this comment

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

LGTM, r+

@chrisdavidmills
Copy link
Contributor Author

Just to correct my wording from before:

It sounds you are saying we'll have to duplicate the attribute support info across all the attributes

I meant "It sounds you are saying we'll have to duplicate the attribute support info across all the input types"

To answer Will's followup comment:

So that recommends that we should only list attributes, including global ones, when we have something interesting to say about them, and otherwise treat them we covered by the "Basic support" data for that input type.

OK, so in this case I believe we do have something interesting to say that isn't covered by Basic support. This still doesn't answer my question of where to put the data in such a case.

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Feb 19, 2019

This should probably be placed at the top level¹ into html/elements/input.json.

¹ By that I mean html.elements.input as html.elements.input.x-moz-errormessage.

@chrisdavidmills
Copy link
Contributor Author

That would probably work for me. I'll wait for a second opinion from Will/Florian.

@Elchi3
Copy link
Member

Elchi3 commented Feb 19, 2019

That works for me, too. The export "html.elements.input.x-moz-errormessage" is exactly what I would expect.
Just wondering if we're fine with the file name html/elements/input/input_attributes.json, or if we want html/elements/input/input.json or so.

@chrisdavidmills
Copy link
Contributor Author

chrisdavidmills commented Feb 19, 2019

I think input.json would be better, as this would allow the file to logically contain data points that aren't just covered by "Basic support", whether they concern attribute support or something else. I'm happy to change it.

One more question is whether we should add "Basic support" info at the input level? I agree with Will's statement about people wanting information on radio buttons or checkboxes, not "the input element", but at the same time it feels weird that the input page's compat table doesn't have a Basic support line, whereas pretty much every other one does.

Copy link
Contributor

@ExE-Boss ExE-Boss left a comment

Choose a reason for hiding this comment

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

Let’s add the “Basic support” entry from #1698:

@chrisdavidmills
Copy link
Contributor Author

Thanks @ExE-Boss ; I agree with this, and I think we should change the filename. I've done both.

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.

Thank you Chris! 👍

@Elchi3 Elchi3 merged commit a32dd6c into mdn:master Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML question Issues where a question or problem is stated and a discussion is held to gather opinions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants