mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Remove mobile filter chip bar from repertoire page
The sticky chip bar added noise: users already see their active filters highlighted in the accordion columns (with rep-entry--selected styling and the active-count badge on each toggle). Removing chips shifts focus back to the accordions, consistent with the expectation that users return to the dropdowns to adjust filters.
This commit is contained in:
@@ -107,49 +107,9 @@ foreach ($filterColumns as $col) {
|
||||
));
|
||||
}
|
||||
|
||||
// ── Active filter chips ─────────────────────────────────────────────────────
|
||||
// Build a flat list of {dim, label, value, url} for every active filter entry.
|
||||
$activeChips = [];
|
||||
$dimLabels = [
|
||||
'years' => 'Année',
|
||||
'ap' => 'AP',
|
||||
'or' => 'Orientation',
|
||||
'fi' => 'Finalité',
|
||||
'kw' => 'Mot-clé',
|
||||
];
|
||||
foreach (['years', 'ap', 'or', 'fi', 'kw'] as $dim) {
|
||||
foreach ($activeSets[$dim] as $val) {
|
||||
$activeChips[] = [
|
||||
'dim' => $dim,
|
||||
'label' => $dimLabels[$dim],
|
||||
'value' => $val,
|
||||
'url' => repToggleUrl($activeSets, $dim, $val),
|
||||
];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div id="repertoire-index" class="repertoire-index">
|
||||
|
||||
<?php if ($anyActive): ?>
|
||||
<!-- Active filter chips bar -->
|
||||
<div class="rep-chip-bar" role="status" aria-label="Filtres actifs">
|
||||
<span class="rep-chip-bar__label">Filtres :</span>
|
||||
<?php foreach ($activeChips as $chip): ?>
|
||||
<button type="button" class="rep-chip"
|
||||
hx-get="<?= htmlspecialchars($chip['url']) ?>"
|
||||
hx-target="#repertoire-index"
|
||||
hx-swap="outerHTML"
|
||||
hx-push-url="true"
|
||||
hx-indicator="#rep-indicator"
|
||||
aria-label="Retirer le filtre <?= htmlspecialchars($chip['label']) ?> : <?= htmlspecialchars($chip['value']) ?>">
|
||||
<span class="rep-chip__dim"><?= htmlspecialchars($chip['label']) ?></span>
|
||||
<span class="rep-chip__value"><?= htmlspecialchars($chip['value']) ?></span>
|
||||
<span class="rep-chip__remove" aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// Render filter columns in the correct left-to-right order.
|
||||
// Students column (non-filter) is inserted between keywords and AP/or/fi/years.
|
||||
|
||||
Reference in New Issue
Block a user