fix(budget-sources): add horizontal divider between work item groups (#1309)#1311
Conversation
…m groups Add border-top separator between adjacent .parentItemBlock siblings within the same .areaGroup. Uses adjacent-sibling selector to avoid edge cases, styled with --color-border token and --spacing-2 padding/margin for consistent spacing. Co-Authored-By: Claude frontend-developer (Haiku 4.5) <noreply@anthropic.com>
…1309 Add a new describe block 'inter-group divider structure' (scenario 24) to SourceBudgetLinePanel.test.tsx that documents the DOM contract the CSS adjacent-sibling selector (.parentItemBlock + .parentItemBlock) depends on: - Two lines with different parentIds produce two .parentItemBlock siblings - Two lines with the same parentId produce exactly one .parentItemBlock - Multiple .parentItemBlock elements share the same parentElement (required for the + combinator to match them) - Each .parentItemBlock still contains at least one .lineRow descendant (regression guard for intra-group row structure) Computed-style assertions are intentionally absent (JSDOM cannot parse CSS Modules). Visual verification is delegated to the e2e-test-engineer. Fixes #1309 Co-Authored-By: Claude qa-integration-tester (Sonnet 4.6) <noreply@anthropic.com>
…anel Adds mockLinesWithMultipleWorkItems helper and 'inter-work-item divider' describe block with two @Responsive scenarios verifying the CSS adjacent-sibling rule (.parentItemBlock + .parentItemBlock) produces a solid border-top on the second parent group and no border on the first. Fixes #1309 Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.6) <noreply@anthropic.com>
|
Thank you for your submission! We require all contributors to sign our Contributor License Agreement before we can accept your contribution. I have read the CLA Document and I hereby sign the CLA Frank Steiler seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
steilerDev
left a comment
There was a problem hiding this comment.
[product-architect] Architecture compliance confirmed (posting as comment; cannot self-approve). CSS uses design tokens (--color-border, --spacing-2) — no hardcoded values. The adjacent-sibling combinator .parentItemBlock + .parentItemBlock is the idiomatic solution for "separator between, never after last" and keeps the markup untouched. File locations and naming match conventions: component CSS module co-located with component, unit test .test.tsx co-located, E2E spec under e2e/tests/budget/ with @responsive tag for cross-viewport coverage. The JSDOM workaround in the unit tests is correctly documented — asserting the DOM contract the selector depends on and deferring computed-style verification to E2E is the right split. No schema, API contract, or ADR impact. No concerns.
steilerDev
left a comment
There was a problem hiding this comment.
[ux-designer] Design review: APPROVED (posted as comment — cannot approve own PR via GraphQL).
Token adherence. Both values use the correct semantic tokens: var(--color-border) (gray-200 light / slate-500 dark, with a full [data-theme="dark"] override in tokens.css) and var(--spacing-2) (8px). No raw values.
Visual hierarchy. The three-level hierarchy holds cleanly: 2px --color-border-strong left accent (group identity) > 1px --color-border horizontal rule (inter-group separation) > 1px --color-border lineRow bottom divider (intra-group rows). Using the lighter --color-border rather than --color-border-strong for the horizontal rule preserves that hierarchy — the left accent continues to dominate. The --spacing-2 (8px) breathing room on both sides matches the cadence already established by .lineRow padding. The adjacent-sibling margin-top: var(--spacing-2) cleanly overrides the base .parentItemBlock top margin (--spacing-0-5) for all blocks after the first — no unintended stacking.
Dark mode. --color-border is redefined in the [data-theme="dark"] layer in tokens.css (--color-slate-500), so the rule switches automatically in both themes with no additional overrides needed.
Accessibility. Purely decorative separator with no semantic meaning — no ARIA role, label, or contrast obligation applies.
Responsive. Layout-agnostic; renders correctly at all viewport widths.
Tests. The unit tests correctly target the DOM contract (sibling count + shared parent element) rather than computed styles — appropriate given JSDOM's inability to resolve CSS Modules. The E2E tests verify borderTopStyle === 'solid' and borderTopWidth !== '0px' on the second block in a real browser, with both positive (two groups) and negative (one group) cases covered.
Summary
border-topbetween consecutive.parentItemBlocksiblings inSourceBudgetLinePanelso work-item groups are visually separated in the Budget > Sources list..parentItemBlock + .parentItemBlockwith--color-border+--spacing-2tokens (auto-themed for dark mode, no trailing divider after the last group).border-topacross desktop/tablet/mobile viewports.Fixes #1309
Test plan
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com