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

Separating Grid and Flex support for align-items #2156

Merged
merged 5 commits into from
May 31, 2018

Conversation

rachelandrew
Copy link
Collaborator

Further to emails with @chrisdavidmills and @wbamberg an attempt at adding a separate section for grid and flex layout support info.

I am sure this will need all kinds of changes but if we can get this one figured out then I can go through all the rest.

@Elchi3 Elchi3 added the data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS label May 25, 2018
},
"first_last_baseline": {
"flex_context": {
"description": "Supported in Flex Layout",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be a sub-item of __compat.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure I understand this comment - I was going on a suggestion by @wbamberg which had this outside __compat, so perhaps he could comment to clarify.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's my mistake: yes, description should be inside __compat :).

"chrome": [
{
"version_added": "57"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Arrays are only permitted in support blocks when they have more than 1 entry.

"chrome_android": [
{
"version_added": "52"
}
Copy link
Contributor

@ExE-Boss ExE-Boss May 26, 2018

Choose a reason for hiding this comment

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

"edge": [
{
"version_added": "16"
}
Copy link
Contributor

@ExE-Boss ExE-Boss May 26, 2018

Choose a reason for hiding this comment

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

"edge_mobile": [
{
"version_added": true
}
Copy link
Contributor

@ExE-Boss ExE-Boss May 26, 2018

Choose a reason for hiding this comment

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

"firefox": [
{
"version_added": "52"
}
Copy link
Contributor

@ExE-Boss ExE-Boss May 26, 2018

Choose a reason for hiding this comment

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

"firefox_android": [
{
"version_added": "52"
}
Copy link
Contributor

@ExE-Boss ExE-Boss May 26, 2018

Choose a reason for hiding this comment

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

@wbamberg wbamberg self-requested a review May 26, 2018 05:12
"version_added": null
},
"version_added": "52"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong indentation

@wbamberg
Copy link
Collaborator

Thanks for this, @rachelandrew . It helps a lot to have something concrete to look at. With this data I think it would be best to include 2 tables in the page, with calls like:

<h2 id="Browser_compatibility">Browser compatibility</h2>

<h3 id="Support_in_Flex_layout">Support in Flex layout</h3>

<p>{{Compat("css.properties.align-items.flex_context")}}</p>

<h3 id="Support_in_Grid_layout">Support in Grid layout</h3>

<p>{{Compat("css.properties.align-items.grid_context")}}</p>

That would give us a table looking like this:

screen shot 2018-05-30 at 6 03 21 pm

I think this looks pretty clear. Note that this means the description fields are redundant, but I don't think they do any harm.

If we tried to include both in the same table I think it would get confusing when sub-sub-features like "first baseline and last baseline" are included:

screen shot 2018-05-30 at 8 11 07 pm

I can't think of any compelling reason not to use this as a model for the Grid/Flex/Multicol properties. I'm not sure if it will work very well when and if we want to support "aggregate" tables, like a table of all the Grid properties. But I don't think that should stop us moving forward with this.

I'd like to hear if @Elchi3 also thinks this is a good approach though, as it is a bit unusual.

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

It looks like npm-debug.log was included in this PR by accident.

Other than this I think this approach looks great. I'd also like to hear Florian's take though.

"description": "<code>first baseline</code> and <code>last baseline</code>",
"support": {
"webview_android": {
"version_added": null
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be really nice to change some of these null values to Yes/No even if the version number is not known.

@rachelandrew
Copy link
Collaborator Author

I like the idea to have the separate tables. That looks nice and clear.

@ExE-Boss
Copy link
Contributor

@rachelandrew @wbamberg We should probably also do the same table separation for gap, row-gap and column-gap (which is still duplicated in grid-column-gap), as a follow-up to #1990.

@rachelandrew
Copy link
Collaborator Author

@ExE-Boss yes that's the intention (I'm currently working on restructuring the Box Alignment documentation).

@Elchi3
Copy link
Member

Elchi3 commented May 31, 2018

I also like the idea of separate tables. Great idea, @wbamberg 👍

I'm not sure if it will work very well when and if we want to support "aggregate" tables, like a table of all the Grid properties.

Not sure about this yet either, but "aggregate" tables are a whole separate thing we'll have to look at on a future day. I agree to not worry about it for now.

@Elchi3
Copy link
Member

Elchi3 commented May 31, 2018

So, this PR looks good to me, but unsure about whether there is more to come per the first comment

"if we can get this one figured out then I can go through all the rest."

If not, I'm happy to merge this and get it in today's release.

@rachelandrew
Copy link
Collaborator Author

This one stands alone, so lets publish this one and I'll work on the others doing an individual PR for each property if that makes sense? It will end up being a lot of files in one PR otherwise.

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.

That makes sense to me and is easier to review :) Thanks a lot @rachelandrew 👍
I'm merging this now and it will get published later this evening to MDN prod.

@Elchi3 Elchi3 dismissed wbamberg’s stale review May 31, 2018 14:22

Comments are addressed

@Elchi3 Elchi3 merged commit 8531552 into mdn:master May 31, 2018
a2sheppy pushed a commit to a2sheppy/browser-compat-data that referenced this pull request Jun 12, 2018
* Separating Grid and Flex support for align-items

* fixes to align-items as requested

* moving description as requested

* fixing indentation

* removing debug log
@ddbeck ddbeck mentioned this pull request Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:css 🎨 Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants