|
@@ -23,6 +23,7 @@ import overleafLogo from '@/shared/svgs/overleaf-a-ds-solution-mallard.svg'
|
|
|
import overleafLogoDark from '@/shared/svgs/overleaf-a-ds-solution-mallard-dark.svg'
|
|
import overleafLogoDark from '@/shared/svgs/overleaf-a-ds-solution-mallard-dark.svg'
|
|
|
import CookieBanner from '@/shared/components/cookie-banner'
|
|
import CookieBanner from '@/shared/components/cookie-banner'
|
|
|
import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme'
|
|
import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme'
|
|
|
|
|
+import { isSplitTestEnabled } from '@/utils/splitTestUtils'
|
|
|
|
|
|
|
|
export function ProjectListDsNav() {
|
|
export function ProjectListDsNav() {
|
|
|
const navbarProps = getMeta('ol-navbar')
|
|
const navbarProps = getMeta('ol-navbar')
|
|
@@ -38,27 +39,48 @@ export function ProjectListDsNav() {
|
|
|
selectedTagId,
|
|
selectedTagId,
|
|
|
} = useProjectListContext()
|
|
} = useProjectListContext()
|
|
|
const activeOverallTheme = useActiveOverallTheme()
|
|
const activeOverallTheme = useActiveOverallTheme()
|
|
|
|
|
+ const isLibraryEnabled = isSplitTestEnabled('overleaf-library')
|
|
|
|
|
|
|
|
const selectedTag = tags.find(tag => tag._id === selectedTagId)
|
|
const selectedTag = tags.find(tag => tag._id === selectedTagId)
|
|
|
|
|
|
|
|
const tableTopArea = (
|
|
const tableTopArea = (
|
|
|
<div className="pt-2 pb-3 d-md-none d-flex gap-2">
|
|
<div className="pt-2 pb-3 d-md-none d-flex gap-2">
|
|
|
- <NewProjectButton
|
|
|
|
|
- id="new-project-button-projects-table"
|
|
|
|
|
- showAddAffiliationWidget
|
|
|
|
|
- />
|
|
|
|
|
- <SearchForm
|
|
|
|
|
- inputValue={searchText}
|
|
|
|
|
- setInputValue={setSearchText}
|
|
|
|
|
- filter={filter}
|
|
|
|
|
- selectedTag={selectedTag}
|
|
|
|
|
- className="overflow-hidden flex-grow-1"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ {isLibraryEnabled ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <SearchForm
|
|
|
|
|
+ inputValue={searchText}
|
|
|
|
|
+ setInputValue={setSearchText}
|
|
|
|
|
+ filter={filter}
|
|
|
|
|
+ selectedTag={selectedTag}
|
|
|
|
|
+ className="overflow-hidden flex-grow-1"
|
|
|
|
|
+ />
|
|
|
|
|
+ <NewProjectButton
|
|
|
|
|
+ id="new-project-button-projects-table"
|
|
|
|
|
+ showAddAffiliationWidget
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <NewProjectButton
|
|
|
|
|
+ id="new-project-button-projects-table"
|
|
|
|
|
+ showAddAffiliationWidget
|
|
|
|
|
+ />
|
|
|
|
|
+ <SearchForm
|
|
|
|
|
+ inputValue={searchText}
|
|
|
|
|
+ setInputValue={setSearchText}
|
|
|
|
|
+ filter={filter}
|
|
|
|
|
+ selectedTag={selectedTag}
|
|
|
|
|
+ className="overflow-hidden flex-grow-1"
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className="project-ds-nav-page website-redesign">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ className={`project-ds-nav-page website-redesign${isLibraryEnabled ? ' library-enabled' : ''}`}
|
|
|
|
|
+ >
|
|
|
<SystemMessages />
|
|
<SystemMessages />
|
|
|
<DefaultNavbar
|
|
<DefaultNavbar
|
|
|
{...navbarProps}
|
|
{...navbarProps}
|
|
@@ -96,8 +118,8 @@ export function ProjectListDsNav() {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="project-ds-nav-project-list">
|
|
<div className="project-ds-nav-project-list">
|
|
|
- <OLRow className="d-none d-md-block">
|
|
|
|
|
- <OLCol lg={7}>
|
|
|
|
|
|
|
+ <OLRow className="d-none d-md-flex align-items-center">
|
|
|
|
|
+ <OLCol md={isLibraryEnabled ? 8 : undefined} lg={7}>
|
|
|
<SearchForm
|
|
<SearchForm
|
|
|
inputValue={searchText}
|
|
inputValue={searchText}
|
|
|
setInputValue={setSearchText}
|
|
setInputValue={setSearchText}
|
|
@@ -105,6 +127,14 @@ export function ProjectListDsNav() {
|
|
|
selectedTag={selectedTag}
|
|
selectedTag={selectedTag}
|
|
|
/>
|
|
/>
|
|
|
</OLCol>
|
|
</OLCol>
|
|
|
|
|
+ {isLibraryEnabled && (
|
|
|
|
|
+ <OLCol className="ms-auto" xs="auto">
|
|
|
|
|
+ <NewProjectButton
|
|
|
|
|
+ id="new-project-button-projects-table"
|
|
|
|
|
+ showAddAffiliationWidget
|
|
|
|
|
+ />
|
|
|
|
|
+ </OLCol>
|
|
|
|
|
+ )}
|
|
|
</OLRow>
|
|
</OLRow>
|
|
|
<div className="project-list-sidebar-survey-wrapper d-md-none">
|
|
<div className="project-list-sidebar-survey-wrapper d-md-none">
|
|
|
{/* Omit the survey card in mobile view for now */}
|
|
{/* Omit the survey card in mobile view for now */}
|