Skip to content

fix: clean up console warnings in table, date, and phone - #1748

Merged
jordan-a-young merged 5 commits into
masterfrom
fix/console-warnings-key-prop-act-displaytext
Sep 15, 2026
Merged

jordan-a-young merged 5 commits into
masterfrom
fix/console-warnings-key-prop-act-displaytext

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member

Summary

Cleans up actionable console warnings surfaced by the test suite. All 39 packages continue to pass.

Changes

packages/table — React key prop spreading (4 files)

React 19 requires key to be passed directly to JSX, not via object spread. The react-table v7 helper methods (getHeaderGroupProps, getHeaderProps, getRowProps, getCellProps) return an object that includes key, which was being spread onto the element.

Fixed by destructuring key out of the returned props object and passing it explicitly:

  • TableHeaderRow.tsx
  • TableHeaderCell.tsx
  • TableRow.tsx
  • TableCell.tsx

packages/table — displayText function rendered as React child

BulkRecordAction.displayText accepts a function signature (records, rows) => ReactNode, but the render code was doing {action.displayText} which passes the function itself as a child.

Fixed by checking typeof action.displayText === 'function' and calling it with the current selection when true. Snapshot updated accordingly.

packages/date, packages/phone — Missing act() wraps in tests

Several tests triggered async Formik and react-dates state updates outside of act(), causing noise in the test output.

Fixed by wrapping the triggering fireEvent calls in await act(async () => {}):

  • packages/date/tests/DateField.test.jsx — 3 fireEvent.click(submit) calls
  • packages/date/tests/DateRangeField.test.jsx — 3 fireEvent.click(submit) calls
  • packages/date/tests/DateRange.test.jsx — 3 .focus() calls
  • packages/phone/tests/Phone.test.jsxfireEvent.change / fireEvent.blur pairs

What's not fixed

Remaining warnings are all from third-party dependencies (reactstrap defaultProps, availity-reactstrap-validation legacy context API, react-dates componentWillMount lifecycle) and require upstream upgrades to resolve.

- Extract `key` from react-table prop spreads in TableHeaderRow,
  TableHeaderCell, TableRow, and TableCell to satisfy React 19's
  requirement that keys be passed directly rather than via spread

- Resolve 'Functions are not valid as a React child' in BulkTableActions
  by calling displayText when it is a function instead of rendering it
  directly; update snapshot accordingly

- Wrap bare fireEvent.click/change/blur calls that trigger async Formik
  and react-dates state updates in `act()` across DateField, DateRange,
  DateRangeField, and Phone tests to silence act() warnings
- Move Nx cache restore before yarn install in all jobs
- Add NX_DAEMON=false to prevent daemon fork attempts in CI
- Upload build artifacts in setup job, download in downstream jobs
  to avoid redundant rebuilds across publish and deploy-docs
- Parallelize deploy-docs with publish by depending on setup instead
  of waiting for publish to complete
Only breaking change in jsdom 30 is Node.js minimum raised to
^22.22.2 || ^24.15.0 || >=26.0.0, which is satisfied by CI matrix.
All 381/974/729 tests passing.
- actions/upload-artifact: v4 (floating) -> v7.0.1 (SHA pinned)
- actions/download-artifact: v4 (floating) -> v8.0.1 (SHA pinned)
- actions/upload-pages-artifact: v3.0.1 -> v5.0.0
- actions/deploy-pages: v4.0.5 -> v5.0.1

All updated versions run on Node.js 24, eliminating the Node.js 20
deprecation warnings seen in CI. Also pins floating @v4 tags to
exact SHAs for consistency with the rest of the workflow files.
@jordan-a-young
jordan-a-young merged commit 679cce7 into master Sep 15, 2026
7 checks passed
@jordan-a-young
jordan-a-young deleted the fix/console-warnings-key-prop-act-displaytext branch September 15, 2026 13:54
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.

1 participant