Skip to content

Comments

chore(timeline): EPIC-06 frontend refinements — code quality and accessibility#258

Merged
steilerDev merged 4 commits intobetafrom
chore/6-refinement
Feb 24, 2026
Merged

chore(timeline): EPIC-06 frontend refinements — code quality and accessibility#258
steilerDev merged 4 commits intobetafrom
chore/6-refinement

Conversation

@steilerDev
Copy link
Owner

Summary

Addresses non-blocking review observations from EPIC-06 story PRs (Issue #257, items 2–10).

  • Item 2 — Date parsing deduplication (useGanttDrag.ts): Extracted a parseDateString(str) helper function that eliminates 4 repeated inline YYYY-MM-DD parse patterns (substring + parseInt chains)
  • Item 4 — Focus ring token (CalendarItem.module.css): Changed raw box-shadow: 0 0 0 2px var(--color-border-focus) to box-shadow: var(--shadow-focus) for consistency with the rest of the app
  • Item 5 — Spacing tokens (calendar CSS files): Replaced hardcoded 2px/1px values with var(--spacing-0-5)/var(--spacing-px) in CalendarItem, CalendarMilestone, and MonthGrid
  • Item 6 — Human-readable aria-labels: Added formatDateForAria(dateStr) helper to calendarUtils.ts (e.g. "2026-02-24""Tuesday, February 24, 2026"); applied in MonthGrid and WeekGrid day cell aria-label attributes
  • Item 7 — Week view min-width on mobile (WeekGrid.module.css): Added min-width: 480px to .daysRow to trigger horizontal scroll on narrow viewports instead of compressing columns to unreadable widths
  • Item 8 — Sidebar row touch target (GanttSidebar.module.css): Added min-height: 44px on .sidebarRow in the tablet/mobile media query to meet the 44px touch target minimum
  • Item 9 — Milestone panel button touch targets (MilestonePanel.module.css): Changed .closeButton and .milestoneActionButton from fixed 40×40px to min-width: 44px; min-height: 44px on mobile
  • Item 10 — Remove redundant mobile CSS block (GanttSidebar.module.css): Removed the @media (max-width: 767px) block that was an exact duplicate of the tablet @media (max-width: 1279px) rules; the tablet rule now covers both breakpoints

Item 3 deferred (getShortMonthName removal)

getShortMonthName() cannot be removed at this time because calendarUtils.test.ts (owned by the QA agent) imports and tests this function. Removing it would fail typecheck and break CI. The QA agent must first update the test file to remove the getShortMonthName describe block, after which the export and SHORT_MONTH_NAMES array can be safely deleted.

Test plan

  • Pre-commit hook passed: lint, format, typecheck (all workspaces), build, audit — all green
  • CI Quality Gates and Docker checks pass
  • Gantt drag-and-drop still works correctly (parseDateString refactor is purely internal)
  • Calendar work item bars and milestone markers still display with correct spacing
  • Calendar day cells announce human-readable labels to screen readers
  • Week view scrolls horizontally on narrow viewports instead of compressing
  • Gantt sidebar rows meet 44px touch target on tablet/mobile
  • Milestone panel close/action buttons meet 44px touch target on mobile

🤖 Generated with Claude Code

Reject empty string anchorWorkItemId at the AJV layer (defense-in-depth).
Previously, empty strings would pass schema validation and only be caught
by handler logic. This addresses EPIC-06 refinement item #1 (Issue #257).

Fixes #257

Co-Authored-By: Claude backend-developer (Sonnet 4.5) <noreply@anthropic.com>
…ssibility

Items addressed from Issue #257:
- Extract parseDateString() helper in useGanttDrag.ts (item 2) — eliminates 4
  repeated inline YYYY-MM-DD parse patterns
- Replace raw box-shadow in CalendarItem focus ring with --shadow-focus token (item 4)
- Replace hardcoded 2px/1px pixel values with --spacing-0-5/--spacing-px tokens
  in CalendarItem, CalendarMilestone, and MonthGrid CSS (item 5)
- Add formatDateForAria() helper to calendarUtils.ts and apply it to MonthGrid
  and WeekGrid day cell aria-labels for human-readable screen reader output (item 6)
- Add min-width: 480px to WeekGrid .daysRow to trigger horizontal scroll on
  narrow viewports instead of compressing columns (item 7)
- Add min-height: 44px to GanttSidebar .sidebarRow in the tablet/mobile media
  query to meet 44px touch target minimum (item 8)
- Increase MilestonePanel .closeButton and .milestoneActionButton from 40×40px
  to min-width/min-height: 44px on mobile (item 9)
- Remove redundant @media (max-width: 767px) block from GanttSidebar.module.css
  that duplicated the tablet rules exactly (item 10)

Note: Item 3 (remove getShortMonthName) deferred — the QA test file imports
and tests this function; removing it would break CI. The QA agent must update
calendarUtils.test.ts to drop the getShortMonthName test block first.

Fixes #257

Co-Authored-By: Claude frontend-developer (Sonnet 4.5) <noreply@anthropic.com>
…A tests

Revert the formatDateForAria application to MonthGrid and WeekGrid day cells.
The existing QA tests for MonthGrid.test.tsx, WeekGrid.test.tsx, and
CalendarView.test.tsx all assert that gridcell aria-label values are ISO date
strings (e.g. '2024-03-10'). Changing to human-readable format ('Sunday,
March 10, 2024') correctly improves accessibility but breaks those tests.

The formatDateForAria() helper is still exported from calendarUtils.ts and
ready to use once the QA agent updates the tests to match the new format.

Item 6 (aria-label improvement) from Issue #257 is deferred pending QA
agent coordination to update the affected test files.

Co-Authored-By: Claude frontend-developer (Sonnet 4.5) <noreply@anthropic.com>
@steilerDev
Copy link
Owner Author

[frontend-developer]

All CI checks are green. Here is a summary of what was implemented and what was deferred due to QA test conflicts:

Implemented (Items 2, 4, 5, 7, 8, 9, 10)

  • Item 2: Extracted parseDateString(str: string): Date helper in useGanttDrag.ts — removes 4 repeated inline substring/parseInt chains
  • Item 4: Updated CalendarItem.module.css focus ring to use var(--shadow-focus) instead of raw 0 0 0 2px var(--color-border-focus)
  • Item 5: Replaced 2pxvar(--spacing-0-5) and 1pxvar(--spacing-px) in CalendarItem.module.css, CalendarMilestone.module.css, and MonthGrid.module.css
  • Item 7: Added min-width: 480px to .daysRow in WeekGrid.module.css to trigger horizontal scroll on narrow viewports
  • Item 8: Added min-height: 44px to .sidebarRow in the @media (max-width: 1279px) block of GanttSidebar.module.css
  • Item 9: Updated .closeButton and .milestoneActionButton in MilestonePanel.module.css mobile breakpoint from width/height: 40px to min-width/min-height: 44px
  • Item 10: Removed the redundant @media (max-width: 767px) block from GanttSidebar.module.css that duplicated the tablet rules; the tablet block now covers both breakpoints, with the new min-height: 44px added there

Deferred (Items 3 and 6) — QA agent coordination required

Item 3 — Remove getShortMonthName(): The function is exported but calendarUtils.test.ts imports and tests it. Removing the export would fail typecheck. The QA agent must first remove the describe('getShortMonthName', ...) test block and the import of getShortMonthName from calendarUtils.test.ts.

Item 6 — Human-readable aria-labels: The formatDateForAria() helper has been added to calendarUtils.ts and is ready to use. However, three QA tests assert that gridcell aria-label values are ISO strings (e.g. '2024-03-10'): MonthGrid.test.tsx, WeekGrid.test.tsx, and CalendarView.test.tsx. The QA agent must update these tests to expect human-readable labels (e.g. 'Sunday, March 10, 2024'), after which the implementation can be applied to MonthGrid.tsx and WeekGrid.tsx.

…abel format change

Items 3 and 6 from EPIC-06 refinements (Issue #257):

Item 3: Remove getShortMonthName() test block from calendarUtils.test.ts
- Remove import of getShortMonthName from calendarUtils.test.ts
- Remove describe('getShortMonthName', ...) block entirely
- Remove getShortMonthName() and SHORT_MONTH_NAMES from calendarUtils.ts (dead code)

Item 6: Apply formatDateForAria() to MonthGrid and WeekGrid day cells
- Add formatDateForAria() to calendarUtils.test.ts with 9 test cases covering
  weekday correctness, month boundaries, leap years, and output format
- Update MonthGrid.tsx and WeekGrid.tsx to use formatDateForAria() for gridcell
  aria-labels (human-readable format for screen readers)
- Update MonthGrid.test.tsx gridcell aria-label assertions to expect human-readable
  format (e.g. 'Friday, March 1, 2024' instead of '2024-03-01')
- Update WeekGrid.test.tsx gridcell aria-label assertions similarly
- Update CalendarView.test.tsx week navigation tests to use parseCellAriaLabel()
  helper for extracting dates from human-readable aria-labels instead of appending
  'T00:00:00Z' to ISO strings

All four test files pass: calendarUtils (98 tests), MonthGrid (24), WeekGrid (26),
CalendarView (37).

Co-Authored-By: Claude qa-integration-tester (Sonnet 4.5) <noreply@anthropic.com>
@steilerDev steilerDev merged commit 73d06ce into beta Feb 24, 2026
9 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.10.0-beta.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants