Skip to content

Commit a771ad9

Browse files
authored
fix: add tooltips to all DM toolbar items COMPASS-9830 (#7443)
1 parent d4319c3 commit a771ad9

File tree

1 file changed

+45
-21
lines changed

1 file changed

+45
-21
lines changed

packages/compass-data-modeling/src/components/diagram-editor-toolbar.tsx

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,44 @@ export const DiagramEditorToolbar: React.FunctionComponent<{
9898
data-testid="diagram-editor-toolbar"
9999
>
100100
<div className={toolbarGroupStyles}>
101-
<IconButton
102-
aria-label="Undo"
103-
disabled={!hasUndo}
104-
onClick={onUndoClick}
101+
<Tooltip
102+
trigger={
103+
<IconButton
104+
aria-label="Undo"
105+
disabled={!hasUndo}
106+
onClick={onUndoClick}
107+
>
108+
<Icon glyph="Undo"></Icon>
109+
</IconButton>
110+
}
105111
>
106-
<Icon glyph="Undo"></Icon>
107-
</IconButton>
108-
<IconButton
109-
aria-label="Redo"
110-
disabled={!hasRedo}
111-
onClick={onRedoClick}
112+
Undo
113+
</Tooltip>
114+
<Tooltip
115+
trigger={
116+
<IconButton
117+
aria-label="Redo"
118+
disabled={!hasRedo}
119+
onClick={onRedoClick}
120+
>
121+
<Icon glyph="Redo"></Icon>
122+
</IconButton>
123+
}
112124
>
113-
<Icon glyph="Redo"></Icon>
114-
</IconButton>
115-
<IconButton
116-
aria-label="Add Collection"
117-
onClick={onAddCollectionClick}
125+
Redo
126+
</Tooltip>
127+
<Tooltip
128+
trigger={
129+
<IconButton
130+
aria-label="Add Collection"
131+
onClick={onAddCollectionClick}
132+
>
133+
<AddCollection />
134+
</IconButton>
135+
}
118136
>
119-
<AddCollection />
120-
</IconButton>
137+
Add a new collection
138+
</Tooltip>
121139
<Tooltip
122140
trigger={
123141
<IconButton
@@ -134,13 +152,19 @@ export const DiagramEditorToolbar: React.FunctionComponent<{
134152
</IconButton>
135153
}
136154
>
137-
Drag from one collection to another to create a relationship.
155+
Add a relationship by dragging from one collection to another
138156
</Tooltip>
139157
</div>
140158
<div className={toolbarGroupStyles}>
141-
<Button size="xsmall" aria-label="Export" onClick={onExportClick}>
142-
<Icon glyph="Export"></Icon>
143-
</Button>
159+
<Tooltip
160+
trigger={
161+
<Button size="xsmall" aria-label="Export" onClick={onExportClick}>
162+
<Icon glyph="Export"></Icon>
163+
</Button>
164+
}
165+
>
166+
Export data model
167+
</Tooltip>
144168
</div>
145169
</div>
146170
</div>

0 commit comments

Comments
 (0)