Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/elements/content-sidebar/SidebarNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const SidebarNav = ({
routerDisabled,
signSidebarProps,
}: Props) => {
const { enabled: hasBoxSign } = signSidebarProps || {};
const { enabled: hasBoxSign, isForcedToUseTemplates } = signSidebarProps || {};
const { disabledTooltip: boxAIDisabledTooltip, showOnlyNavButton: showOnlyBoxAINavButton } =
useFeatureConfig('boxai.sidebar');
const { enabled: isPreviewModernizationEnabled } = useFeatureConfig('previewModernization');
Expand Down Expand Up @@ -351,7 +351,7 @@ const SidebarNav = ({
{allVisibleTabs}
</SidebarNavTablist>

{hasBoxSign && (
{hasBoxSign && !isForcedToUseTemplates && (
<div className="bcs-SidebarNav-secondary">
<SidebarNavSign {...signSidebarProps} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/elements/content-sidebar/SidebarNavSign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type { TargetingApi } from '../../features/targeting/types';
export interface SignSidebarProps {
blockedReason: string;
enabled: boolean;
isForcedToUseTemplates?: boolean;
onClick: () => void;
onClickSignMyself: () => void;
targetingApi?: TargetingApi;
Expand Down
14 changes: 14 additions & 0 deletions src/elements/content-sidebar/__tests__/SidebarNav.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ describe('elements/content-sidebar/SidebarNav', () => {
expect(boxSignSection).toBeInTheDocument();
});

test('should not render the Box Sign entry point when isForcedToUseTemplates is true', () => {
renderSidebarNav({
props: {
signSidebarProps: {
enabled: true,
isForcedToUseTemplates: true,
onClick: () => {},
},
},
});

expect(screen.queryByRole('button', { name: /sign/i })).not.toBeInTheDocument();
});

describe('hasNativeBoxAISidebar and customSidebarPanels interaction', () => {
test('should render native Box AI when hasNativeBoxAISidebar is true, ignoring custom boxai tab', () => {
const boxAiPanel = createBoxAIPanel({ title: 'Custom Box AI' });
Expand Down
Loading