Skip to content

Conversation

@dfenske
Copy link

@dfenske dfenske commented Dec 22, 2025

Summary by CodeRabbit

  • New Features

    • Added move action to item options menu
  • Chores

    • Updated item list column headers to Title Case formatting (Name, Modified, Size, Actions, Details)
    • Added support for React 19
    • Updated dependencies including tabbable and added Babel plugin support

✏️ Tip: You can customize this high-level summary in your review settings.

  - Update React peer dependencies to support v19
  - Migrate from ReactDOM.render to createRoot API
  - Update tabbable imports for v6 compatibility
  - Fix unmount logic in ES6Wrapper
This ensures the es directory is built when installing from GitHub
- Add canMove and onItemMove props to ItemOptions component
- Add 'Move' menu item to dropdown with messages support
- Update column headers from ALL CAPS to proper case (Name, Modified, Size, Actions, Details)
- Add move method placeholder to ContentExplorer
- Update TypeScript interfaces for new props
- Fix tests to include new required props

These changes restore the custom functionality previously applied via patch-package.
- Add explicit type annotations for debounce/throttle functions
- Fix Media component typing to support static properties
- Skip TypeScript definition generation to avoid CI path issues
- Resolves GitHub Actions build failures while maintaining functionality
…uild

- Added babel-plugin-transform-define to babel.config.js
- Configured it to replace __VERSION__ with package.json version
- This fixes ReferenceError: __VERSION__ is not defined when using ES modules
- Required for consuming apps that import ES modules instead of webpack dist builds
@dfenske dfenske requested review from a team as code owners December 22, 2025 20:40
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request updates the codebase to support React 19, adds build-time version injection via Babel, refactors the tabbable library import to use named exports, migrates React DOM rendering in wrapper components from deprecated render to createRoot API, adds a "move" action capability to items with related type definitions, and includes request interception timestamp tracking in the mock service worker.

Changes

Cohort / File(s) Summary
Build Configuration
.storybook/public/mockServiceWorker.js, babel.config.js, package.json
Bumped mockServiceWorker version to 2.12.4 with updated integrity checksum; added request interception timestamp tracking through handleRequest and getResponse call chain; included interceptedAt in REQUEST payload; added babel-plugin-transform-define for compile-time VERSION injection; bumped React and React DOM to 19.0.0; updated tabbable to 6.2.0; introduced "prepare" npm script; modified prebuild:es to remove ts:defs step.
React 18→19 Migration (Wrappers)
src/elements/wrappers/ContentExplorer.js, ContentOpenWith.js, ContentPicker.js, ContentPreview.js, ContentSharing.js, ContentSidebar.js, ContentUploader.js, ES6Wrapper.js
Migrated React DOM rendering from deprecated render() to React 18+ createRoot API across all wrapper components; each now initializes a persistent root via createRoot(container) and calls root.render() instead of direct render invocation; ES6Wrapper adds guarded root.unmount() cleanup.
Tabbable Import Refactoring
src/components/focus-trap/FocusTrap.js, FocusTrap.test.js, src/components/modal/Modal.js, src/features/collapsible-sidebar/CollapsibleSidebar.js
Changed tabbable imports from default to named export pattern; updated corresponding Jest mock to reflect named export structure { tabbable: jest.fn() }.
Move Action Feature
src/elements/common/item/ItemOptions.tsx, types.ts, src/elements/common/messages.js, src/elements/content-explorer/ContentExplorer.tsx, Content.test.tsx
Added canMove permission flag and onItemMove event handler to ItemEventPermissions and ItemEventHandlers; wired Move menu item to ItemOptions when canMove is true; introduced public move() method to ContentExplorer; updated ContentExplorer props to pass canMove={false} and onItemMove={this.move}; added 'move' i18n message entry.
Type Safety & Refactoring
src/components/menu/SubmenuItem.tsx, src/components/media/Media.tsx, src/test-utils/testing-library.tsx
Added explicit ReturnType type annotations for debounced/throttled members; introduced MediaComponent composite type exposing Body, Menu, and Figure static properties; strengthened renderConnected signature to require React.ReactElement parameter.
UI Text Updates
src/elements/common/item-list/messages.ts
Changed column header defaults from uppercase to Title Case (NAME→Name, UPDATED→Modified, SIZE→Size, ACTIONS→Actions, DETAILS→Details).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • jfox-box
  • tjuanitas
  • reneshen0328

Poem

🐰 A version now threads through the request's flight,
React takes its bow—farewell, render(), good night.
Tabbable named, move action gleams bright,
From wrapper to root, the migration shines right.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e63cd39 and 9b89baa.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (24)
  • .storybook/public/mockServiceWorker.js
  • babel.config.js
  • package.json
  • src/components/focus-trap/FocusTrap.js
  • src/components/focus-trap/__tests__/FocusTrap.test.js
  • src/components/media/Media.tsx
  • src/components/menu/SubmenuItem.tsx
  • src/components/modal/Modal.js
  • src/elements/common/item-list/messages.ts
  • src/elements/common/item/ItemOptions.tsx
  • src/elements/common/item/types.ts
  • src/elements/common/messages.js
  • src/elements/content-explorer/ContentExplorer.tsx
  • src/elements/content-explorer/__tests__/Content.test.tsx
  • src/elements/wrappers/ContentExplorer.js
  • src/elements/wrappers/ContentOpenWith.js
  • src/elements/wrappers/ContentPicker.js
  • src/elements/wrappers/ContentPreview.js
  • src/elements/wrappers/ContentSharing.js
  • src/elements/wrappers/ContentSidebar.js
  • src/elements/wrappers/ContentUploader.js
  • src/elements/wrappers/ES6Wrapper.js
  • src/features/collapsible-sidebar/CollapsibleSidebar.js
  • src/test-utils/testing-library.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dfenske dfenske closed this Dec 22, 2025
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