Skip to content

Improve the styling of the conformance results page#2307

Open
ngnpope wants to merge 29 commits into
python:mainfrom
ngnpope:ngnpope/improve-test-results
Open

Improve the styling of the conformance results page#2307
ngnpope wants to merge 29 commits into
python:mainfrom
ngnpope:ngnpope/improve-test-results

Conversation

@ngnpope

@ngnpope ngnpope commented Jun 18, 2026

Copy link
Copy Markdown

🐞 Issues Identified

Looking at the conformance results page, there were a number of issues that I noticed:

  • Inconsistent column widths as type checkers are added or removed
  • Type checker columns are in an arbitrary order
  • Scrolling down the page, it is hard to remember which column is for which type checker
  • It is also hard to see which row you're looking at in larger blocks of tests
  • Only a root template with all other elements as strings joined in Python
  • The markup didn't validate - duplicate id attributes, <span> parent of <p>
  • <th> used for all table cells, not only header cells
  • Styling is over-complicated with excessive class attributes
  • All cells have a pointer cursor, even if there is no tooltip (or other action)
  • Tooltips defined using excess elements, positioning is poor and overflows the viewport
  • Lots of non-breaking spaces used instead of padding
  • Inconsistent use of markdown code spans in notes

🏗️ List of Changes

This pull request aims to improve the generated output and make it easier to maintain.

The following changes have been made:

  • Switch to using tomllib from the standard library instead of tomli
    • Dependency not needed as conformance/pyproject.toml has requires-python = "==3.12.*"
  • Use jinja2 for templates instead of manually joining lists of tags
    • Moved stylesheet into a separate file for ease of maintenance
  • Use better markup for improved accessibility and semantics
    • Only use <th> for heading cells, not all table cells
    • Use <thead> for the header row with type checker names
    • Use separate <tbody> for each group of tests
    • Make use of scope attributes for header cells
    • Make use of <colgroup> and <col> to reduce excess class attributes
    • Reduce the number of elements required for tooltip implementation
  • Fix issues with styling, including:
    • Remove unused CSS rules
    • Calculate column widths based on number of type checkers
    • Make the table header sticky so it remains visible as the page scrolls
    • Add a hover effect to the rows to aid scanning across columns
    • Make use of more advanced selectors to reduce excess class attributes
    • Use the help cursor instead of pointer, and only where there are tooltips
    • Replace the use of non-breaking spaces with padding
    • Add asterisk if a pass with notes using CSS only
    • Various improvements, e.g. use CSS variables for colors, avoid use of pixel units
    • Added a theme selector and support for light/dark (and auto) modes
      • CSS-only based implementation for switching using light-dark(), etc.
      • A small amount of JS for theme persistence
    • Added an emoji favicon to make it easier to spot in the browser: 📘 (Can be changed.)
  • Add markdown rendering of notes in the tooltip
    • Improves readability of many notes
    • Most notes already used code spans, others have been updated
    • Links in notes have been made to be clickable
  • Added summary rows to each test group and a total footer row at the end of the table
    • Use 1 for a pass and 0.5 for a partial result

Passes validation on validator.w3.org (with the exception of a known bug in the validator for nested CSS) and also scores 100 for performance, accessibility, and SEO in Google Chrome DevTools Lighthouse tool.


🔮 Future Ideas


🤖 AI Disclosure

No AI was involved in creating this pull request.


🖼️ Screenshots

First Load

Light Dark
Screenshot From 2026-05-14 08-49-06 Screenshot From 2026-05-14 08-48-27

Sticky Table Header

Light Dark
Screenshot From 2026-05-14 08-49-11 Screenshot From 2026-05-14 08-48-42

Tooltip Rendering

Light Dark
Screenshot From 2026-05-14 08-50-18 Screenshot From 2026-05-14 08-50-36

Theme Selector

Screenshot From 2026-05-14 08-51-54

ngnpope added 29 commits June 18, 2026 23:15
- `<span>` cannot be a parent of `<p>`
- `#bottom` must be unique
Add `th[scope]` attributes and split groups into separate `<tbody>`s.
Partial compliance is given half a mark, a pass a full mark.
To reduce the noise when reviewing, hide the generated output of the
conformance test results.
@ngnpope ngnpope force-pushed the ngnpope/improve-test-results branch from a05617c to 99f1536 Compare June 18, 2026 22:25
@ngnpope

ngnpope commented Jun 18, 2026

Copy link
Copy Markdown
Author

I timed that terribly badly... 😂 Rebased on top of #2308.

You can preview the changes here.

@davidhalter

Copy link
Copy Markdown
Collaborator

No AI was involved in creating this pull request.

Are you really honest here? I would not have guessed that you wrote the issue description in a hundred years. This looks 100% like AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants