Skip to content

fix(content-sharing): vanity name permission#4530

Open
reneshen0328 wants to merge 1 commit intomasterfrom
fix-content-sharing-vanity-name
Open

fix(content-sharing): vanity name permission#4530
reneshen0328 wants to merge 1 commit intomasterfrom
fix-content-sharing-vanity-name

Conversation

@reneshen0328
Copy link
Copy Markdown
Contributor

@reneshen0328 reneshen0328 commented May 1, 2026

Summary by CodeRabbit

  • New Features
    • Shared links now surface vanity-name availability so the UI can indicate whether a shared link’s vanity name can be customized. This enables clearer sharing options and messaging (e.g., showing availability status and enabling or disabling related controls) so users know when they can personalize a link.

@reneshen0328 reneshen0328 requested review from a team as code owners May 1, 2026 05:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

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: 18bfe9fd-bb02-4ce9-937b-0c1d99cd53ff

📥 Commits

Reviewing files that changed from the base of the PR and between 1b42e39 and e06fccb.

📒 Files selected for processing (3)
  • src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js
  • src/elements/content-sharing/utils/__tests__/convertItemResponse.test.ts
  • src/elements/content-sharing/utils/convertItemResponse.ts
✅ Files skipped from review due to trivial changes (1)
  • src/elements/content-sharing/utils/mocks/ContentSharingV2Mocks.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/elements/content-sharing/utils/convertItemResponse.ts
  • src/elements/content-sharing/utils/tests/convertItemResponse.test.ts

Walkthrough

Three files were updated to surface vanity-name availability: the mock API response adds vanity_name, tests assert sharedLink.settings.isVanityNameAvailable, and convertItemResponse reads shared_link_features.vanity_name and sets isVanityNameAvailable (default false).

Changes

Cohort / File(s) Summary
Vanity Name Shared Link Support
src/elements/content-sharing/utils/__mocks__/ContentSharingV2Mocks.js, src/elements/content-sharing/utils/__tests__/convertItemResponse.test.ts, src/elements/content-sharing/utils/convertItemResponse.ts
Mock API response extended with vanity_name in shared_link_features; tests updated to assert sharedLink.settings.isVanityNameAvailable across scenarios; converter reads shared_link_features.vanity_name and sets isVanityNameAvailable (defaults to false).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • jfox-box
  • jpan-box
  • tjuanitas

Poem

🐰 A little hop, a tiny cheer,
Vanity names now soon appear,
I nibble code and tidy things,
So shared links wear their fanciest strings,
Hooray — the rabbit grins ear to ear!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only repository boilerplate about the merge process and provides no actual details about the code changes, implementation, or rationale for the fix. Replace the boilerplate with a meaningful description explaining what the vanity name permission fix does, why it was needed, and which components are affected.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(content-sharing): vanity name permission' directly and clearly summarizes the main change—adding vanity name permission handling to content-sharing functionality.
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.

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

✨ 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 fix-content-sharing-vanity-name

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

jpan-box
jpan-box previously approved these changes May 1, 2026
tjuanitas
tjuanitas previously approved these changes May 1, 2026
isDownloadEnabled: isDownloadAllowed,
isPasswordAvailable: isPasswordAvailable ?? false,
isPasswordEnabled,
isVanityNameAvailable: isVanityNameAvailable ?? false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@reneshen0328 a few lines above, you commented vanity URLs cannot be set via the API, so how does that impact this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

isVanityNameAvailable controls if the user can see the section whereas canChangeVanityName controls if the user can edit the toggle setting. My changes only render the section if it's available. It will always be greyed out even if the user can see the section.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe this is outdated, the API docs says that you can update the vanity name: https://developer.box.com/reference/put-files-id--add-shared-link#body-shared-link-vanity-name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm yeah I'll look into this more

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@reneshen0328 I think you can do that in a follow up

@reneshen0328 reneshen0328 dismissed stale reviews from tjuanitas and jpan-box via e06fccb May 1, 2026 16:17
@reneshen0328 reneshen0328 force-pushed the fix-content-sharing-vanity-name branch from 1b42e39 to e06fccb Compare May 1, 2026 16:17
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