Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
30d833c
feat(content-sidebar): implement for custom sidebar panels (BREAKING…
fpan225 Oct 6, 2025
d1e65b3
feat(content-sidebar): enhance Box AI sidebar integration and custom …
fpan225 Jan 21, 2026
8e510b7
fix(tests): update tests and cleanup
fpan225 Jan 21, 2026
2eb8499
feat(content-sidebar): add Box AI sidebar stories and visual regressi…
fpan225 Jan 21, 2026
7fa0a13
feat(content-sidebar): implement custom panel icon rendering with fal…
fpan225 Jan 21, 2026
61118f2
feat(content-sidebar): add visual regression tests for custom panels
fpan225 Jan 21, 2026
feb4507
fix(content-sidebar): flow errors
fpan225 Jan 21, 2026
29efe88
feat(content-sidebar): update Box AI eligibility logic and enhance tests
fpan225 Jan 21, 2026
03b377e
fix(content-sidebar): update Box AI panel visibility logic
fpan225 Jan 21, 2026
a071410
refactor(content-sidebar): rename customTabs to customSidebarPanels f…
fpan225 Jan 22, 2026
e4a8e10
refactor(content-sidebar): improve custom panel handling and type def…
fpan225 Jan 22, 2026
bbeda36
fix: flow error
fpan225 Jan 22, 2026
072fc5d
fix(content-sidebar): use canShowBoxAISidebarPanel in the empty‑panel…
fpan225 Jan 22, 2026
8602ff1
fix(content-sidebar): handle optional refresh method for custom sidebars
fpan225 Jan 27, 2026
3e01986
refactor(content-sidebar): simplify custom panel icon rendering and e…
fpan225 Jan 30, 2026
64dda09
refactor(content-sidebar): clarify Box AI panel precedence logic in S…
fpan225 Feb 2, 2026
5f03aac
refactor(content-sidebar): enhance type definitions for sidebar navig…
fpan225 Feb 2, 2026
674b76f
refactor(content-sidebar): streamline SidebarNavButton props and enha…
fpan225 Feb 2, 2026
87f25d6
refactor(content-sidebar): remove redundant vrts
fpan225 Feb 2, 2026
f321167
test(content-sidebar): fix test failure
fpan225 Feb 3, 2026
58a23bf
test(content-sidebar): remove more redundant tests
fpan225 Feb 3, 2026
ed1dae4
test(content-sidebar): remove sidebarnav redundant tests
fpan225 Feb 3, 2026
5a67dd5
refactor(content-sidebar): remove redundant comment noop
fpan225 Feb 5, 2026
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
2 changes: 1 addition & 1 deletion src/elements/common/types/SidebarNavigation.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type SidebarNavigation = {
activeFeedEntryId?: string,
fileVersionId?: string,
filteredTemplateIds?: string,
sidebar: ViewTypeValues,
sidebar: ViewTypeValues | string,
versionId?: string,
};

Expand Down
5 changes: 4 additions & 1 deletion src/elements/content-sidebar/ContentSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import type { WithLoggerProps } from '../../common/types/logging';
import type { ElementsXhrError, RequestOptions, ErrorContextProps } from '../../common/types/api';
import type { MetadataEditor } from '../../common/types/metadata';
import type { StringMap, Token, User, BoxItem } from '../../common/types/core';
import type { AdditionalSidebarTab } from './flowTypes';
import type { AdditionalSidebarTab, CustomSidebarPanel } from './flowTypes';
import type { FeatureConfig } from '../common/feature-checking';
// $FlowFixMe TypeScript file
import type { Theme } from '../common/theming';
Expand All @@ -66,6 +66,7 @@ type Props = {
className: string,
clientName: string,
currentUser?: User,
customSidebarPanels?: Array<CustomSidebarPanel>,
defaultView: string,
detailsSidebarProps: DetailsSidebarProps,
docGenSidebarProps?: DocGenSidebarProps,
Expand Down Expand Up @@ -358,6 +359,7 @@ class ContentSidebar extends React.Component<Props, State> {
boxAISidebarProps,
className,
currentUser,
customSidebarPanels,
defaultView,
shouldFetchSidebarData,
detailsSidebarProps,
Expand Down Expand Up @@ -408,6 +410,7 @@ class ContentSidebar extends React.Component<Props, State> {
className={className}
currentUser={currentUser}
shouldFetchSidebarData={shouldFetchSidebarData}
customSidebarPanels={customSidebarPanels}
detailsSidebarProps={detailsSidebarProps}
docGenSidebarProps={docGenSidebarProps}
file={displayFile}
Expand Down
20 changes: 14 additions & 6 deletions src/elements/content-sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import type { DocGenSidebarProps } from './DocGenSidebar/DocGenSidebar';
import type { MetadataSidebarProps } from './MetadataSidebar';
import type { BoxAISidebarProps } from './BoxAISidebar';
import type { VersionsSidebarProps } from './versions';
import type { AdditionalSidebarTab } from './flowTypes';
import type { AdditionalSidebarTab, CustomSidebarPanel } from './flowTypes';
import type { MetadataEditor } from '../../common/types/metadata';
import type { BoxItem, User } from '../../common/types/core';
import type { SignSidebarProps } from './SidebarNavSign';
import type { Errors } from '../common/flowTypes';
// $FlowFixMe TypeScript file
import type { Theme } from '../common/theming';
import { SIDEBAR_VIEW_DOCGEN } from '../../constants';
import { SIDEBAR_VIEW_DOCGEN, SIDEBAR_VIEW_BOXAI } from '../../constants';
import API from '../../api';

type Props = {
Expand All @@ -46,6 +46,7 @@ type Props = {
className: string,
currentUser?: User,
currentUserError?: Errors,
customSidebarPanels?: Array<CustomSidebarPanel>,
detailsSidebarProps: DetailsSidebarProps,
docGenSidebarProps: DocGenSidebarProps,
features: FeatureConfig,
Expand Down Expand Up @@ -300,6 +301,7 @@ class Sidebar extends React.Component<Props, State> {
currentUser,
currentUserError,
shouldFetchSidebarData,
customSidebarPanels = [],
detailsSidebarProps,
docGenSidebarProps,
file,
Expand All @@ -319,15 +321,19 @@ class Sidebar extends React.Component<Props, State> {
versionsSidebarProps,
}: Props = this.props;
const isOpen = this.isOpen();
const hasBoxAI = SidebarUtils.canHaveBoxAISidebar(this.props);

const hasCustomBoxAISidebar = customSidebarPanels.some(panel => panel.id === SIDEBAR_VIEW_BOXAI);
const isBoxAIEnabled = SidebarUtils.canHaveBoxAISidebar(this.props);
// Custom Box AI takes precedence over native when both exist
const hasNativeBoxAISidebar = isBoxAIEnabled && !hasCustomBoxAISidebar;
const hasActivity = SidebarUtils.canHaveActivitySidebar(this.props);
const hasDetails = SidebarUtils.canHaveDetailsSidebar(this.props);
const hasMetadata = SidebarUtils.shouldRenderMetadataSidebar(this.props, metadataEditors);
const hasSkills = SidebarUtils.shouldRenderSkillsSidebar(this.props, file);
const onVersionHistoryClick = hasVersions ? this.handleVersionHistoryClick : this.props.onVersionHistoryClick;
const styleClassName = classNames('be bcs', className, {
'bcs-is-open': isOpen,
'bcs-is-wider': hasBoxAI,
'bcs-is-wider': hasNativeBoxAISidebar || hasCustomBoxAISidebar,
});
const defaultPanel = this.getDefaultPanel();

Expand All @@ -343,11 +349,12 @@ class Sidebar extends React.Component<Props, State> {
{hasNav && (
<SidebarNav
additionalTabs={additionalTabs}
customSidebarPanels={customSidebarPanels}
elementId={this.id}
fileId={fileId}
hasActivity={hasActivity}
hasAdditionalTabs={hasAdditionalTabs}
hasBoxAI={hasBoxAI}
hasNativeBoxAISidebar={hasNativeBoxAISidebar}
hasDetails={hasDetails}
hasMetadata={hasMetadata}
hasSkills={hasSkills}
Expand All @@ -363,6 +370,7 @@ class Sidebar extends React.Component<Props, State> {
currentUser={currentUser}
currentUserError={currentUserError}
shouldFetchSidebarData={shouldFetchSidebarData}
customSidebarPanels={customSidebarPanels}
elementId={this.id}
defaultPanel={defaultPanel}
detailsSidebarProps={detailsSidebarProps}
Expand All @@ -372,7 +380,7 @@ class Sidebar extends React.Component<Props, State> {
getPreview={getPreview}
getViewer={getViewer}
hasActivity={hasActivity}
hasBoxAI={hasBoxAI}
hasNativeBoxAISidebar={hasNativeBoxAISidebar}
hasDetails={hasDetails}
hasDocGen={docGenSidebarProps.isDocGenTemplate}
hasMetadata={hasMetadata}
Expand Down
Loading