Lot U2 : le lecteur — cibles de 44 px sur téléphone dans tout le vote déplié et « Tout déplier » ; les trois lectures passent à la ligne au lieu de cacher « Si tout passe » ; « Proposer cet ordre » éteint dit pourquoi, à côté ; l'inertie dite une fois (ses crans dans « Inertie »), la ligne d'une Proposition seed s'efface sous son vote déplié, les versions déjà listées ne sont pas redites dans « Autres versions » ; l'en-tête compte ce que montre la liste (les Propositions seed à part) ; un changement d'inertie d'un ordre ou du titre a sa pastille sur la ligne du module (fr, en, es)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 11:32:35 +01:00
co-authored by Claude Opus 5.5
parent b0e849b9cb
commit 1fadc1ecb6
15 changed files with 161 additions and 48 deletions
+22 -5
View File
@@ -9,7 +9,8 @@
// many « oui » pass it, how many « non » block it (ADR 0013), its weight in notches,
// its other versions — each opens its own vote where it reads —, and the quorum its
// author may set before the first vote. The rest of a version (typos, translations,
// objections, history) lives in the panel, « Détails ».
// objections, history) lives in the panel, « Détails ». Lot U2: each thing said once —
// the inertia in its own place, the other versions only those not already in sight.
import { onMount } from 'svelte';
import { api } from '$lib/api';
import type { DocState } from '$lib/doc.svelte';
@@ -31,6 +32,7 @@
doc,
proposal: p,
unit,
besides = [],
onopen,
onsettings,
ondetails,
@@ -40,6 +42,8 @@
doc: DocState;
proposal: Proposal;
unit: Unit;
/** The versions already in sight beside this vote (the versions of its article, listed): not named again. */
besides?: string[];
/** Unfolds the vote of another version, where it reads (another text, a change of inertia). */
onopen: (proposalId: string) => void;
onsettings: (proposalId: string) => void;
@@ -80,12 +84,17 @@
const nameOf = (id: string) => doc.articleTitle(id, doc.original ? source : i18n.lang, source);
/** « 9 oui pour passer · 4 non pour bloquer » — the quorum in its tooltip. */
const need = $derived(needOf(p));
/** The other live versions of the module (its changes of inertia live with its inertia). */
/**
* The other live versions of the module (its changes of inertia live with its inertia),
* less those already in sight beside the vote.
*/
const others = $derived(
[unit.inForce, ...unit.proposals.filter((x) => x.status === 'open' && x.kind !== 'inertia')].filter(
(x): x is Proposal => !!x && x.id !== p.id,
(x): x is Proposal => !!x && x.id !== p.id && !besides.includes(x.id),
),
);
/** The inertia is said by « Inertie », below; a change of inertia has none: its level is said here. */
const ownInertia = $derived(p.kind === 'inertia');
/** What tells another version apart, in a few words. */
function otherLabel(v: Proposal): string {
@@ -165,7 +174,7 @@
{#if need}<p class="need" title={need.title}>{need.long}</p>{/if}
<p class="state">{p.evaluation.reached ? t('tally.reached') : i18n.plural('tally.missing', p.evaluation.missing)}</p>
{/if}
<p class="faint small"><Crans level={p.votedAtInertia} /></p>
{#if ownInertia}<p class="faint small"><Crans level={p.votedAtInertia} /></p>{/if}
</div>
</div>
{#if p.blocked}
@@ -277,7 +286,7 @@
</ul>
</section>
{/if}
{#if p.kind !== 'inertia'}<InertiaPicker {doc} {unit} {onopen} />{/if}
{#if !ownInertia}<InertiaPicker {doc} {unit} {onopen} />{/if}
{#if !unit.kind && unit.canSetQuorum}<QuorumSetting {doc} {unit} />{/if}
{#if detail && view}
<Formula
@@ -504,6 +513,14 @@
text-decoration: underline;
text-underline-offset: 3px;
}
/* On a phone: every gesture of the vote big enough for a finger (lot U2). */
@media (max-width: 899px) {
.choice .btn,
.disclose,
.linkish {
min-height: 2.75rem;
}
}
@keyframes unfold {
from {
opacity: 0;