Skip to content

Commit 39a2efc

Browse files
committed
Improve page rendering
1 parent e6ad4d0 commit 39a2efc

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

pytest_mpl/summary/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
99
<title>{{ results.title }}</title>
1010
</head>
11-
<body class="{{ results.classes | join(' ') }}" id="results">
11+
<body{% if results.classes | length %} class="{{ results.classes | join(' ') }}"{% endif %} id="results">
1212
{% include 'navbar.html' %}
1313
<div class="album bg-light">
1414
<div class="container-fluid">
1515
<div id="noResultsAlert"></div>
16-
<div class="row list">
16+
<div class="row list" id="resultslist" style="display:none">
1717
{% filter indent(width=12) -%}
1818
{% include 'result.html' %}
1919
{%- endfilter %}

pytest_mpl/summary/templates/extra.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ if (window.location.search.length > 0) {
3232
} else { // If no parameters, apply default but don't update the URL
3333
resultsList.sort('status-sort', {order: "desc"});
3434
}
35+
// Show page after initial filtering to prevent flashing
36+
document.getElementById('resultslist').style.display = null;
3537

3638
// Show a message if no tests match current filters
3739
var alertPlaceholder = document.getElementById('noResultsAlert');

pytest_mpl/summary/templates/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ div.result div.status-badge button.btn-warning img {
4242
filter: brightness(0);
4343
}
4444
div.mpl-images {
45-
height: 1000px;
45+
height: auto;
4646
}
4747
div.hover-image {
4848
position: relative;

0 commit comments

Comments
 (0)