File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 77import * as React from 'react' ;
88import { injectIntl } from 'react-intl' ;
99import type { IntlShape } from 'react-intl' ;
10+ import classNames from 'classnames' ;
1011import noop from 'lodash/noop' ;
1112// $FlowFixMe
1213import { BoxAiLogo } from '@box/blueprint-web-assets/icons/Logo' ;
@@ -83,6 +84,7 @@ const SidebarNav = ({
8384 const { enabled : hasBoxSign } = signSidebarProps || { } ;
8485 const { disabledTooltip : boxAIDisabledTooltip , showOnlyNavButton : showOnlyBoxAINavButton } =
8586 useFeatureConfig ( 'boxai.sidebar' ) ;
87+ const { enabled : isPreviewModernizationEnabled } = useFeatureConfig ( 'previewModernization' ) ;
8688
8789 const { focusPrompt } = usePromptFocus ( '.be.bcs' ) ;
8890
@@ -193,7 +195,12 @@ const SidebarNav = ({
193195 ) }
194196
195197 { hasAdditionalTabs && (
196- < div className = "bcs-SidebarNav-overflow" data-testid = "additional-tabs-overflow" >
198+ < div
199+ className = { classNames ( 'bcs-SidebarNav-overflow' , {
200+ 'bcs-SidebarNav-overflow--modernized' : isPreviewModernizationEnabled ,
201+ } ) }
202+ data-testid = "additional-tabs-overflow"
203+ >
197204 < AdditionalTabs key = { fileId } tabs = { additionalTabs } />
198205 </ div >
199206 ) }
Original file line number Diff line number Diff line change 5858 }
5959 }
6060
61+ .bcs-SidebarNav-overflow--modernized {
62+ position : relative ;
63+
64+ // Gradient overlay at bottom to indicate scrollable content
65+ & ::after {
66+ position : absolute ;
67+ bottom : 0 ;
68+ left : 0 ;
69+ width : 100% ;
70+ height : 30px ;
71+ background : linear-gradient (to top , $white , transparent );
72+ content : ' ' ;
73+ pointer-events : none ;
74+ }
75+ }
76+
6177 .bcs-SidebarNav-footer {
6278 display : flex ;
6379 flex : 0 0 60px ;
Original file line number Diff line number Diff line change @@ -163,6 +163,24 @@ describe('elements/content-sidebar/SidebarNav', () => {
163163 expect ( placeholders ) . toHaveLength ( 5 ) ;
164164 } ) ;
165165
166+ test ( 'should render additional tabs with modernized class when previewModernization is enabled' , ( ) => {
167+ renderSidebarNav ( {
168+ features : {
169+ previewModernization : {
170+ enabled : true ,
171+ } ,
172+ } ,
173+ props : {
174+ additionalTabs : [ ] ,
175+ hasAdditionalTabs : true ,
176+ } ,
177+ } ) ;
178+
179+ const overflowContainer = screen . getByTestId ( 'additional-tabs-overflow' ) ;
180+ expect ( overflowContainer ) . toBeInTheDocument ( ) ;
181+ expect ( overflowContainer ) . toHaveClass ( 'bcs-SidebarNav-overflow--modernized' ) ;
182+ } ) ;
183+
166184 test ( 'should render the Box Sign entry point if its feature is enabled' , ( ) => {
167185 renderSidebarNav ( {
168186 props : {
You can’t perform that action at this time.
0 commit comments