Skip to content

feat(shared-link-modal): Deprecate shared-link-modal#4551

Merged
mergify[bot] merged 2 commits into
masterfrom
deprecate-shared-link-modal
May 14, 2026
Merged

feat(shared-link-modal): Deprecate shared-link-modal#4551
mergify[bot] merged 2 commits into
masterfrom
deprecate-shared-link-modal

Conversation

@reneshen0328
Copy link
Copy Markdown
Contributor

@reneshen0328 reneshen0328 commented May 11, 2026

What

  • Update SharedLinkSettingsModal.js constant import for 'peopleWithTheLink' and 'peopleInYourCompany'
  • Safely remove shared-link-modal folder

Summary by CodeRabbit

  • Chores
    • Removed the standalone shared link modal feature and its supporting components, including email sharing, access controls, and permission settings, consolidating this functionality into the unified share modal for a more streamlined sharing experience.

Review Change Stack

@reneshen0328 reneshen0328 requested a review from a team as a code owner May 11, 2026 20:29
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • i18n/en-US.properties is excluded by !i18n/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99723f98-919b-4ea5-a34f-c0074437df65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR completely removes the legacy shared-link-modal feature module from the codebase. The module contained components for managing shared-link access levels, permissions, and email-based sharing. One dependent file, SharedLinkSettingsModal, is updated to source access-level constants from the new unified-share-modal module instead.

Changes

Deprecate Old Shared-Link Modal

Layer / File(s) Summary
Data Model: Migrate Constants to Unified Modal
src/features/shared-link-modal/constants.js, src/features/shared-link-settings-modal/SharedLinkSettingsModal.js
Legacy access-level constants (PEOPLE_WITH_LINK, PEOPLE_IN_COMPANY, CAN_VIEW, CAN_EDIT, PEOPLE_IN_ITEM) are removed. SharedLinkSettingsModal now imports constants from ../unified-share-modal/constants with renamed values (ANYONE_WITH_LINK, ANYONE_IN_COMPANY), and switch cases are updated accordingly.
Component Removal: Access Controls
src/features/shared-link-modal/AccessDescription.js, AccessLabel.js, AccessMenu.js, PermissionMenu.js, RemoveLinkConfirmModal.js
Five access-control components removed: AccessDescription (renders access-level text), AccessLabel (access-level label), AccessMenu (dropdown with modal for link removal), PermissionMenu (view/edit toggle), and RemoveLinkConfirmModal (confirmation dialog).
Component Removal: Shared-Link Containers
src/features/shared-link-modal/SharedLink.js, SharedLinkAccess.js, SharedLinkModal.js
Main container components removed: SharedLink (expiration/settings/link input UI), SharedLinkAccess (composes access/permission controls), and SharedLinkModal (wraps modal with optional email section).
Component Removal: Email Shared Link
src/features/shared-link-modal/EmailSharedLink.js, EmailSharedLink.scss
EmailSharedLink component (pill-selector for contacts, textarea for message, send button) and its stylesheet removed.
Supporting Artifacts: Stylesheets
src/features/shared-link-modal/SharedLink.scss
CSS rules for .shared-link (text input layout, access controls, expiration icon) and .share-access-menu removed.
Supporting Artifacts: Module Exports
src/features/shared-link-modal/index.js
Re-exports of SharedLinkModal (default) and SharedLink (named) removed.
Supporting Artifacts: Localization and Types
src/features/shared-link-modal/messages.js, propTypes.js
I18n message definitions (defineMessages) and PropTypes validators (accessLevelPropType, allowedAccessLevelsPropType, permissionLevelPropType) removed.
Documentation: Markdown Docs and Storybook
src/features/shared-link-modal/SharedLink.md, SharedLinkModal.md, stories/SharedLink.stories.js, stories/SharedLinkModal.stories.js, story markdown files
Example markdown documentation and Storybook story implementations (with mock state and async handlers) removed.
Tests: Unit Tests and Integration Tests
src/features/shared-link-modal/__tests__/*
All Jest/Enzyme test suites removed (25 test blocks covering component rendering, state transitions, click handlers, modal behavior, form validation, and snapshot assertions).
Code Cleanup: Formatting
src/features/shared-link-settings-modal/SharedLinkSettingsModal.js
renderExpirationSection props destructuring reformatted to single-line assignment for readability.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • box/box-ui-elements#4110: Updated SharedLinkSettingsModal to import access constants from unified-share-modal instead of shared-link-modal, providing the migration path used in this PR.
  • box/box-ui-elements#4360: Introduces the unified-share-modal package and coordinates with the removal of legacy shared-link-modal components.

Suggested labels

ready-to-merge

Suggested reviewers

  • jpan-box
  • tjuanitas

Poem

🐰 A modal once grand now fades away,

Its components disbanded, constants at bay,

Unified sharing takes center stage bright,

Deprecated with grace, tomorrow's delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: deprecating the shared-link-modal feature by removing the entire folder and related components.
Description check ✅ Passed The description provides a brief 'What' section outlining the two main objectives (updating SharedLinkSettingsModal.js imports and removing the shared-link-modal folder), but lacks detailed context, rationale, or testing information.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deprecate-shared-link-modal

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/features/shared-link-settings-modal/SharedLinkSettingsModal.js (1)

25-28: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

JSDoc comment may need updating if constant values changed.

The JSDoc documents accessLevel parameter as accepting string values 'peopleWithTheLink', 'peopleInYourCompany', or 'peopleInThisItem'. If the new constants (ANYONE_WITH_LINK, ANYONE_IN_COMPANY) have different string values than the old constants (e.g., 'anyoneWithTheLink' instead of 'peopleWithTheLink'), this documentation will be incorrect.

Update the JSDoc to reflect the actual values of the new constants once verified.

🤖 Prompt for 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.

In `@src/features/shared-link-settings-modal/SharedLinkSettingsModal.js` around
lines 25 - 28, Update the JSDoc for the accessLevel parameter in
SharedLinkSettingsModal.js to match the actual string values used by the new
constants (e.g., ANYONE_WITH_LINK, ANYONE_IN_COMPANY) instead of the old
'peopleWithTheLink'/'peopleInYourCompany'/'peopleInThisItem' names: locate the
JSDoc above the function that accepts accessLevel (the function in
SharedLinkSettingsModal.js) and replace the listed string examples with the real
constant values (or reference the constants by name) after verifying the exact
strings used by the ANYONE_WITH_LINK and ANYONE_IN_COMPANY constants.
🤖 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.

Outside diff comments:
In `@src/features/shared-link-settings-modal/SharedLinkSettingsModal.js`:
- Around line 25-28: Update the JSDoc for the accessLevel parameter in
SharedLinkSettingsModal.js to match the actual string values used by the new
constants (e.g., ANYONE_WITH_LINK, ANYONE_IN_COMPANY) instead of the old
'peopleWithTheLink'/'peopleInYourCompany'/'peopleInThisItem' names: locate the
JSDoc above the function that accepts accessLevel (the function in
SharedLinkSettingsModal.js) and replace the listed string examples with the real
constant values (or reference the constants by name) after verifying the exact
strings used by the ANYONE_WITH_LINK and ANYONE_IN_COMPANY constants.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f1db3ce4-2611-46bc-8329-7a03ab394252

📥 Commits

Reviewing files that changed from the base of the PR and between 6a788b4 and 76873c5.

⛔ Files ignored due to path filters (6)
  • i18n/en-US.properties is excluded by !i18n/**
  • src/features/shared-link-modal/__tests__/__snapshots__/AccessLabel.test.js.snap is excluded by !**/*.snap
  • src/features/shared-link-modal/__tests__/__snapshots__/AccessMenu.test.js.snap is excluded by !**/*.snap
  • src/features/shared-link-modal/__tests__/__snapshots__/SharedLink.test.js.snap is excluded by !**/*.snap
  • src/features/shared-link-modal/__tests__/__snapshots__/SharedLinkAccess.test.js.snap is excluded by !**/*.snap
  • src/features/shared-link-modal/__tests__/__snapshots__/SharedLinkModal.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (31)
  • src/features/shared-link-modal/AccessDescription.js
  • src/features/shared-link-modal/AccessLabel.js
  • src/features/shared-link-modal/AccessMenu.js
  • src/features/shared-link-modal/EmailSharedLink.js
  • src/features/shared-link-modal/EmailSharedLink.scss
  • src/features/shared-link-modal/PermissionMenu.js
  • src/features/shared-link-modal/RemoveLinkConfirmModal.js
  • src/features/shared-link-modal/SharedLink.js
  • src/features/shared-link-modal/SharedLink.md
  • src/features/shared-link-modal/SharedLink.scss
  • src/features/shared-link-modal/SharedLinkAccess.js
  • src/features/shared-link-modal/SharedLinkModal.js
  • src/features/shared-link-modal/SharedLinkModal.md
  • src/features/shared-link-modal/__tests__/AccessDescription.test.js
  • src/features/shared-link-modal/__tests__/AccessLabel.test.js
  • src/features/shared-link-modal/__tests__/AccessMenu.test.js
  • src/features/shared-link-modal/__tests__/EmailSharedLink.test.js
  • src/features/shared-link-modal/__tests__/PermissionMenu.test.js
  • src/features/shared-link-modal/__tests__/RemoveLinkConfirmModal.test.js
  • src/features/shared-link-modal/__tests__/SharedLink.test.js
  • src/features/shared-link-modal/__tests__/SharedLinkAccess.test.js
  • src/features/shared-link-modal/__tests__/SharedLinkModal.test.js
  • src/features/shared-link-modal/constants.js
  • src/features/shared-link-modal/index.js
  • src/features/shared-link-modal/messages.js
  • src/features/shared-link-modal/propTypes.js
  • src/features/shared-link-modal/stories/SharedLink.stories.js
  • src/features/shared-link-modal/stories/SharedLink.stories.md
  • src/features/shared-link-modal/stories/SharedLinkModal.stories.js
  • src/features/shared-link-modal/stories/SharedLinkModal.stories.md
  • src/features/shared-link-settings-modal/SharedLinkSettingsModal.js
💤 Files with no reviewable changes (30)
  • src/features/shared-link-modal/stories/SharedLinkModal.stories.md
  • src/features/shared-link-modal/stories/SharedLink.stories.md
  • src/features/shared-link-modal/constants.js
  • src/features/shared-link-modal/index.js
  • src/features/shared-link-modal/tests/PermissionMenu.test.js
  • src/features/shared-link-modal/tests/RemoveLinkConfirmModal.test.js
  • src/features/shared-link-modal/stories/SharedLink.stories.js
  • src/features/shared-link-modal/SharedLinkModal.md
  • src/features/shared-link-modal/SharedLink.md
  • src/features/shared-link-modal/PermissionMenu.js
  • src/features/shared-link-modal/tests/SharedLinkAccess.test.js
  • src/features/shared-link-modal/tests/AccessLabel.test.js
  • src/features/shared-link-modal/AccessLabel.js
  • src/features/shared-link-modal/AccessDescription.js
  • src/features/shared-link-modal/propTypes.js
  • src/features/shared-link-modal/SharedLinkAccess.js
  • src/features/shared-link-modal/RemoveLinkConfirmModal.js
  • src/features/shared-link-modal/tests/SharedLink.test.js
  • src/features/shared-link-modal/stories/SharedLinkModal.stories.js
  • src/features/shared-link-modal/SharedLink.js
  • src/features/shared-link-modal/messages.js
  • src/features/shared-link-modal/tests/SharedLinkModal.test.js
  • src/features/shared-link-modal/SharedLinkModal.js
  • src/features/shared-link-modal/AccessMenu.js
  • src/features/shared-link-modal/tests/AccessDescription.test.js
  • src/features/shared-link-modal/EmailSharedLink.scss
  • src/features/shared-link-modal/EmailSharedLink.js
  • src/features/shared-link-modal/SharedLink.scss
  • src/features/shared-link-modal/tests/AccessMenu.test.js
  • src/features/shared-link-modal/tests/EmailSharedLink.test.js

@mergify mergify Bot added the queued label May 14, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 14, 2026

Merge Queue Status

  • Entered queue2026-05-14 17:33 UTC · Rule: Automatic strict merge
  • Checks skipped · PR is already up-to-date
  • Merged2026-05-14 17:34 UTC · at ea730864886ebb3194cbd47430b434c09e8bc59c · squash

This pull request spent 1 minute 17 seconds in the queue, including 15 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit 6f98d41 into master May 14, 2026
13 checks passed
@mergify mergify Bot deleted the deprecate-shared-link-modal branch May 14, 2026 17:34
@mergify mergify Bot removed the queued label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants