Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 70cd4ee

Browse files
revert open sidebar button to left of file menu
1 parent 7c32fe1 commit 70cd4ee

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

client/web/src/repo/RepoRevisionSidebar.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type FC, useCallback, useState } from 'react'
22

3-
import { mdiPageLayoutSidebarRight } from '@mdi/js'
3+
import { mdiChevronDoubleLeft, mdiPageLayoutSidebarRight } from '@mdi/js'
44
import classNames from 'classnames'
55

66
import type { Scalars } from '@sourcegraph/shared/src/graphql-operations'
@@ -83,16 +83,6 @@ export const RepoRevisionSidebar: FC<RepoRevisionSidebarProps> = props => {
8383
storageKey={SIZE_STORAGE_KEY}
8484
ariaLabel="File sidebar"
8585
>
86-
<Tooltip content="Hide sidebar" placement="right">
87-
<Button
88-
aria-label="Hide sidebar"
89-
variant="icon"
90-
className={classNames('position-absolute border mr-2', styles.toggle)}
91-
onClick={() => props.handleSidebarToggle(false)}
92-
>
93-
<Icon aria-hidden={true} svgPath={mdiPageLayoutSidebarRight} />
94-
</Button>
95-
</Tooltip>
9686
<div className="d-flex flex-column h-100 w-100">
9787
{showOnboardingTour && (
9888
<GettingStartedTour
@@ -110,7 +100,24 @@ export const RepoRevisionSidebar: FC<RepoRevisionSidebarProps> = props => {
110100
// position, which tree is expanded)
111101
behavior="memoize"
112102
>
113-
<TabList wrapperClassName="mr-3 ml-5">
103+
<TabList
104+
wrapperClassName="mr-3"
105+
actions={
106+
<Tooltip content="Hide sidebar" placement="right">
107+
<Button
108+
aria-label="Hide sidebar"
109+
onClick={() => props.handleSidebarToggle(false)}
110+
className="bg-transparent border-0 ml-auto p-1 position-relative focus-behaviour"
111+
>
112+
<Icon
113+
className={styles.closeIcon}
114+
aria-hidden={true}
115+
svgPath={mdiChevronDoubleLeft}
116+
/>
117+
</Button>
118+
</Tooltip>
119+
}
120+
>
114121
<Tab data-tab-content="files">
115122
<span className="tablist-wrapper--tab-label">Files</span>
116123
</Tab>

client/web/src/repo/blob/own/HistoryAndOwnBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useCallback, useEffect } from 'react'
22

3-
import { mdiAccount, mdiPageLayoutSidebarLeft } from '@mdi/js'
3+
import { mdiAccount, mdiChevronDoubleRight, mdiPageLayoutSidebarLeft } from '@mdi/js'
44
import classNames from 'classnames'
55
import { useNavigate } from 'react-router-dom'
66

@@ -97,7 +97,7 @@ export const HistoryAndOwnBar: React.FunctionComponent<{
9797
display="inline"
9898
onClick={() => handleSidebarToggle(true)}
9999
>
100-
<Icon aria-hidden={true} svgPath={mdiPageLayoutSidebarLeft} />
100+
<Icon aria-hidden={true} svgPath={mdiChevronDoubleRight} />
101101
</Button>
102102
</Tooltip>
103103
)}

0 commit comments

Comments
 (0)