Skip to content

Commit

Permalink
Streamline the Kompari section
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Jan 10, 2025
1 parent d8b0c8d commit 1608e49
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions content/blog/2025-01-09-tmil-12/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,34 @@ It handles text layout, mostly at the level of line breaking and resolving glyph
## Kompari

[Kompari] is a tool for visual inspection of snapshot tests.
This project is a new addition to Linebender.
This project is a new addition to Linebender, generously contributed by [Ada Böhm][spirali] and is currently in pre-alpha.

<img src="kompari.png"/>
<figure>

Kompari can be used as a standalone tool, but it is also prepared to be used from xtasks. Using it from xtask is also the main usage planned for other Linebender repositories.
When running snapshot tests, you will be able to generate a report that showing failed tests:
<img style="height: auto" src="kompari.png" alt="A screenshot of a web page, titled 'Kompari Report'. The report has a section called 'test1.png', which shows that two images of the text 'Linebender' have 2482 different pixels. An image displaying which pixels are different is next to these." height="1040" width="2364">

<figcaption>

A report for snapshot test, generated by Kompari.

</figcaption>
</figure>

We plan for Kompari to standardise and improve the developer experience of snapshot tests in Linebender (and beyond).
It can generate reports which summarises failed snapshot tests, and will also contain functionality for interactive blessing of new snapshots.
This reporting can be integrated into a repository as an xtask:

```commandline
cargo xtask kompari report
cargo xtask report
```

Over the last month we have been laying the groundwork for the project:
Added initial functionality and established CI in the repository.
Kompari also includes a standalone CLI, for projects which don't use the xtask pattern or are trialling Kompari.

Ongoing work:

* [kompari#12] - Refactoring the project to make it more modular
* [kompari#13] - Interactive test blessing
In December, we added initial functionality and established CI in the repository.
Ongoing work includes:

* [kompari#12]: Refactoring the project to make it more modular
* [kompari#13]: Interactive test blessing

## Masonry

Expand Down Expand Up @@ -173,12 +182,13 @@ See [#office hours in Zulip](https://xi.zulipchat.com/#narrow/channel/359642-off
[xilem#797]: https://github.com/linebender/xilem/pull/797
[xilem#798]: https://github.com/linebender/xilem/pull/798
[xilem#800]: https://github.com/linebender/xilem/pull/800
[kompari#12]: https://github.com/linebender/kompari/pull/12
[kompari#13]: https://github.com/linebender/kompari/pull/13

[Color]: https://docs.rs/color/
[Color 0.2.0]: https://github.com/linebender/color/releases/tag/v0.2.0
[Color 0.2.1]: https://github.com/linebender/color/releases/tag/v0.2.1
[Peniko 0.3.0]: https://github.com/linebender/peniko/releases/tag/v0.3.0

[Kompari]: https://github.com/linebender/kompari
[kompari#12]: https://github.com/linebender/kompari/pull/12
[kompari#13]: https://github.com/linebender/kompari/pull/13
[spirali]: https://github.com/spirali

0 comments on commit 1608e49

Please sign in to comment.