Skip to content

feat: introduce isForcedToUseTemplates for sign - #4903

Open
gusbueno wants to merge 2 commits into
masterfrom
SIGN-75147
Open

gusbueno wants to merge 2 commits into
masterfrom
SIGN-75147

Conversation

@gusbueno

@gusbueno gusbueno commented Oct 15, 2026 •

Copy link
Copy Markdown

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

  • Bug Fixes
    • The Box Sign navigation item is no longer shown when signing is restricted to templates, even if Box Sign is enabled.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 8b8c01a4-9b6f-4561-bc32-aeab7b3e3f8b
📥 Commits

Reviewing files that changed from the base of the PR and between 6309491 and 79b5672.

📒 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

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The sidebar now hides the Box Sign navigation item when Box Sign is enabled and isForcedToUseTemplates is true. The sign sidebar props define this optional flag, and a test verifies the hidden state.

Changes

Box Sign Navigation

Layer / File(s) Summary
Template-aware navigation gate
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 renders the Box Sign item only when Box Sign is enabled and this flag is false. A test checks that the item is absent when the flag is true.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: jchan106

Merge Risk: ⚪ Minimal · up to 79b56

The sidebar hides the Box Sign entry point when templates are forced, while callers that omit the optional flag retain the existing behavior. No merge-blocking concern is established.

Pre-merge checks: Passed 5
Check name Status Explanation
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.
Title check Passed The title clearly identifies the main change: adding the isForcedToUseTemplates option for Sign navigation.
Description check Passed The description explains what changed, why it changed, how it works, backward compatibility, and testing. It also includes the repository’s merge guidance.
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 docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • 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 gate
Box Sign hides when templates wait
One small flag guides what appears
A test confirms the hidden ears
Then hops away with tidy cheer

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

@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ gusbueno
❌ Gustavo Bueno


Gustavo Bueno seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gusbueno
gusbueno marked this pull request as ready for review October 16, 2026 06:48
@gusbueno
gusbueno requested review from a team as code owners October 16, 2026 06:48
@greg-in-a-box greg-in-a-box changed the title feat: introduce isForcedToUseTemplates for sign (SIGN-75147) feat: introduce isForcedToUseTemplates for sign Oct 16, 2026

This branch has not been deployed

No deployments
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.

2 participants