mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Add tooltip for the opener icon for the Creator Panel
Test Plan: Tested manually. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3830
This commit is contained in:
parent
12f9567ff4
commit
22dbab0123
@ -1,10 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* Note that it assumes the presence of cssVars.cssRootVars on <body>.
|
* Note that it assumes the presence of cssVars.cssRootVars on <body>.
|
||||||
*/
|
*/
|
||||||
|
import {makeT} from 'app/client/lib/localization';
|
||||||
import * as commands from 'app/client/components/commands';
|
import * as commands from 'app/client/components/commands';
|
||||||
import {watchElementForBlur} from 'app/client/lib/FocusLayer';
|
import {watchElementForBlur} from 'app/client/lib/FocusLayer';
|
||||||
import {urlState} from "app/client/models/gristUrlState";
|
import {urlState} from "app/client/models/gristUrlState";
|
||||||
import {resizeFlexVHandle} from 'app/client/ui/resizeHandle';
|
import {resizeFlexVHandle} from 'app/client/ui/resizeHandle';
|
||||||
|
import {hoverTooltip} from 'app/client/ui/tooltips';
|
||||||
import {transition, TransitionWatcher} from 'app/client/ui/transitions';
|
import {transition, TransitionWatcher} from 'app/client/ui/transitions';
|
||||||
import {cssHideForNarrowScreen, isScreenResizing, mediaNotSmall, mediaSmall, theme} from 'app/client/ui2018/cssVars';
|
import {cssHideForNarrowScreen, isScreenResizing, mediaNotSmall, mediaSmall, theme} from 'app/client/ui2018/cssVars';
|
||||||
import {isNarrowScreenObs} from 'app/client/ui2018/cssVars';
|
import {isNarrowScreenObs} from 'app/client/ui2018/cssVars';
|
||||||
@ -17,6 +19,8 @@ import once from 'lodash/once';
|
|||||||
import {SessionObs} from 'app/client/lib/sessionObs';
|
import {SessionObs} from 'app/client/lib/sessionObs';
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
|
|
||||||
|
const t = makeT('PagePanels');
|
||||||
|
|
||||||
const AUTO_EXPAND_TIMEOUT_MS = 400;
|
const AUTO_EXPAND_TIMEOUT_MS = 400;
|
||||||
|
|
||||||
// delay must be greater than the time needed for transientInput to update focus (ie: 10ms);
|
// delay must be greater than the time needed for transientInput to update focus (ie: 10ms);
|
||||||
@ -280,6 +284,8 @@ export function pagePanels(page: PageContents) {
|
|||||||
cssPanelOpener('PanelLeft', cssPanelOpener.cls('-open', right.panelOpen),
|
cssPanelOpener('PanelLeft', cssPanelOpener.cls('-open', right.panelOpen),
|
||||||
testId('right-opener'),
|
testId('right-opener'),
|
||||||
dom.cls('tour-creator-panel'),
|
dom.cls('tour-creator-panel'),
|
||||||
|
hoverTooltip(() => (right.panelOpen.get() ? t('Close Creator Panel') : t('Open Creator Panel')),
|
||||||
|
{key: 'topBarBtnTooltip'}),
|
||||||
dom.on('click', () => toggleObs(right.panelOpen)),
|
dom.on('click', () => toggleObs(right.panelOpen)),
|
||||||
cssHideForNarrowScreen.cls(''))
|
cssHideForNarrowScreen.cls(''))
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user