3.4 KiB
3.4 KiB
task, slug, effort, phase, progress, mode, started, updated
| task | slug | effort | phase | progress | mode | started | updated |
|---|---|---|---|---|---|---|---|
| Fix four UI bugs in humor-units app | 20260316-120000_fix-humor-units-ui-bugs | standard | complete | 22/22 | interactive | 2026-03-16T12:00:00Z | 2026-03-16T12:01:00Z |
Context
Four UI bugs in the humor-units SvelteKit converter app:
- Text contrast:
.result-valuehas no explicit color, inherits nothing useful against#FDFCFBcard background - From-unit disappears from grid on shift+click, causing layout shift
- Shift+click clears
highlightedUnitId— the two states must be independent - No dismiss button on the highlighted result banner above the grid
Files affected:
src/app.css— text color fixessrc/routes/+page.svelte— grid inclusion, state independence, dismiss buttonsrc/components/ConversionResult.svelte—is-input-unitprop/class
Risks
highlightedResultderived currently searchesresults(excludes from-unit); if from-unit gets highlighted, it won't be found — must fix the derived tooResultIteminterface usesBigtype forconvertedValue; inputValue is a plainnumber— must wrap withBig()for type consistency- Adding
isInputUnitprop toConversionResultrequires updating the prop interface
Criteria
- ISC-1:
.result-valuehas explicitcolor: #2C2C2Cin app.css - ISC-2:
.result-labelhas explicitcolor: #555550in app.css - ISC-3:
.result-symbolhas explicitcolor: #888880in app.css - ISC-4:
.highlighted-valuehas explicitcolor: #2C2C2Cin app.css - ISC-5:
.highlighted-labelhas explicitcolor: #2C2C2Cin app.css - ISC-6:
resultsderived includes the from-unit (no.filterexclusion) - ISC-7: From-unit entry in results uses
inputValue(wrapped as Big) as its value - ISC-8: From-unit tile renders in definition order (not appended or moved)
- ISC-9: From-unit tile has
isInputUnitprop passed astruein grid - ISC-10:
ConversionResultacceptsisInputUnitboolean prop - ISC-11: From-unit tile renders with CSS class
is-input-unitwhenisInputUnitis true - ISC-12:
is-input-unitCSS class defined in app.css with subtle dashed border style - ISC-13:
handleSetInputdoes NOT sethighlightedUnitId = null - ISC-14:
highlightedUnitIdis only set/cleared byhandleHighlightand dismiss button - ISC-15:
highlightedResultderived searches ALL units (not filtered results) so from-unit can be highlighted - ISC-16:
.highlighted-resultblock contains a "×" dismiss button element - ISC-17: Dismiss button has
aria-label="Remove highlight" - ISC-18: Clicking dismiss button sets
highlightedUnitIdto null - ISC-19: Dismiss button styled with
position: absolute; top: 0.5rem; right: 0.75remor equivalent - ISC-20:
.highlighted-resulthasposition: relativeto anchor dismiss button - ISC-21:
npm run buildexits with code 0 (zero TypeScript/Svelte errors) - ISC-A1: Grid order never changes when from-unit or highlight changes (definition order preserved)
Risks
Bigmust be imported in+page.svelteto wrapinputValuefor the from-unit ResultItemhighlightedResultderived will work correctly onceresultsincludes all unitshandleUnitChangeguard clearinghighlightedUnitIdwhen dropdown changes to same unit: leave intact (not in scope)is-input-unitdashed border style chosen; subtle enough not to be jarring