fix(t-paliad-137): remove B1 "Skip step" + fix step-back contrast
The B1 decision tree exposed a "Skip this step" affordance on
intermediate non-leaf nodes that broke the narrowing model — clicking
it left the tree in a half-narrowed state with no clear UX intent.
Drop the button entirely; users who don't know an answer should pick
"Anderes / Sonstiges" or switch to B2 (filter mode).
The step-back button (and its sibling .fristen-b1-loosen-link in the
empty-result state) rendered with `color: var(--color-accent)` over a
transparent background — lime green text on cream is unreadable. Move
both to a secondary-button shape: hairline border, muted text, accent
on focus-visible. Both light and dark themes verified.
Touched:
- frontend/src/client/fristenrechner.ts: drop skip TSX + handler
- frontend/src/client/i18n.ts: drop "deadlines.pathway.b.tree.skip"
- frontend/src/i18n-keys.ts: drop the codegen key
- frontend/src/styles/global.css: split off .fristen-b1-skip selector
and replace the lime-text rule with a bordered secondary style
using --color-text-muted / --color-border (themed both ways)
This commit is contained in:
@@ -1934,14 +1934,6 @@ function renderB1Cascade(currentSlug: string) {
|
||||
}</div>`;
|
||||
}
|
||||
|
||||
// Skip-step affordance on non-leaf intermediate nodes.
|
||||
let skipHtml = "";
|
||||
if (node && !node.is_leaf && childScope.length > 0) {
|
||||
skipHtml = `<button type="button" class="fristen-b1-skip" data-action="skip">
|
||||
${escHtml(t("deadlines.pathway.b.tree.skip"))}
|
||||
</button>`;
|
||||
}
|
||||
|
||||
// Step-back affordance on any non-root state.
|
||||
let backHtml = "";
|
||||
if (trail.length > 0) {
|
||||
@@ -1951,7 +1943,7 @@ function renderB1Cascade(currentSlug: string) {
|
||||
</button>`;
|
||||
}
|
||||
|
||||
cascade.innerHTML = `${breadcrumbHtml}${question}${buttonsHtml}${skipHtml}${backHtml}`;
|
||||
cascade.innerHTML = `${breadcrumbHtml}${question}${buttonsHtml}${backHtml}`;
|
||||
|
||||
// Wire button clicks.
|
||||
cascade.querySelectorAll<HTMLButtonElement>(".fristen-b1-button, .fristen-b1-crumb, .fristen-b1-step-back").forEach((btn) => {
|
||||
@@ -1961,14 +1953,6 @@ function renderB1Cascade(currentSlug: string) {
|
||||
});
|
||||
});
|
||||
|
||||
// Skip-step clicks the deepest path with current slug as the anchor —
|
||||
// it just means "search at this node level without deeper narrowing".
|
||||
cascade.querySelectorAll<HTMLButtonElement>(".fristen-b1-skip").forEach((btn) => {
|
||||
btn.addEventListener("click", () => {
|
||||
runB1Search(currentSlug);
|
||||
});
|
||||
});
|
||||
|
||||
runB1Search(currentSlug);
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"deadlines.pathway.b.tree.step.back": "Schritt zurück",
|
||||
"deadlines.pathway.b.tree.empty": "Keine Treffer für diesen Pfad.",
|
||||
"deadlines.pathway.b.tree.reset": "Neu starten",
|
||||
"deadlines.pathway.b.tree.skip": "Diesen Schritt überspringen",
|
||||
"deadlines.pathway.b.tree.start_question": "Was ist passiert?",
|
||||
"deadlines.filter.forum.label": "Gericht / System:",
|
||||
"deadlines.filter.forum.upc_cfi": "UPC CFI",
|
||||
@@ -1881,7 +1880,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"deadlines.pathway.b.tree.step.back": "step back",
|
||||
"deadlines.pathway.b.tree.empty": "No matches for this path.",
|
||||
"deadlines.pathway.b.tree.reset": "Restart",
|
||||
"deadlines.pathway.b.tree.skip": "Skip this step",
|
||||
"deadlines.pathway.b.tree.start_question": "What happened?",
|
||||
"deadlines.filter.forum.label": "Forum / System:",
|
||||
"deadlines.filter.forum.upc_cfi": "UPC CFI",
|
||||
|
||||
@@ -693,7 +693,6 @@ export type I18nKey =
|
||||
| "deadlines.pathway.b.tree.coming_soon"
|
||||
| "deadlines.pathway.b.tree.empty"
|
||||
| "deadlines.pathway.b.tree.reset"
|
||||
| "deadlines.pathway.b.tree.skip"
|
||||
| "deadlines.pathway.b.tree.start_question"
|
||||
| "deadlines.pathway.b.tree.step.back"
|
||||
| "deadlines.pathway.back"
|
||||
|
||||
@@ -1781,22 +1781,29 @@ input[type="range"]::-moz-range-thumb {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fristen-b1-skip,
|
||||
.fristen-b1-step-back,
|
||||
.fristen-b1-loosen-link {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--color-accent);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
color: var(--color-text-muted);
|
||||
cursor: pointer;
|
||||
padding: 0.25rem 0.5rem;
|
||||
padding: 0.35rem 0.75rem;
|
||||
font-size: 0.9rem;
|
||||
margin-right: 0.5rem;
|
||||
transition: border-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.fristen-b1-skip:hover,
|
||||
.fristen-b1-step-back:hover,
|
||||
.fristen-b1-loosen-link:hover {
|
||||
text-decoration: underline;
|
||||
border-color: var(--color-text-muted);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.fristen-b1-step-back:focus-visible,
|
||||
.fristen-b1-loosen-link:focus-visible {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.fristen-b1-error {
|
||||
|
||||
Reference in New Issue
Block a user