Lot S, phase 2 : le quorum dans l'interface (fr, en, es), e2e 35 / 35

- types.ts : evaluation.quorum / yesNeeded / noNeeded, levels[].quorum, l'unité
  quorum / quorumDefault / canSetQuorum, doc.quorums (optionnels) ; publication
  « suspended » (ADR 0011) ;
- Réglages de la formule : la colonne « Quorum » des cinq crans et sa note, la
  participation de référence « deux fois 50, le quorum de référence » ; plus de
  ligne C ; sur téléphone, les six colonnes tiennent dans la feuille ;
- La formule du seuil : T' = max(T, Q), R = B^W + ratio(T')·T', la ligne Q (le
  quorum de la version) au lieu de C ;
- textes : deep.note, formula.reading, settings.* parlent du quorum, plus de C
  (test vu rouge puis vert, tests/unit/inertia.test.ts) ;
- e2e : Seuil 9 (cran 2) et 39 (cran 3) dans Monnaie libre, les quorums 12 · 12 ·
  50 · 50 · 50, voix pour à 100 votants 60 · 67 · 75 · 83 · 90, à 0 votant
  8 · 9 · 39 · 43 · 46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 05:15:18 +01:00
co-authored by Claude Opus 5.5
parent 01b7841472
commit 17addf8d9f
11 changed files with 112 additions and 47 deletions
+19 -5
View File
@@ -1,8 +1,9 @@
<script lang="ts">
// The settings of the formula, read only: W and its source, C, B, the usual
// The settings of the formula, read only: W and its source, B, the usual
// turnout of the group (median or reference) and the five levels on its
// scale. From the head of the document, the *for* votes asked are those of
// the usual turnout; from a version, those of its own turnout.
// scale, each with its quorum (ADR 0013). From the head of the document, the
// *for* votes asked are those of the usual turnout; from a version, those of
// its own turnout, on its article's quorum.
import { api } from '$lib/api';
import type { DocState } from '$lib/doc.svelte';
import { i18n, t } from '$lib/i18n/index.svelte';
@@ -50,7 +51,6 @@
<ul class="values">
<li>{t('formula.W', { n: i18n.number(view.doc.electorate), source: t(view.doc.electorateSource === 'wot' ? 'formula.W.wot' : 'formula.W.group') })}</li>
<li>{t('formula.C', { n: i18n.number(view.doc.voteFloor) })}</li>
<li>{t('formula.B', { n: i18n.number(view.doc.formula.base) })}</li>
</ul>
@@ -60,7 +60,7 @@
{#if p.source === 'median'}
{i18n.plural('settings.usual.median', shown?.voters ?? p.voters, { electorate: i18n.number(view.doc.electorate), pct: pct(shown?.ratio ?? p.ratio), sample: p.sample })}
{:else}
{i18n.plural('settings.usual.reference', shown?.voters ?? p.voters, { electorate: i18n.number(view.doc.electorate), pct: pct(shown?.ratio ?? p.ratio), min: p.minSample, sample: p.sample })}
{i18n.plural('settings.usual.reference', shown?.voters ?? p.voters, { electorate: i18n.number(view.doc.electorate), pct: pct(shown?.ratio ?? p.ratio), q: i18n.number(view.doc.voteFloor), min: p.minSample, sample: p.sample })}
{/if}
</p>
{#if p.bounded}<p class="faint small">{i18n.plural('settings.usual.bounded', p.voters, { lo: pct(p.bounds[0]), hi: pct(p.bounds[1]), pct: pct(p.ratio) })}</p>{/if}
@@ -76,6 +76,7 @@
<th scope="col">M</th>
<th scope="col">G</th>
<th scope="col">{t('settings.col.share')}</th>
<th scope="col">{t('settings.col.quorum')}</th>
<th scope="col">{t('settings.col.required')}</th>
</tr>
</thead>
@@ -92,6 +93,7 @@
<td>{whole(l.majorityPct)}</td>
<td>{gradient(l.gradient)}</td>
<td>{whole(l.sharePct)}</td>
<td>{l.quorum === undefined ? '—' : i18n.number(l.quorum)}</td>
<td class="required">{l.required === null ? '—' : i18n.number(l.required)}</td>
</tr>
{/each}
@@ -99,6 +101,7 @@
</table>
</div>
<p class="faint small">{i18n.plural('settings.share.note', p.voters)}</p>
<p class="faint small">{t('settings.quorum.note')}</p>
<p class="faint small">{i18n.plural(version ? 'settings.required.version' : 'settings.required.usual', cast)}</p>
<p class="faint small">{t('settings.reading')}</p>
</section>
@@ -194,4 +197,15 @@
.tag {
font-size: 0.68rem;
}
/* On a phone, six columns hold in the sheet: the headers and the level's name wrap. */
@media (max-width: 480px) {
th,
td {
padding: 0.4rem 0.3rem;
}
thead th,
th[scope='row'] {
white-space: normal;
}
}
</style>