Skip to content

fix(budget-sources): add horizontal divider between work item groups (#1309)#1311

Merged
steilerDev merged 3 commits into
betafrom
fix/1309-budget-sources-work-item-divider
Apr 19, 2026
Merged

fix(budget-sources): add horizontal divider between work item groups (#1309)#1311
steilerDev merged 3 commits into
betafrom
fix/1309-budget-sources-work-item-divider

Conversation

@steilerDev
Copy link
Copy Markdown
Owner

Summary

  • Add a horizontal border-top between consecutive .parentItemBlock siblings in SourceBudgetLinePanel so work-item groups are visually separated in the Budget > Sources list.
  • Uses adjacent-sibling selector .parentItemBlock + .parentItemBlock with --color-border + --spacing-2 tokens (auto-themed for dark mode, no trailing divider after the last group).
  • Unit tests document the DOM contract the CSS selector depends on; E2E tests assert the computed border-top across desktop/tablet/mobile viewports.

Fixes #1309

Test plan

  • Unit tests: structural DOM contract in `SourceBudgetLinePanel.test.tsx`
  • E2E tests: computed-style assertions in `e2e/tests/budget/budget-source-lines.spec.ts` (`@responsive`)
  • Stylelint: tokens only, no hardcoded colors/spacing
  • Quality Gates CI green

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Frank Steiler and others added 3 commits April 19, 2026 21:59
…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>
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your submission! We require all contributors to sign our Contributor License Agreement before we can accept your contribution.

To sign, please comment on this PR with:
I have read the CLA Document and I hereby sign the CLA


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.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Owner Author

@steilerDev steilerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copy link
Copy Markdown
Owner Author

@steilerDev steilerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@steilerDev steilerDev merged commit 4cc54a9 into beta Apr 19, 2026
29 of 34 checks passed
@steilerDev steilerDev deleted the fix/1309-budget-sources-work-item-divider branch April 19, 2026 20:17
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant