feat(t-paliad-133): Phase E — retire legacy mode tabs

m's spec lock §10 Q1 (2026-05-05): "Retire legacy tabs - we are only
resorting." This commit drops the .fristen-mode-tabs nav (Verfahrensablauf
+ Was kommt nach…) and the ?legacy=1 escape hatch. Pathway A becomes
Verfahrensablauf-only; the trigger-event panel (mode-event-panel) stays
in the DOM but is hidden by default and surfaces only via concept-card
pill drill-in (drillToTrigger flips the panels directly).

Frontend deltas:
- frontend/src/fristenrechner.tsx: drop .fristen-mode-tabs section;
  rename mode-event-panel role/label to standalone tabpanel.
- frontend/src/client/fristenrechner.ts:
  - drop isLegacyMode() + ?legacy=1 branch in showPathway().
  - drillToTrigger() now flips procedure ↔ event panels directly
    (no more #mode-event-tab click → handler chain).
  - initModeTabs() bails on tabs.length===0 (already does); no
    further changes needed.
- frontend/src/styles/global.css: drop .fristen-pathway-shell--legacy.

Backend untouched.

Build: clean. Frontend bundle 1473 keys unchanged. go build + vet +
tests pass.

The deadlines.mode.procedure / deadlines.mode.event i18n keys remain
in i18n.ts as orphans for now; cleaning them up is purely cosmetic
and lives outside the v3 scope.
This commit is contained in:
m
2026-05-05 11:07:41 +02:00
parent c399caff75
commit 568bc99a36
3 changed files with 14 additions and 36 deletions

View File

@@ -1455,9 +1455,14 @@ function drillToProceeding(procCode: string, focusCode: string | null) {
}
function drillToTrigger(triggerId: number) {
const eventTab = document.getElementById("mode-event-tab");
if (eventTab) eventTab.click();
// Defer a tick so the tab activation has run before we touch event-mode state.
// v3 (Phase E): legacy tabs are gone. Show the event panel directly.
// Triggered from concept-card pill clicks; routes via Pathway A so the
// Verfahrensablauf user surface stays consistent.
const procedurePanel = document.getElementById("mode-procedure-panel");
const eventPanel = document.getElementById("mode-event-panel");
if (procedurePanel) procedurePanel.hidden = true;
if (eventPanel) eventPanel.hidden = false;
// Defer a tick so the panel swap has rendered before we touch state.
window.setTimeout(() => {
selectTriggerEvent(triggerId);
document.getElementById("event-step-2")?.scrollIntoView({ behavior: "smooth", block: "start" });
@@ -1578,7 +1583,6 @@ const PATHWAY_STORAGE_KEY = "paliad.fristen.pathway";
function readPathwayFromURL(): Pathway {
const sp = new URLSearchParams(window.location.search);
if (sp.get("legacy") === "1") return "fork"; // legacy mode: ignore path
const p = sp.get("path");
if (p === "a" || p === "b") return p;
return "fork";
@@ -1594,10 +1598,6 @@ function readBModeFromURL(): BMode {
return "tree";
}
function isLegacyMode(): boolean {
return new URLSearchParams(window.location.search).get("legacy") === "1";
}
function setPathwayURL(path: Pathway, mode?: BMode, replace = false) {
const url = new URL(window.location.href);
if (path === "fork") {
@@ -1625,16 +1625,6 @@ function showPathway(path: Pathway, mode?: BMode) {
const b = document.getElementById("fristen-pathway-b");
if (!fork || !a || !b) return;
if (isLegacyMode()) {
// Legacy view: hide the fork + Pathway-A heading wrapper, show the
// wizard flat as it was pre-v3.
fork.hidden = true;
a.hidden = false;
a.classList.add("fristen-pathway-shell--legacy");
b.hidden = true;
return;
}
fork.hidden = path !== "fork";
a.hidden = path !== "a";
b.hidden = path !== "b";

View File

@@ -200,12 +200,11 @@ export function renderFristenrechner(): string {
<span data-i18n="deadlines.pathway.a.title">Verfahrensablauf informieren</span>
</h2>
<div className="fristen-mode-tabs" role="tablist">
<button type="button" id="mode-procedure-tab" className="mode-tab is-active" role="tab" aria-selected="true" data-mode="procedure" data-i18n="deadlines.mode.procedure">Verfahrensablauf</button>
<button type="button" id="mode-event-tab" className="mode-tab" role="tab" aria-selected="false" data-mode="event" data-i18n="deadlines.mode.event">Was kommt nach&hellip;</button>
</div>
<div className="fristen-wizard mode-panel" id="mode-procedure-panel" data-mode="procedure" role="tabpanel" aria-labelledby="mode-procedure-tab">
{/* v3: legacy mode tabs retired (m's spec lock §10 Q1, 2026-05-05).
Pathway A is Verfahrensablauf-only; trigger-event drill-in
surfaces via concept-card pills with ?path=a&trigger=N URL,
which resurfaces mode-event-panel programmatically below. */}
<div className="fristen-wizard mode-panel" id="mode-procedure-panel" data-mode="procedure" role="tabpanel">
<div className="wizard-step" id="step-1">
<h3 className="wizard-step-label">
<span className="step-number">1</span>
@@ -331,7 +330,7 @@ export function renderFristenrechner(): string {
</button>
</div>
<div className="fristen-wizard mode-panel" id="mode-event-panel" data-mode="event" role="tabpanel" aria-labelledby="mode-event-tab" hidden>
<div className="fristen-wizard mode-panel" id="mode-event-panel" data-mode="event" role="tabpanel" hidden>
<div className="wizard-step" id="event-step-1">
<h3 className="wizard-step-label">
<span className="step-number">1</span>

View File

@@ -1625,17 +1625,6 @@ input[type="range"]::-moz-range-thumb {
margin: 1.5rem 0;
}
.fristen-pathway-shell--legacy {
/* Pre-v3 layout for parity testing via ?legacy=1; suppresses the
new heading + back button so the wizard renders flat. */
margin: 0;
}
.fristen-pathway-shell--legacy .fristen-pathway-back,
.fristen-pathway-shell--legacy .fristen-pathway-heading {
display: none;
}
.fristen-pathway-back {
display: inline-flex;
align-items: center;