mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add info and hover tooltips
Summary: Adds tooltip buttons to various parts of the UI that either open a popup with information when clicked, or show a label on hover. Test Plan: Project tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3657
This commit is contained in:
@@ -7,6 +7,7 @@ import {AccountWidget} from 'app/client/ui/AccountWidget';
|
||||
import {buildNotifyMenuButton} from 'app/client/ui/NotifyUI';
|
||||
import {manageTeamUsersApp} from 'app/client/ui/OpenUserManager';
|
||||
import {buildShareMenuButton} from 'app/client/ui/ShareMenu';
|
||||
import {hoverTooltip} from 'app/client/ui/tooltips';
|
||||
import {cssHoverCircle, cssTopBarBtn} from 'app/client/ui/TopBarCss';
|
||||
import {docBreadcrumbs} from 'app/client/ui2018/breadcrumbs';
|
||||
import {basicButton} from 'app/client/ui2018/buttons';
|
||||
@@ -80,11 +81,13 @@ export function createTopBarDoc(owner: MultiHolder, appModel: AppModel, pageMode
|
||||
dom.maybe(pageModel.undoState, (state) => [
|
||||
topBarUndoBtn('Undo',
|
||||
dom.on('click', () => state.isUndoDisabled.get() || allCommands.undo.run()),
|
||||
hoverTooltip('Undo', {key: 'topBarBtnTooltip'}),
|
||||
cssHoverCircle.cls('-disabled', state.isUndoDisabled),
|
||||
testId('undo')
|
||||
),
|
||||
topBarUndoBtn('Redo',
|
||||
dom.on('click', () => state.isRedoDisabled.get() || allCommands.redo.run()),
|
||||
hoverTooltip('Redo', {key: 'topBarBtnTooltip'}),
|
||||
cssHoverCircle.cls('-disabled', state.isRedoDisabled),
|
||||
testId('redo')
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user