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

[Framework] Move filtering menus generation logic #218

Merged
merged 2 commits into from
Apr 17, 2018

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Apr 16, 2018

Follow-up to PR #216 to keep dependencies minimal in published snapshots.

The filtering menus of the implementation column are now generated by the generate.js script. This means that the filter-implstatus.js script:

  1. stays agnostic about browsers that it needs to filter. The script merely uses the info in the filtering menus and does not need to hardcode a precise list of browsers.
  2. no longer needs to load translation files, which thus do not need to be kept around in published snapshots.

The generate-utils.js and utils.js scripts have been kept separated for now to ease review but they can be merged again afterwards.

The update also adds the possibility to provide translations of "desktop" and "mobile" in the tooltip.

The filtering menus of the implementation column are now generated by the
`generate.js` script. This means that the `filter-implstatus.js` script:
1. stays agnostic about browsers that it needs to filter. The script merely
uses the info in the filtering menus and does not need to hardcode a precise
list of browsers.
2. no longer needs to load translation files, which thus do not need to be kept
around in published snapshots.

The `generate-utils.js` and `utils.js` scripts have been kept separated for now
to ease review but they can be merged again afterwards.

The update also adds the possibility to provide translations of "desktop" and
"mobile" in the tooltip.
@tidoust tidoust requested a review from xfq April 16, 2018 10:10
padding: 0 0.1em;
text-align: left;
}

[data-col|=impl] details.active {
Copy link
Member

@xfq xfq Apr 17, 2018

Choose a reason for hiding this comment

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

Why not just use [data-col=impl] here? (Same question for |= usages elsewhere.)

Copy link
Member Author

Choose a reason for hiding this comment

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

There are two types of implementation columns: "Current implementations" and "Implementation intents". Internally, the data-col value for the former column is impl and the value for the latter is impl-intents. Styles need to apply to both columns, and that's precisely what the att|=val selector allows here!

Copy link
Member

Choose a reason for hiding this comment

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

I see. Thanks for the explanation!

@tidoust tidoust merged commit 63e3c32 into w3c:master Apr 17, 2018
@tidoust tidoust deleted the framework-filteringmenus branch April 17, 2018 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants