Skip to content

fix(SDK-1172): fix reflow failure on employee name at 320px viewport - #2754

Merged
dmortal merged 2 commits into
mainfrom
fix/SDK-1172-employee-name-reflow
Sep 15, 2026
Merged

dmortal merged 2 commits into
mainfrom
fix/SDK-1172-employee-name-reflow

Conversation

@dmortal

@dmortal dmortal commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

At a 320px viewport, Flex flexDirection="column" defaults alignItems to flex-start, so the column wrapping the employee name/gross-pay never gets a width from its container — the heading sizes to its own unwrapped content instead of the available space. Combined with Heading never setting overflow-wrap, a name containing one long unbroken token overflows the viewport instead of wrapping, failing WCAG 1.4.10 Reflow on the Payroll "Edit Employee" screen.

Changes

  • Heading: add overflow-wrap: break-word so an unbreakable token wraps instead of overflowing once its box is width-constrained.
  • PayrollEditEmployeePresentation: set alignItems="stretch" on the name/gross-pay column so it takes the available width instead of sizing to content.
  • UNSTABLE_PayrollEditEmployee (alpha scaffold behind payrollRegularRateOfPay): apply the same alignItems="stretch" fix, and add the missing useContainerBreakpoints wiring so Cancel/Save stack below the form on narrow viewports instead of sharing an unconditional row with the name.

Related

Testing

  • npm run test -- --run src/components/Payroll — 726 passed, 1 pre-existing expected fail (unrelated)
  • Live-verified in sdk-app at a true 320px container width (/payroll/PayrollEditEmployee): a name with one long unbroken token now wraps across lines instead of overflowing the viewport; realistic names (e.g. "Ibrahim Castellano") are unaffected.

Flex defaults alignItems to flex-start, so the column wrapping the
employee name/gross-pay never got a width from its container -- the
heading sized to its own unwrapped content instead of the available
space. Combined with Heading never setting overflow-wrap, a name
containing one long unbroken token overflowed the viewport instead of
reflowing (WCAG 1.4.10).

Also apply the same fix to UNSTABLE_PayrollEditEmployee, which had no
responsive handling at all for its header row.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dmortal
dmortal marked this pull request as ready for review September 11, 2026 15:03
@dmortal
dmortal requested a review from a team as a code owner September 11, 2026 15:03
# Conflicts:
#	src/components/Payroll/UNSTABLE_PayrollEditEmployee/UNSTABLE_PayrollEditEmployee.tsx
@dmortal
dmortal enabled auto-merge September 15, 2026 13:37
@dmortal
dmortal added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit e186b8b Sep 15, 2026
39 checks passed
@dmortal
dmortal deleted the fix/SDK-1172-employee-name-reflow branch September 15, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants