feat: port board page from playground design system #81
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-docs-app!81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "72-port-board-page"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Restyle the kanban board route to use the playground CSS classes from
note-board.htmlinstead of ad-hoc inline utility classes. Add boardnote_typedetection in the note detail route that redirects to the boards route. Define missing CSS custom properties for board and modal components.Changes
src/app.css-- add--color-board-column-bg,--color-board-column-border,--color-board-card-bg,--color-board-card-border,--color-modal-bg,--color-modal-borderCSS variables to:rootsrc/routes/boards/[slug]/+page.svelte-- restyle board page template to use playground classes (.board,.board-col,.col-header,.col-body,.board-card,.card-title,.card-header,.card-meta,.badge--{type},.note-header,.note-meta,.board-progress). Replace inline style bindings with data attributes and playground patterns. Add note linking from board cards vianote_slug.src/routes/notes/[slug]/+page.svelte-- detectnote_type === 'board'and redirect to/boards/{slug}instead of rendering block contentTest Plan
cd ~/pal-e-app && npm run build-- passes clean/boards/{slug}-- kanban renders with playground-matching column headers (dot + title + count), card badges, and progress bar/notes/{board-slug}for a board note -- redirects to/boards/{board-slug}Review Checklist
Related Notes
QA Review — PR #81
Scope Check
PR matches issue #72 acceptance criteria:
note-board.htmlclasses.col-header,.col-dot,.col-count)data-type,.badge--{type},.card-title,.card-meta)note_type === 'board'redirects from/notes/{slug}to/boards/{slug}Findings
1. Dead code:
cardColorfunction (nit)The
cardColorhelper (line ~197) is no longer called anywhere in the template. The playground pattern usesdata-type={item.item_type}with global CSS rules (.board-card[data-type="phase"]) instead of inlineborder-leftstyle bindings. Remove the function and thetypeColorimport it depends on — buttypeColoris still used in filter pills, so onlycardColoris dead.2. Points display removed (minor regression)
The old board cards showed
{item.points}ptwhenitem.points !== null. The new playground-styled cards omit this entirely. The playground prototype (note-board.html) doesn't include points either, so this matches the spec — but if points are actively used on any board, they are now invisible. Confirm this is intentional or add points back as a.tagelement.3. CSS variable definitions are correct
The 6 new
--color-board-*and--color-modal-*variables inapp.cssresolve previously undefined references in the board page. Values match the existing design token palette.VERDICT: APPROVE with nits
The two nits (dead
cardColorfunction, removed points display) are minor. The core restyle correctly ports the playground layout, preserves all interactive features (drag-drop, touch, filters, modals, create/delete), and the board redirect works. Build passes clean.PR #81 Review
DOMAIN REVIEW
Tech stack: SvelteKit, TypeScript, CSS (pure CSS custom properties, no Tailwind).
Playground port fidelity: The PR correctly migrates from inline style bindings and ad-hoc utility classes to semantic playground classes (
.board,.board-col,.col-header,.col-body,.board-card,.board-progress, etc.) that are already defined insrc/app.css. The component architecture is cleaner --data-typeattributes replace runtimecardColor()calls, and class directives (class:board-card--dragging,class:board-col--collapsed) replace complex ternary style strings.Note linking via svelte:element: The dynamic
<svelte:element this={linkTarget ? 'a' : 'div'}>pattern is a good approach for making cards clickable links whennote_slugis set. Svelte correctly stripshref={null}on div elements. Thee.preventDefault()on the delete button inside<a>elements prevents navigation -- correctly handled.Board note_type redirect: The redirect in
src/routes/notes/[slug]/+page.svelteis well-structured:replaceState: trueso back button works correctlyencodeURIComponenton the slug (defensive)Points display removal: Intentional and aligned with project philosophy (no story points -- flow measured by cycle time + throughput).
CSS variable coverage: All new CSS variables (
--color-board-column-bg,--color-board-column-border,--color-board-card-bg,--color-board-card-border,--color-modal-bg,--color-modal-border) are properly defined in:root. All referenced design tokens (--shadow-lg,--color-accent-light,--radius-lg, etc.) exist inapp.css.BLOCKERS
1. E2E tests broken by class rename -- existing tests will fail
e2e/board-filtering.spec.tslines 15 and 25 use the selector.flex.flex-wrap.items-center.gap-2to locate the filter area. The PR changed this element fromclass="mb-3 flex flex-wrap items-center gap-2"toclass="board-filters". These two tests (filter pills are rendered for item typesandclicking a filter pill filters items) will fail with the new markup.The tests must be updated to use
.board-filtersas the selector. This is a blocker because it breaks existing test coverage -- not new functionality without tests, but existing tests rendered non-functional by the change.2. Missing
badge--todoandbadge--repoCSS rules -- invisible badge textThe PR renders
<span class="badge badge--{item.item_type}">for board cards. TheITEM_TYPESconstant includestodo,repo, andproject. However,app.cssonly defines badge background colors for:plan,phase,issue,done,sop,convention,project,board,doc. The typestodoandrepohave NObadge--todoorbadge--repoCSS rule. Since.badgesetscolor: var(--color-badge-text)(#fff white) with no fallback background, these badges render as white text on transparent background -- effectively invisible.This is a blocker because it produces broken UI for two of the six item types shown in the create modal.
NITS
Five
!importantdeclarations in scoped style:.board-col--collapsed,.board-col--drop-target,.board-card--selecteduse!importantto override globalapp.cssbase styles. This works but is a specificity smell. Consider whether the global.board-colstyles could use lower specificity, or whether these modifiers could be defined globally inapp.cssalongside the base rules they override.Missing
data-typerules forrepoandproject:app.cssdefinesboard-card[data-type]border-left colors forplan,phase,issue,todobut notrepoorproject. These cards will have a transparent left border (the default). Not broken, but inconsistent with cards that do get colored borders.-webkit-overflow-scrolling: touchis deprecated: Used in.board-tabs. This property is a no-op in modern browsers (iOS 13+) and can be safely removed.Empty
onkeydown={() => {}}handlers: Present on both the board columns and board cards. These exist to satisfy Svelte a11y warnings for elements withonclickhandlers, but they swallow keyboard events entirely. Consider handling Enter/Space for keyboard navigation compliance.mergeable: false: The PR currently shows as not mergeable -- likely a rebase conflict with main. Needs rebase before merge.Type breakdown removed: The PR removed the "by type" breakdown from the summary card area. This was a useful at-a-glance view. Intentional scope reduction, but worth confirming this is desired.
SOP COMPLIANCE
72-port-board-pagematches issue #72PROCESS OBSERVATIONS
mergeable: falsestatus suggests the branch needs a rebase.VERDICT: NOT APPROVED
Two blockers must be resolved:
e2e/board-filtering.spec.tsselectors from.flex.flex-wrap.items-center.gap-2to.board-filtersbadge--todoandbadge--repoCSS rules toapp.css(and any other item types that may appear on boards)b3a9cea67907092766a407092766a469700ff853