Merge pull request #4154 from redhoyasa/read-only-view

Disable the view dropdown selector on public "read-only"
This commit is contained in:
Winson Wu 2023-01-11 13:48:36 -05:00 committed by GitHub
commit 9c22e72f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 64 deletions

View File

@ -2025,22 +2025,6 @@ exports[`components/centerPanel return centerPanel and press touch 1 with readon
title="view title"
value="view title"
/>
<div>
<div
aria-label="View menu"
class="MenuWrapper"
role="button"
>
<button
class="IconButton"
type="button"
>
<i
class="CompassIcon icon-chevron-down DropdownIcon"
/>
</button>
</div>
</div>
</div>
<div
class="octo-spacer"

View File

@ -903,21 +903,6 @@ exports[`src/components/workspace return workspace readonly and showcard 1`] = `
title="view title"
value="view title"
/>
<div>
<div
aria-label="View menu"
class="MenuWrapper"
role="button"
>
<button
type="button"
>
<i
class="CompassIcon icon-chevron-down DropdownIcon"
/>
</button>
</div>
</div>
</div>
<div
class="octo-spacer"
@ -2029,21 +2014,6 @@ exports[`src/components/workspace should match snapshot with readonly 1`] = `
title="view title"
value="view title"
/>
<div>
<div
aria-label="View menu"
class="MenuWrapper"
role="button"
>
<button
type="button"
>
<i
class="CompassIcon icon-chevron-down DropdownIcon"
/>
</button>
</div>
</div>
</div>
<div
class="octo-spacer"

View File

@ -166,22 +166,6 @@ exports[`components/viewHeader/viewHeader return viewHeader readonly 1`] = `
title="view title"
value="view title"
/>
<div>
<div
aria-label="View menu"
class="MenuWrapper"
role="button"
>
<button
class="IconButton"
type="button"
>
<i
class="CompassIcon icon-chevron-down DropdownIcon"
/>
</button>
</div>
</div>
</div>
<div
class="octo-spacer"

View File

@ -149,7 +149,7 @@ const ViewHeader = (props: Props) => {
spellCheck={true}
autoExpand={false}
/>
<div>
{!props.readonly && (<div>
<MenuWrapper label={intl.formatMessage({id: 'ViewHeader.view-menu', defaultMessage: 'View menu'})}>
<IconButton icon={<DropdownIcon/>}/>
<ViewMenu
@ -161,7 +161,8 @@ const ViewHeader = (props: Props) => {
/>
</MenuWrapper>
{showAddViewTourStep && <AddViewTourStep/>}
</div>
</div>)}
</div>
<div className='octo-spacer'/>