(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
pull/472/head
Dmitry S 1 year ago
parent 12f9567ff4
commit 22dbab0123

@ -1,10 +1,12 @@
/**
* 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 {watchElementForBlur} from 'app/client/lib/FocusLayer';
import {urlState} from "app/client/models/gristUrlState";
import {resizeFlexVHandle} from 'app/client/ui/resizeHandle';
import {hoverTooltip} from 'app/client/ui/tooltips';
import {transition, TransitionWatcher} from 'app/client/ui/transitions';
import {cssHideForNarrowScreen, isScreenResizing, mediaNotSmall, mediaSmall, theme} 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 debounce from 'lodash/debounce';
const t = makeT('PagePanels');
const AUTO_EXPAND_TIMEOUT_MS = 400;
// 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),
testId('right-opener'),
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)),
cssHideForNarrowScreen.cls(''))
),

Loading…
Cancel
Save