Skip to content

Commit 204d50d

Browse files
authored
fix(ui): Add border to final ecosystem panel (#3982)
Adds a footer bar so the last ecosystem’s tree ends on a visible horizontal line instead of trailing off. <img width="1546" height="958" alt="terminator" src="https://github.com/user-attachments/assets/41149d30-9da4-46e0-a53d-c3d296011fe0" /> --------- Co-authored-by: Shehab <[email protected]>
1 parent 5f3eff4 commit 204d50d

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

gcp/website/frontend3/src/styles.scss

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ dl.vulnerability-details,
999999
}
10001000
}
10011001

1002-
.ecosystem-content-panel {
1002+
.ecosystem-content-panel {
10031003
position: relative;
10041004
padding: 8px 0 16px 16px;
10051005

@@ -1014,6 +1014,28 @@ dl.vulnerability-details,
10141014
background: #555;
10151015
}
10161016
}
1017+
1018+
$last-ecosystem-border-offset: 12px;
1019+
$last-ecosystem-border-gap: 8px;
1020+
$last-ecosystem-border-thickness: 1px;
1021+
1022+
.ecosystem-content-panel--last {
1023+
padding-bottom: $last-ecosystem-border-offset + $last-ecosystem-border-gap;
1024+
1025+
&::before {
1026+
bottom: $last-ecosystem-border-offset + $last-ecosystem-border-thickness;
1027+
}
1028+
1029+
&::after {
1030+
content: '';
1031+
position: absolute;
1032+
left: 0;
1033+
right: 0;
1034+
bottom: $last-ecosystem-border-offset;
1035+
height: $last-ecosystem-border-thickness;
1036+
background: $osv-grey-600;
1037+
}
1038+
}
10171039

10181040
.package-accordion {
10191041
position: relative;
@@ -1031,6 +1053,14 @@ dl.vulnerability-details,
10311053
}
10321054
}
10331055

1056+
.package-accordion--last {
1057+
margin-bottom: 0;
1058+
1059+
.package-details-card {
1060+
margin-bottom: $last-ecosystem-border-gap;
1061+
}
1062+
}
1063+
10341064
.package-accordion h3.package-name-title {
10351065
font-family: $osv-heading-font-family;
10361066
font-size: 1.1rem;

gcp/website/frontend3/src/templates/vulnerability.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ <h2 class="title">Affected packages</h2>
179179
{% set ecosystems = vulnerability.affected | group_by_ecosystem %}
180180
<spicy-sections class="vulnerability-packages force-collapse">
181181
{% for ecosystem_name, packages in ecosystems.items() -%}
182+
{% set is_last_ecosystem = loop.last %}
182183
<h2 class="package-header">
183184
<span class="vuln-ecosystem spicy-sections-workaround">{{ ecosystem_name }}</span>
184185
</h2>
185-
<div class="ecosystem-content-panel">
186+
<div class="ecosystem-content-panel{% if is_last_ecosystem %} ecosystem-content-panel--last{% endif %}">
186187
{% for affected in packages -%}
187-
<spicy-sections class="package-accordion">
188+
<spicy-sections class="package-accordion{% if is_last_ecosystem and loop.last %} package-accordion--last{% endif %}">
188189
<h3 class="package-name-title">
189190
{% if 'package' in affected %}{{ affected.package.name }}{% else %}{{ vulnerability.repo | strip_scheme }}{% endif %}
190191
</h3>
@@ -603,4 +604,4 @@ <h3 class="mdc-layout-grid__cell--span-3">
603604
setupExpandibleList('.expandible-list', 'li');
604605
});
605606
</script>
606-
{% endblock -%}
607+
{% endblock -%}

0 commit comments

Comments
 (0)