Skip to content

feat(content-sidebar): add isForcedToUseTemplates for sign - #4906

Merged
mergify[bot] merged 2 commits into
box:masterfrom
gusbueno:feat/forced-to-use-templates
Oct 21, 2026
Merged

mergify[bot] merged 2 commits into
box:masterfrom
gusbueno:feat/forced-to-use-templates

Conversation

@gusbueno

@gusbueno gusbueno commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a new optional isForcedToUseTemplates property to signSidebarProps. When true, the Box Sign entry point in the sidebar nav is suppressed, even if Box Sign is otherwise enabled.

Why

Gives the consuming app fine-grained control to hide the Box Sign sidebar button in flows where users are forced to use templates.

How

  • Added isForcedToUseTemplates?: boolean to the SignSidebarProps interface (SidebarNavSign.tsx).
  • Destructured the flag in SidebarNav.js and updated the render gate from hasBoxSign && to hasBoxSign && !isForcedToUseTemplates &&.
  • The property is optional, so existing callers are unaffected (backward compatible).

Testing

  • Added a SidebarNav test asserting the Box Sign button is not rendered when isForcedToUseTemplates=true despite enabled=true.
  • All existing SidebarNav tests pass.

Summary by CodeRabbit

  • Updates
    • The Box Sign navigation entry is hidden when templates are required, even if the Box Sign entry point is enabled.
    • The Box Sign navigation entry remains available when templates are not required and Box Sign is enabled.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc323d08-01f6-40b3-aab8-ce05ee1af395
📥 Commits

Reviewing files that changed from the base of the PR and between 684692b and ce6eb82.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 69d6e34d-bb2b-4537-8644-e14038f8e87b
📥 Commits

Reviewing files that changed from the base of the PR and between 6309491 and 684692b.

📒 Files selected for processing: 3
  • src/elements/content-sidebar/SidebarNav.js
  • src/elements/content-sidebar/SidebarNavSign.tsx
  • src/elements/content-sidebar/__tests__/SidebarNav.test.js

Walkthrough

The sidebar now hides the Box Sign navigation section when templates are forced, even if Box Sign is enabled. The sidebar props include the optional flag, and a test checks this rendering condition.

Changes

Box Sign sidebar

Layer / File(s) Summary
Template-forcing navigation guard
src/elements/content-sidebar/SidebarNavSign.tsx, src/elements/content-sidebar/SidebarNav.js, src/elements/content-sidebar/__tests__/SidebarNav.test.js
SignSidebarProps adds the optional isForcedToUseTemplates flag. The sidebar hides the Box Sign section when the flag is true. A test checks that the sign entry point is not rendered in this case.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: jchan106

Merge Risk: ⚪ Minimal · up to 68469

The change is described as allowing consuming apps to hide the Box Sign sidebar entry when templates are forced, while leaving callers that omit the optional flag unaffected. No actionable merge-blocking risk is apparent.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the addition of isForcedToUseTemplates for the Sign sidebar.
Description check Passed The description explains what changed, why it changed, how it was implemented, and how it was tested. It also includes the repository merge instructions.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the sidebar’s sign,
When templates lead, the signs decline.
One flag now guides the view,
A test confirms the change is true.
The rabbit hops along the line.

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

@gusbueno
gusbueno marked this pull request as ready for review October 19, 2026 14:31
@gusbueno
gusbueno requested review from a team as code owners October 19, 2026 14:31
@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-21 08:18 UTC · Rule: Automatic strict merge · triggered by rule Automatic merge queue
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-10-21 08:31 UTC · at 215b0e74f451962abbcf217a907adca41497015a · squash

This pull request spent 13 minutes 20 seconds in the queue, including 12 minutes 32 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Summary
    • check-neutral = Summary
    • check-skipped = Summary
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_test_build
    • check-neutral = lint_test_build
    • check-skipped = lint_test_build
  • any of [🛡 GitHub branch protection]:
    • check-success = license/cla
    • check-neutral = license/cla
    • check-skipped = license/cla
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_pull_request
    • check-neutral = lint_pull_request
    • check-skipped = lint_pull_request

@mergify
mergify Bot merged commit 215b0e7 into box:master Oct 21, 2026
9 of 10 checks passed
@mergify mergify Bot removed the queued label Oct 21, 2026
@gusbueno
gusbueno deleted the feat/forced-to-use-templates branch October 21, 2026 08:36
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