From 4cf4e47ee90e19cd8b8c251022c74f52bea7206f Mon Sep 17 00:00:00 2001 From: Yvv Date: Tue, 3 Nov 2026 07:59:24 +0100 Subject: [PATCH] =?UTF-8?q?Lot=20U=20:=20le=20lecteur=20refait=20=E2=80=94?= =?UTF-8?q?=20l'ordre=20en=20une=20ligne=20au=20bout=20de=20sa=20section,?= =?UTF-8?q?=20poign=C3=A9es=20sur=20place=20(Reorder),=20le=20titre=20et?= =?UTF-8?q?=20l'ordre=20vot=C3=A9s=20=C3=A0=20leur=20place=20;=20Propositi?= =?UTF-8?q?ons=20seed=20en=20t=C3=AAte=20quand=20rien=20n'est=20en=20vigue?= =?UTF-8?q?ur=20;=20Propositions=20en=20cours=20repli=C3=A9es=20par=20sect?= =?UTF-8?q?ion=20;=20panneau=20sans=20onglets=20;=20oui=20pour=20passer=20?= =?UTF-8?q?=C2=B7=20non=20pour=20bloquer=20;=20quorum=20de=20l'auteur=20;?= =?UTF-8?q?=20votes=20simul=C3=A9s=20dits=20simul=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- web/src/lib/components/BallotPanel.svelte | 14 +- web/src/lib/components/DeepList.svelte | 394 ++++++++++++------ web/src/lib/components/DocPanel.svelte | 162 ++----- web/src/lib/components/FormulaSettings.svelte | 9 +- web/src/lib/components/OrderLine.svelte | 148 +++++++ web/src/lib/components/OrderModule.svelte | 89 ---- web/src/lib/components/QuorumSetting.svelte | 113 +++++ .../{OrderEditor.svelte => Reorder.svelte} | 150 ++++++- web/src/lib/components/TitleBar.svelte | 61 ++- web/src/lib/components/UnitBlock.svelte | 72 ++-- web/src/lib/components/VoteFold.svelte | 115 ++++- web/src/lib/components/WaterLevel.svelte | 8 +- web/src/lib/doc.svelte.ts | 68 ++- web/src/lib/versions.ts | 33 ++ web/src/lib/vote.ts | 13 +- .../routes/g/[group]/docs/[doc]/+page.svelte | 259 ++++++++---- web/tests/unit/versions.test.ts | 31 +- 17 files changed, 1198 insertions(+), 541 deletions(-) create mode 100644 web/src/lib/components/OrderLine.svelte delete mode 100644 web/src/lib/components/OrderModule.svelte create mode 100644 web/src/lib/components/QuorumSetting.svelte rename web/src/lib/components/{OrderEditor.svelte => Reorder.svelte} (57%) diff --git a/web/src/lib/components/BallotPanel.svelte b/web/src/lib/components/BallotPanel.svelte index e15affd..092c8c2 100644 --- a/web/src/lib/components/BallotPanel.svelte +++ b/web/src/lib/components/BallotPanel.svelte @@ -90,9 +90,10 @@ } busy = true; try { - const n = await voteDirect(doc, toSend); + const r = await voteDirect(doc, toSend); basket.clear(); - toasts.show(i18n.plural('basket.sent', n)); + // A simulated vote says so, never « enregistré » (ADR 0012). + toasts.show(i18n.plural(r.simulated ? 'basket.sent.simulated' : 'basket.sent', r.count)); } catch (e) { error = errorText(e); } finally { @@ -115,8 +116,8 @@ {/if} {/snippet} -
-

{t('basket.title')}

+ +

{t('basket.intro')}

{#if access && !access.open}

{t(access.reason === 'chain_off' ? 'vote.chain.off' : 'vote.members')}

@@ -216,11 +217,6 @@ display: grid; gap: 0.9rem; } - h3 { - font-family: var(--font-text); - font-weight: 500; - font-size: 1.4rem; - } .closed { font-weight: 700; color: var(--ink-soft); diff --git a/web/src/lib/components/DeepList.svelte b/web/src/lib/components/DeepList.svelte index 107c39b..e54ce40 100644 --- a/web/src/lib/components/DeepList.svelte +++ b/web/src/lib/components/DeepList.svelte @@ -1,52 +1,67 @@ -{#snippet module(p: Proposal)} - {#if p.kind === 'title'}{t('module.title.name')}{/if} - {#each orderNote(p) as note (note)}{note}{/each} +{#snippet need(p: Proposal)} + {@const n = needOf(p)} + {#if n}{n.short}{/if} {/snippet} {#snippet marks(p: Proposal)} @@ -85,97 +100,219 @@ {#if p.mine}{t('deep.mine')}{/if} {/snippet} +{#if sections.length && !all} +
+ +
+{/if} +
    - {#each articles as a, i (a.unit.id)} - {@const unit = a.unit} - {@const best = a.versions[0]} - {#if sectionLabel(unit.section) && unit.section !== articles[i - 1]?.unit.section} -
  • - {sectionLabel(unit.section)} - {#if onsection && unit.section} - {@const key = unit.section} + {#each sections as s, i (keyOf(s))} + {@const open = isOpen(s)} + {@const label = sectionLabel(s.key) ?? (s.key ? s.key : t('deep.section.none'))} +
  • +
    + + {#if onsection && s.key && s.articles.length} + {@const key = s.key} {/if} -
  • - {/if} - {#if best && a.versions.length === 1} -
  • - - {#if vote === best.id}
    {@render fold(unit, best)}
    {/if} -
  • - {:else if best} - {@const open = isOpen(a)} - {@const title = headline(a)} - {@const told = toldApart(a)} -
  • - - -
  • - {/if} + + {#if open} +
    + {#if s.order?.id !== reordering} +
      + {#each s.articles as a (a.unit.id)} + {@const unit = a.unit} + {@const best = a.versions[0]} + {#if best && a.versions.length === 1} +
    • + + {#if vote === best.id}
      {@render fold(unit, best)}
      {/if} +
    • + {:else if best} + {@const vopen = isVersionsOpen(a)} + {@const title = headline(a)} + {@const told = toldApart(a)} +
    • + + +
    • + {/if} + {/each} +
    + {/if} + {#if s.order}{@render order(s.order)}{/if} +
    + {/if} + {:else}
  • {t('deep.none')}
  • {/each}
diff --git a/web/src/lib/components/DocPanel.svelte b/web/src/lib/components/DocPanel.svelte index ab013f1..8ea4289 100644 --- a/web/src/lib/components/DocPanel.svelte +++ b/web/src/lib/components/DocPanel.svelte @@ -1,30 +1,28 @@ -