FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ifctester: redesign the HTML report by BIMvoice · Pull Request #9354 · IfcOpenShell/IfcOpenShell · GitHub

ifctester: redesign the HTML report - #9354

Draft
BIMvoice wants to merge 3 commits into
IfcOpenShell:v0.9.0from
BIMvoice:feat-ifctester-report-redesign
Draft

ifctester: redesign the HTML report#9354
BIMvoice wants to merge 3 commits into
IfcOpenShell:v0.9.0from
BIMvoice:feat-ifctester-report-redesign

Conversation

Copy link
Copy Markdown
Contributor

A redesign of the IfcTester HTML report. Opening as a draft because this is a design proposal rather than a bug fix, and design is a matter of taste that belongs to whoever maintains it. Happy to change direction, split it up, or close it if it is not wanted.

Why

The report is the artefact people actually send to clients and consultants, so it is worth it looking good. The current template is Arial on white with flat colour blocks, and on a large audit everything carries the same visual weight, so finding the failures means scrolling.

What changed

Only templates/report.html. reporter.py is untouched, so the JSON, ODS, OdsSummary and BCF reporters are unaffected and the data contract is unchanged. Every Mustache variable used already exists in Html.report(); nothing new is computed and nothing was added to the template's logic, since pystache is logic-less.

  • Summary header presenting the three totals distinctly. Specifications, requirements and checks are independent, and because a specification is pass or fail as a unit, "99% of checks pass" and "50% of specifications pass" can both be true of the same report. That trips people up, so the three are now visually separated rather than sitting in one row of identical pills.
  • Failures are findable. A jump-to-first-failure link and a failures-only filter. Both are plain inline JS with no libraries, both inside the existing .js-only pattern, and the report stays completely readable with JavaScript disabled.
  • Entity lists were monospace blobs. They carry class, predefined type, name, GlobalId and tag, so they are now a proper table. The over-100 grouping and extra_of_type summary rows are preserved.
  • Dark mode, with a light, dark and auto toggle. Auto is the default and follows prefers-color-scheme, so behaviour is unchanged unless someone chooses otherwise. The choice persists in localStorage, every access wrapped in try/catch because these open from file:// where storage can throw. The theme is set in an inline script before first paint to avoid a flash of the wrong theme.
  • Print stylesheet, since these get printed and attached to issue reports. Sensible page breaks, and pass and fail never rely on colour alone so they survive greyscale.
  • Removed the Google Fonts <link> in favour of a system font stack. Reports get emailed and archived, so a webfont either fails offline or sends a request to Google when a client opens their own audit. The file is now fully self-contained with no external resources.

#97cc64 and #fb5a3e are kept as the identity colours. They now drive accents and borders rather than carrying text, and pills use darker solid shades so white text meets WCAG AA on them (5.53:1 for pass, 7.03:1 for fail).

A real bug fixed along the way

Line 170 of the current template has {{#total_ckecks}}, a typo for total_checks, so the block has never rendered. Correcting the spelling would not have helped either: total_checks exists on a specification, not on a requirement, so it would have produced an empty table. It is replaced with {{^total_applicable}}, which does exist per requirement, driving a real message when a requirement was never checked because nothing applicable was found.

Verification, and its limits

Rendered against a generated IDS and IFC covering a passing spec, a failing spec, a skipped spec, a prohibited spec, a spec with no requirements, and one with 150 entities so the omitted-entity and extra_of_type grouping paths actually render. Confirmed no unresolved tags, the HTML parses, and the inline JS parses. Contrast ratios were computed rather than eyeballed.

Stated plainly: this has not been checked in a browser against a real project audit. The verification above is structural. Before this is worth merging, someone should open it on a real report, in both themes, and print it. I am happy to do that and post screenshots, or to hand over a rendered sample.

@Moult this one is yours to judge rather than mine. If the direction is wrong, say so and I will drop it. If the direction is right but the details are off, tell me which parts and I will rework them. And if you would rather the report stayed as it is, that is a perfectly good answer too.

Produced with AI assistance.

Modernises the pystache-rendered IDS audit report while keeping every
existing Mustache variable and behaviour working, and without touching
reporter.py's data shape.

- Replace the Google Fonts link with a system font stack, since these
  reports are emailed and archived offline.
- Give the summary a proper header: three distinct stat cards for
  specifications, requirements and checks, each with its own percent
  and pass/total, plus a short note that a spec is pass/fail as a unit
  (so "99% of checks pass" can coexist with far fewer specs passing).
- Add a "jump to first failure" link and a "show failures only" toggle,
  implemented as plain inline JS with no dependency; the report stays
  fully readable with JavaScript disabled.
- Rework entity lists from monospace blobs into scannable tables.
- Add prefers-color-scheme dark mode and a print stylesheet with
  sensible page breaks and colour-independent pass/fail cues.
- Fix the `{{#total_ckecks}}` typo: that block referenced a field that
  never existed on a requirement (only specifications have
  total_checks) and, even fixed, only ever rendered an empty
  <table><thead></thead></table> with no content. Replaced it with
  `{{^total_applicable}}`, a field that does exist on every
  ResultsRequirement, driving a real "no applicable elements, so this
  requirement was not checked" note instead of dead markup.
Pills and badges now use a solid brand-derived colour with white text
instead of pale washes, and tinted backgrounds are more saturated
while keeping body text at AA contrast. The pass (#97cc64) and fail
(#fb5a3e) hex values are unchanged, only used differently.

Adds a light/dark/auto toggle in the header, persisted to
localStorage (wrapped in try/catch for restricted file:// contexts),
with the initial theme applied by an inline head script before the
body renders to avoid a flash of the wrong theme.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL