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

Switch coverage.nodejs.org to an HTML table #1938

Closed
nschonni opened this issue Sep 30, 2019 · 3 comments
Closed

Switch coverage.nodejs.org to an HTML table #1938

nschonni opened this issue Sep 30, 2019 · 3 comments
Labels

Comments

@nschonni
Copy link
Member

The currently styling can probably be maintained, but this is better for accessibility and semantics.

<div class="table">
<div class="table-header">
<div>Date (UTC)</div>
<div>HEAD</div>
<div>JS Coverage</div>
<div>C++ Coverage</div>
</div>
''')
for line in reversed(index_csv):
jscov, cxxcov, date, sha = line.split(',')
date = datetime.datetime.strptime(date, '%Y-%m-%dT%H:%M:%S%fZ').strftime("%d/%m/%Y %H:%M")
out.write('''
<div class="table-row">
<div><div class="cell-header">Date (UTC)</div><div class="cell-value">{0}</div></div>
<div class="sha"><div class="cell-header">HEAD</div><div class="cell-value"><a href="https://github.com/nodejs/node/commit/{1}">{1}</a></div></div>
<div><div class="cell-header">JS Coverage</div><div class="cell-value"><a href="coverage-{1}/index.html">{2:05.2f}&nbsp;%</a></div></div>
<div><div class="cell-header">C++ Coverage</div><div class="cell-value"><a href="coverage-{1}/cxxcoverage.html">{3:05.2f}&nbsp;%</a></div></div>
</div>'''.format(date, sha, float(jscov), float(cxxcov)))
out.write('''
</div>
</div>

If the preference is to keep the divs, then adding aria would be the alternate.

@richardlau
Copy link
Member

I'm not sure why we switched from tables to divs in nodejs/testing#41.

@nschonni
Copy link
Member Author

nschonni commented Oct 1, 2019

Looks like it might have been to add a mobile experience, but I'm not sure how important that is for this data, vs. just a scrolling table

@github-actions
Copy link

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants