Skip to content

Commit

Permalink
Auto merge of #675 - GuillaumeGomez:improve-ui, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Improve UI a bit

I had a hard time trying to figure out what I was reading. Thanks to `@lqd,` I was able to understand so I think a little UI improvement wouldn't necessarily be a bad idea. Here is what it looks like with this change:

![Screenshot from 2022-12-09 17-43-04](https://user-images.githubusercontent.com/3050060/206750552-c3e38cc7-7b21-4677-aa32-fad41fb2e86c.png)

It adds new "header" which provides more context to what is displayed.
  • Loading branch information
bors committed Jan 19, 2023
2 parents df46038 + f63b497 commit 9365bc7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/report.css
Expand Up @@ -175,7 +175,7 @@ div.category div.crate:last-child {
padding-bottom: 0;
}

div.category div.crate > a {
div.category div.crate > a, div.category div.crate > span.title {
flex: 1;
text-decoration: none;
}
Expand Down
10 changes: 9 additions & 1 deletion templates/macros.html
Expand Up @@ -20,6 +20,14 @@
UTC
{% endmacro %}

{% macro crate_header() %}
<div class="crate">
<span class="title">Crate</span>
<span class="run">Previous run</span>
<span class="run">Current run</span>
</div>
{% endmacro %}

{% macro crate_div(crate) %}
<div class="crate">
<a href="{{ crate.url|safe }}" target="_blank" rel="noopener">
Expand All @@ -37,4 +45,4 @@
</span>
{% endfor %}
</div>
{% endmacro %}
{% endmacro %}
3 changes: 3 additions & 0 deletions templates/report/results.html
Expand Up @@ -38,6 +38,7 @@
{{ name }} ({{ crates.Plain|length }})
</div>
<div class="crates hidden" id="crt-{{ name }}">
{{ macros::crate_header() }}
{% for crate in crates.Plain %}
{{ macros::crate_div(crate=crate) }}
{% endfor %}
Expand All @@ -56,6 +57,7 @@
</div>
</div>
<div class="crates" id="{{ name }}-tr{{ loop.index }}">
{{ macros::crate_header() }}
{% for crate in subcrates %}
{{ macros::crate_div(crate=crate) }}
{% endfor %}
Expand All @@ -77,6 +79,7 @@
</div>
</div>
<div class="crates" id="{{ name }}-rt{{ loop.index }}">
{{ macros::crate_header() }}
{% for crate in subcrates %}
{{ macros::crate_div(crate=crate) }}
{% endfor %}
Expand Down

0 comments on commit 9365bc7

Please sign in to comment.