Skip to content

feat(content-uploader): uploads items order change#4654

Open
dealwith wants to merge 2 commits into
masterfrom
order-change-uploads-items
Open

feat(content-uploader): uploads items order change#4654
dealwith wants to merge 2 commits into
masterfrom
order-change-uploads-items

Conversation

@dealwith

@dealwith dealwith commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Reverse the order of the items for the new uploads manager

Summary by CodeRabbit

  • Bug Fixes
    • Improved upload item ordering in the content uploader: when the modernized uploads manager is enabled, newest items now appear first; the legacy view preserves the existing order.
    • Ensured the ordering change only affects what’s displayed and does not alter the uploader’s underlying item sequence.
  • Tests
    • Added coverage to verify modern vs. legacy upload manager display order and confirm no internal item list mutation.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d98bd8f3-a159-40f4-ae36-d99be9ab3acf

📥 Commits

Reviewing files that changed from the base of the PR and between 8aff306 and ef55e0f.

📒 Files selected for processing (2)
  • src/elements/content-uploader/ContentUploader.tsx
  • src/elements/content-uploader/__tests__/ContentUploader.test.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/elements/content-uploader/ContentUploader.tsx
  • src/elements/content-uploader/tests/ContentUploader.test.js

Walkthrough

ContentUploader now derives a separate item list for upload manager rendering, reversing the order only for modernized uploads. Tests cover modernized newest-first display, legacy ordering, and preservation of internal item state.

Changes

Upload manager item ordering

Layer / File(s) Summary
Derived manager items and order tests
src/elements/content-uploader/ContentUploader.tsx, src/elements/content-uploader/__tests__/ContentUploader.test.js
ContentUploader builds uploadsManagerItems from items based on enableModernizedUploads, uses that array for both upload manager branches, and adds tests for modernized ordering, legacy ordering, and non-mutation of state.items.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • box/box-ui-elements#4571: This PR also changes ContentUploader.tsx rendering around enableModernizedUploads and the upload-manager item flow.
  • box/box-ui-elements#4573: This PR is directly connected to the modernized upload manager item mapping and render path in ContentUploader.tsx.

Suggested reviewers

  • olehrybak
  • jfox-box

Poem

A bunny hopped through upload rows,
And sorted carrots, nose-to-toes.
Newest first for modern light,
Old ways kept their proper height.
No pawprints changed the state today —
Just tidy hops along the way 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change to uploads item ordering in content-uploader.
Description check ✅ Passed The description clearly states the main change and aligns with the repository's simple template requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch order-change-uploads-items

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.

@dealwith dealwith marked this pull request as ready for review June 25, 2026 18:27
@dealwith dealwith requested review from a team as code owners June 25, 2026 18:27
@dealwith dealwith force-pushed the order-change-uploads-items branch from 8aff306 to ef55e0f Compare June 26, 2026 12:13
@dealwith dealwith self-assigned this Jun 26, 2026
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.

3 participants