Skip to content

[CLOV-1600][BpkScrollableCalendar] Bump react-window to v2#4668

Closed
Vincent Liu (xiaogliu) wants to merge 1 commit into
mainfrom
codex/clov-1600-react-window-v2
Closed

[CLOV-1600][BpkScrollableCalendar] Bump react-window to v2#4668
Vincent Liu (xiaogliu) wants to merge 1 commit into
mainfrom
codex/clov-1600-react-window-v2

Conversation

@xiaogliu

@xiaogliu Vincent Liu (xiaogliu) commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

CLOV-1600. Replaces the previous draft migration in #4477 with a version rebased onto the current main repository structure.

Migrates the only react-window consumer, BpkScrollableCalendarGridList, from v1 to v2:

  • List replaces VariableSizeList; rendering now uses rowComponent + rowProps
  • rowCount / rowHeight replace v1 itemCount / itemSize
  • useListRef + scrollToRow replaces the old initial pixel offset path
  • react-virtualized-auto-sizer is removed because v2 has built-in sizing
  • @types/react-window is removed because v2 ships its own types
  • ResizeObserver is mocked in the affected jsdom tests
  • Scrollable calendar snapshots are regenerated for the v2 DOM structure
  • Adds a changelog entry and Dependabot major-version ignores for react-window / @types/react-window

Validation

  • npx eslint packages/backpack-web/src/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.tsx packages/backpack-web/src/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList-test.tsx packages/backpack-web/src/bpk-component-scrollable-calendar/src/BpkScrollableCalendar-test.tsx packages/backpack-web/src/bpk-component-scrollable-calendar/src/accessibility-test.tsx --ext .ts,.tsx
  • TZ=Etc/UTC npx jest packages/backpack-web/src/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList-test.tsx packages/backpack-web/src/bpk-component-scrollable-calendar/src/BpkScrollableCalendar-test.tsx packages/backpack-web/src/bpk-component-scrollable-calendar/src/accessibility-test.tsx
  • npm run check-bpk-dependencies
  • npm run check-react-versions
  • npm run lint exits 0; existing repo warnings still print
  • npm run jest passes: 390 suites passed, 1 skipped; 2666 tests passed, 3 skipped; 825 snapshots passed
  • npm run typecheck currently fails on existing story declaration issues for bpk-component-price / bpk-theming; no scrollable-calendar or react-window errors were reported before those failures
  • Storybook manual validation still needed for initial scroll, variable row heights, RTL, font scaling, resize, date selection, and side-by-side visual comparison

Notes

This supersedes #4477. #3997 is already closed.

@xiaogliu

Copy link
Copy Markdown
Contributor Author

There are no security vulnerabilities in @react-window and @types/react-window version 1.x, and their current features meet our requirements. However, version 2.x comes with API changes and will alter the behavior of bpk-component-scrollable-calendar. Taking the development effort, risks and practical benefits into consideration, I believe there is no need to upgrade @react-window and @types/react-window to version 2.0 for now so close this PR

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

Labels

major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant