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

[Markdown] [Web/API] Remove hidden elements that don't contain live sample code blocks #7902

Closed
wbamberg opened this issue Aug 14, 2021 · 3 comments · Fixed by #8407
Closed
Assignees
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@wbamberg
Copy link
Collaborator

wbamberg commented Aug 14, 2021

Part of #7898.

In preparing Web/API docs for Markdown conversion we'd like to remove occurrences of <div class="hidden">. There are two main usages of this pattern:

  1. to include comments for editors, like the comments attached to interactive examples
  2. to hide code blocks that the author wants to participate in live samples, but doesn't want the reader to see

This issue to about removing instances of the first category. The fix in this case is often just to delete the content, although there might be some exceptions.

For an example of this pattern:

<h2 id="Browser_compatibility">Browser compatibility</h2>
<div class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div>

Sometimes this happens when an author has set hidden directly on a <pre> block that's part of a live sample. In this case we should keep the hidden class.

@wbamberg wbamberg added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Aug 14, 2021
@wbamberg
Copy link
Collaborator Author

wbamberg commented Aug 14, 2021

These are all the pages in Web/API in which a class="hidden" element does not contain any <pre> block, and are therefore in this category:

https://developer.mozilla.org/en-us/docs/web/api/css_painting_api/guide
https://developer.mozilla.org/en-us/docs/web/api/css_painting_api
https://developer.mozilla.org/en-us/docs/web/api/css_typed_om_api/guide
https://developer.mozilla.org/en-us/docs/web/api/csskeywordvalue/csskeywordvalue
https://developer.mozilla.org/en-us/docs/web/api/csskeywordvalue
https://developer.mozilla.org/en-us/docs/web/api/csspositionvalue
https://developer.mozilla.org/en-us/docs/web/api/effecttiming/easing
https://developer.mozilla.org/en-us/docs/web/api/elementinternals/labels
https://developer.mozilla.org/en-us/docs/web/api/elementinternals/reportvalidity
https://developer.mozilla.org/en-us/docs/web/api/elementinternals/role
https://developer.mozilla.org/en-us/docs/web/api/elementinternals/shadowroot
https://developer.mozilla.org/en-us/docs/web/api/elementinternals/states
https://developer.mozilla.org/en-us/docs/web/api/file/name
https://developer.mozilla.org/en-us/docs/web/api/hidconnectionevent/hidconnectionevent
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/close
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/productid
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/productname
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/receivefeaturereport
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/sendfeaturereport
https://developer.mozilla.org/en-us/docs/web/api/hiddevice/vendorid
https://developer.mozilla.org/en-us/docs/web/api/htmlimageelement/alt
https://developer.mozilla.org/en-us/docs/web/api/htmlimageelement/usemap
https://developer.mozilla.org/en-us/docs/web/api/htmlmediaelement/texttracks
https://developer.mozilla.org/en-us/docs/web/api/midioutput/clear
https://developer.mozilla.org/en-us/docs/web/api/midioutput
https://developer.mozilla.org/en-us/docs/web/api/midioutput/send
https://developer.mozilla.org/en-us/docs/web/api/midiport/close
https://developer.mozilla.org/en-us/docs/web/api/rtcicecandidatepairstats/firstrequesttimestamp
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/appenditem
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/clear
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/getitem
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/initialize
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/insertitembefore
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/length
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/numberofitems
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/removeitem
https://developer.mozilla.org/en-us/docs/web/api/svgpointlist/replaceitem
https://developer.mozilla.org/en-us/docs/web/api/windoworworkerglobalscope/settimeout

@NegiAkash890
Copy link
Contributor

Hi @wbamberg can I work on this one ? Let me know anything that I will need to fix this issue.

@wbamberg
Copy link
Collaborator Author

That would be great! Please ask if you're not sure what to do about any of the pages.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants