fix(create-task-modal): migrate checkbox tooltip icon to bp#4518
fix(create-task-modal): migrate checkbox tooltip icon to bp#4518mergify[bot] merged 6 commits intobox:masterfrom
Conversation
* feat(content-sharing): Display pending collab * fix: improve collab code --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
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 ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe pull request replaces the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
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
🧹 Nitpick comments (1)
src/elements/content-sharing/utils/convertCollaborators.ts (1)
3-3: Prefer an explicit status allow-list inconvertCollab.Reject-only filtering can unintentionally pass unknown statuses. Safer to allow only accepted and pending.
Suggested diff
-import { INVITEE_ROLE_OWNER, STATUS_ACCEPTED, STATUS_PENDING, STATUS_REJECTED } from '../../../constants'; +import { INVITEE_ROLE_OWNER, STATUS_ACCEPTED, STATUS_PENDING } from '../../../constants'; @@ - if (!collab || collab.status === STATUS_REJECTED) { + if (!collab || (collab.status !== STATUS_ACCEPTED && collab.status !== STATUS_PENDING)) { return null; }Also applies to: 29-31
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/elements/content-sharing/utils/convertCollaborators.ts` at line 3, The current convertCollab logic uses reject-only filtering (e.g., only excluding STATUS_REJECTED), which can allow unknown statuses; update the function(s) named convertCollab (and the other similar block around the code that references STATUS_ACCEPTED/STATUS_PENDING at the same area) to use an explicit allow-list of statuses — only accept STATUS_ACCEPTED and STATUS_PENDING — when mapping collaborator status, and treat anything else as invalid/ignored; keep existing owner handling (INVITEE_ROLE_OWNER) intact and ensure both occurrences that currently check statuses (the convertCollab path and the similar 29–31 block) are changed to this allow-list approach.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/checkbox/CheckboxTooltip.tsx`:
- Line 4: The import of InfoBadge in CheckboxTooltip.tsx is using the wrong
module path; replace the current import from
'@box/blueprint-web-assets/icons/Fill' with the correct module
'@box/blueprint-web-assets/icons/Medium' so that the InfoBadge symbol is
resolved per the Flow stub; update the import statement that references
InfoBadge in the CheckboxTooltip component accordingly.
---
Nitpick comments:
In `@src/elements/content-sharing/utils/convertCollaborators.ts`:
- Line 3: The current convertCollab logic uses reject-only filtering (e.g., only
excluding STATUS_REJECTED), which can allow unknown statuses; update the
function(s) named convertCollab (and the other similar block around the code
that references STATUS_ACCEPTED/STATUS_PENDING at the same area) to use an
explicit allow-list of statuses — only accept STATUS_ACCEPTED and STATUS_PENDING
— when mapping collaborator status, and treat anything else as invalid/ignored;
keep existing owner handling (INVITEE_ROLE_OWNER) intact and ensure both
occurrences that currently check statuses (the convertCollab path and the
similar 29–31 block) are changed to this allow-list approach.
🪄 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: 569bbe8b-5bf3-41d6-8eb4-abe4f8bdd68b
📒 Files selected for processing (7)
flow-typed/npm/@box/blueprint-web-assets_vx.x.x.jssrc/common/types/core.jssrc/components/checkbox/Checkbox.scsssrc/components/checkbox/CheckboxTooltip.tsxsrc/constants.jssrc/elements/content-sharing/utils/__tests__/convertCollaborators.test.tssrc/elements/content-sharing/utils/convertCollaborators.ts
💤 Files with no reviewable changes (1)
- src/components/checkbox/Checkbox.scss
* feat(content-sharing): Display pending collab * fix: improve collab code --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Merge Queue Status
This pull request spent 13 seconds in the queue, including 1 second running CI. Required conditions to merge
|
* feat(content-sharing): Display pending collab (box#4509) * feat(content-sharing): Display pending collab * fix: improve collab code --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * fix(create-task-modal): migrate badge to bp * feat(content-sharing): Display pending collab (box#4509) * feat(content-sharing): Display pending collab * fix: improve collab code --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> * fix(create-task-modal): fix import --------- Co-authored-by: Rene Shen <96209918+reneshen0328@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Migrate the checkbox info badge to Blueprint within the Create Task Modal. Also added an aria-label to the badge so that the tooltip text is read by screen readers.
BEFORE

AFTER

Summary by CodeRabbit