Skip to content

Commit 30c2f7f

Browse files
author
Oussama
committed
fix: clarify scene 4 department filtering
1 parent 92fee31 commit 30c2f7f

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

website/src/lib/scenes/Scene4Explorer.svelte

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
let countryName = $derived(
3030
countrySummary.find((d) => d.iso3 === $filters.selectedCountry)?.country_name ?? $filters.selectedCountry,
3131
);
32+
let selectedDepartmentList = $derived([...$filters.selectedDepartments].sort());
3233
</script>
3334
3435
<section class="scene-explorer" aria-labelledby="scene-4-title">
@@ -41,7 +42,7 @@
4142
<div class="filter-bar" aria-label="Explorer filters">
4243
<DecadeSlider {timeline} ariaLabel="Filter medium explorer by decade range" />
4344
<div class="filter-group">
44-
<p>Departments</p>
45+
<p>Curatorial departments</p>
4546
<div class="chip-row">
4647
{#each departments as department}
4748
<button
@@ -73,6 +74,14 @@
7374
<button type="button" class="reset" onclick={resetFilters}>Reset filters</button>
7475
</div>
7576
</div>
77+
{#if selectedDepartmentList.length}
78+
<p class="filter-note">
79+
<strong>Department filter:</strong>
80+
{selectedDepartmentList.join(', ')}. The cards below still show the actual medium classifications found inside
81+
that department, so a Painting & Sculpture selection can contain a small number of photographs, drawings, or
82+
prints.
83+
</p>
84+
{/if}
7685
<Legend mode="categorical" items={genderLegend} caption="Unknown gender is retained as its own bucket." />
7786
<MediumExplorer {data} />
7887
</div>
@@ -132,6 +141,22 @@
132141
text-transform: uppercase;
133142
}
134143
144+
.filter-note {
145+
margin: calc(-1 * var(--space-1)) 0 var(--space-2);
146+
padding: var(--space-1) var(--space-2);
147+
color: var(--fg-on-light-mute);
148+
background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-paper));
149+
border-left: 3px solid var(--accent-primary);
150+
font-family: var(--font-body);
151+
font-size: var(--type-small-size);
152+
line-height: var(--type-small-line);
153+
}
154+
155+
.filter-note strong {
156+
color: var(--fg-on-light-strong);
157+
font-family: var(--font-ui);
158+
}
159+
135160
button {
136161
border: 1px solid var(--rule-on-light);
137162
padding: 0.375rem 0.5rem;

0 commit comments

Comments
 (0)