-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(boxai-sidebar): Empty Sidebar for Box AI (#3668)
* feat(boxai-sidebar): PR fixes and Storybook test added * feat(boxai-sidebar): Empty Sidebar for Box AI * feat(boxai-sidebar): BoxAISidebar.tsx deleted * feat(boxai-sidebar): SidebarPanels.test.js test fixed * feat(boxai-sidebar): PR fixes * feat(boxai-sidebar): PR fixes * feat(boxai-sidebar): Storybook test fixes * feat(boxai-sidebar): Fixed UT * chore(i18n): translations * Resolved issue with flow check * feat(boxai-sidebar): flow check fixes * chore(boxai-sidebar): BoxAISidebar.stories.tsx small fix * chore(boxai-sidebar): PR fixes * chore(boxai-sidebar): PR fixes --------- Co-authored-by: Danila Rubleuski <drubleuski@box.com> Co-authored-by: Greg Wong <gregorywong@box.com> Co-authored-by: kkuliczkowski <kkuliczkowski@box.com> Co-authored-by: greg-in-a-box <103291617+greg-in-a-box@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
47ba331
commit 611377c
Showing
21 changed files
with
316 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Flowtype definitions for BoxAISidebar.tsx | ||
* Generated by Flowgen from a Typescript Definition | ||
* Flowgen v1.21.0 | ||
*/ | ||
|
||
import * as React from "react"; | ||
import flow from "lodash/flow"; | ||
import { useIntl } from "react-intl"; | ||
import SidebarContent from "./SidebarContent"; | ||
import { withAPIContext } from "../common/api-context"; | ||
import { withErrorBoundary } from "../common/error-boundary"; | ||
import { withLogger } from "../common/logger"; | ||
import { ORIGIN_BOXAI_SIDEBAR, SIDEBAR_VIEW_BOXAI } from "../../constants"; | ||
import { EVENT_JS_READY } from "../common/logger/constants"; | ||
import { mark } from "../../utils/performance"; | ||
import messages from "../common/messages"; | ||
declare var MARK_NAME_JS_READY: string; | ||
export interface BoxAISidebarProps { | ||
onExpandPressed: () => void; | ||
} | ||
declare function BoxAISidebar(): void; | ||
declare export { BoxAISidebar as BoxAISidebarComponent }; | ||
declare var BoxAISidebarDefaultExport: typeof withAPIContext; | ||
declare export default typeof BoxAISidebarDefaultExport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* @file Redesigned Metadata sidebar component | ||
* @author Box | ||
*/ | ||
import * as React from 'react'; | ||
import flow from 'lodash/flow'; | ||
import { useIntl } from 'react-intl'; | ||
|
||
import SidebarContent from './SidebarContent'; | ||
import { withAPIContext } from '../common/api-context'; | ||
import { withErrorBoundary } from '../common/error-boundary'; | ||
import { withLogger } from '../common/logger'; | ||
import { ORIGIN_BOXAI_SIDEBAR, SIDEBAR_VIEW_BOXAI } from '../../constants'; | ||
import { EVENT_JS_READY } from '../common/logger/constants'; | ||
import { mark } from '../../utils/performance'; | ||
|
||
import messages from '../common/messages'; | ||
|
||
const MARK_NAME_JS_READY: string = `${ORIGIN_BOXAI_SIDEBAR}_${EVENT_JS_READY}`; | ||
|
||
mark(MARK_NAME_JS_READY); | ||
|
||
export interface BoxAISidebarProps { | ||
onExpandPressed: () => void; | ||
} | ||
|
||
function BoxAISidebar() { | ||
const { formatMessage } = useIntl(); | ||
|
||
return ( | ||
<SidebarContent | ||
className={'bcs-BoxAISidebar'} | ||
sidebarView={SIDEBAR_VIEW_BOXAI} | ||
title={formatMessage(messages.sidebarBoxAITitle)} | ||
> | ||
<div className="bcs-BoxAISidebar-content" /> | ||
</SidebarContent> | ||
); | ||
} | ||
|
||
export { BoxAISidebar as BoxAISidebarComponent }; | ||
|
||
const BoxAISidebarDefaultExport: typeof withAPIContext = flow([ | ||
withLogger(ORIGIN_BOXAI_SIDEBAR), | ||
withErrorBoundary(ORIGIN_BOXAI_SIDEBAR), | ||
withAPIContext, | ||
])(BoxAISidebar); | ||
|
||
export default BoxAISidebarDefaultExport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.