feat(content-uploader): add support for item share button and open preview button#4627
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughTwo optional callbacks, ChangesItem Share/Open Callback Wiring
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/elements/content-uploader/ContentUploader.tsx`:
- Around line 177-178: The defaultProps in ContentUploader.tsx are setting
onItemShare and onItemOpen to noop, which causes action buttons to appear even
when callers don't provide these handlers. In
src/elements/content-uploader/ContentUploader.tsx at lines 177-178, remove the
`onItemShare: noop` and `onItemOpen: noop` entries from defaultProps so these
properties remain undefined when omitted by callers, allowing the buttons to be
hidden as intended. Then in
src/elements/content-uploader/__tests__/ContentUploader.test.js at lines
1316-1324, update the existing tests that verify default noop behavior by
replacing them with assertions that either verify the callbacks remain undefined
when not provided, or that the corresponding action buttons are not rendered in
integration-level tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1375a2ab-a925-4cd9-abe6-93819fd4ca9c
📒 Files selected for processing (2)
src/elements/content-uploader/ContentUploader.tsxsrc/elements/content-uploader/__tests__/ContentUploader.test.js
8bc4f76
Merge Queue Status
This pull request spent 10 minutes 55 seconds in the queue, including 10 minutes 30 seconds running CI. Required conditions to merge
|
…eview button (box#4627) * feat(content-uploader): add support for item share button and open preview button * feat(content-uploader): add support for item share button and open preview button * feat(content-uploader): fix test to check default param of undefined * feat(content-uploader): remove undefined value as it is by default undefined already --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Add support to two new callbacks added to the uploads manager that where not passed from wrapping component
They enable to perform action connected to share and to opening in new tab
Summary by CodeRabbit