mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) remove the sort&filter save button on readonly mode
Summary: Saving sort or filter is not permitted in readonly mode. Hence we remove the button. The diff adds a new unit to Test Plan: Adds test for behaviour to `nbrowser/ReadOnlyMode`. Also adds tests for other Save buttons related to sort & filter that should be disabled. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2804
This commit is contained in:
parent
8056bb0069
commit
9a6369a4ff
@ -86,6 +86,7 @@ export function viewSectionMenu(owner: IDisposableOwner, docModel: DocModel, vie
|
||||
dom.on('click', save),
|
||||
hoverTooltip(() => 'Save', {key: 'sortFilterButton', openDelay: TOOLTIP_DELAY_OPEN}),
|
||||
testId('small-btn-save'),
|
||||
dom.hide(isReadonly),
|
||||
),
|
||||
cssSmallIconWrapper(
|
||||
cssIcon('CrossSmall'), cssSmallIconWrapper.cls('-gray'),
|
||||
@ -346,6 +347,8 @@ const cssSmallIconWrapper = styled('div', `
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 8px;
|
||||
margin: 0 5px 0 5px;
|
||||
|
||||
&-green {
|
||||
background-color: ${colors.lightGreen};
|
||||
}
|
||||
@ -359,8 +362,7 @@ const cssSmallIconWrapper = styled('div', `
|
||||
|
||||
|
||||
const cssSaveIconsWrapper = styled('div', `
|
||||
padding: 0 6px 0 6px;
|
||||
padding: 0 1px 0 1px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 54px;
|
||||
`);
|
||||
|
Loading…
Reference in New Issue
Block a user