Skip to content

Commit 5538b2a

Browse files
Add tooltips
1 parent eb5d8f1 commit 5538b2a

File tree

3 files changed

+46
-17
lines changed

3 files changed

+46
-17
lines changed

src/frontend/src/components/common/TeamSelector.tsx

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,21 @@ const TeamSelector: React.FC<TeamSelectorProps> = ({
481481
/>
482482
</Tooltip>
483483
) : (
484-
<Button
485-
icon={<DeleteRegular />}
486-
appearance="subtle"
487-
size="small"
488-
onClick={(e: React.MouseEvent) => handleDeleteTeam(team, e)}
489-
className={styles.deleteButton}
490-
/>
484+
<Tooltip
485+
content="Delete"
486+
relationship="label"
487+
positioning="above"
488+
withArrow
489+
mountNode={document.querySelector('[role="dialog"]') || undefined}
490+
>
491+
<Button
492+
icon={<DeleteRegular />}
493+
appearance="subtle"
494+
size="small"
495+
onClick={(e: React.MouseEvent) => handleDeleteTeam(team, e)}
496+
className={styles.deleteButton}
497+
/>
498+
</Tooltip>
491499
)}
492500
</div>
493501
);
@@ -516,13 +524,20 @@ const TeamSelector: React.FC<TeamSelectorProps> = ({
516524
<DialogSurface className={styles.dialogSurface}>
517525
<DialogTitle className={styles.dialogTitle}>
518526
<span>Select a Team</span>
519-
<Button
520-
icon={<Dismiss20Regular />}
521-
appearance="subtle"
522-
size="small"
523-
onClick={handleCancel}
524-
className={styles.closeButton}
525-
/>
527+
<Tooltip
528+
content="Close"
529+
relationship="label"
530+
positioning="below"
531+
withArrow
532+
>
533+
<Button
534+
icon={<Dismiss20Regular />}
535+
appearance="subtle"
536+
size="small"
537+
onClick={handleCancel}
538+
className={styles.closeButton}
539+
/>
540+
</Tooltip>
526541
</DialogTitle>
527542
<DialogContent className={styles.dialogContent}>
528543
<DialogBody className={styles.dialogBody}>

src/frontend/src/components/content/HomeInput.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {
22
Body1Strong,
33
Button,
44
Caption1,
5-
Title2
5+
Title2,
6+
Tooltip
67
} from "@fluentui/react-components";
78

89
import React, { useRef, useEffect, useState } from "react";
@@ -226,14 +227,20 @@ const HomeInput: React.FC<HomeInputProps> = ({ selectedTeam }) => {
226227
onChange={setInput}
227228
onEnter={handleSubmit}
228229
disabledChat={submitting}
230+
>
231+
<Tooltip
232+
content="Send"
233+
relationship="label"
234+
positioning="above"
235+
withArrow
229236
>
230237
<Button
231238
appearance="subtle"
232239
className="home-input-send-button"
233240
onClick={handleSubmit}
234241
disabled={submitting}
235242
icon={<Send />}
236-
/>
243+
/></Tooltip>
237244
</ChatInput>
238245

239246
<InlineToaster />

src/frontend/src/components/content/PlanChatBody.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ChatInput from "@/coral/modules/ChatInput";
22
import { PlanChatProps } from "@/models";
3-
import { Button } from "@fluentui/react-components";
3+
import { Button, Tooltip } from "@fluentui/react-components";
44
import { Send } from "@/coral/imports/bundleicons";
55

66
interface SimplifiedPlanChatProps extends PlanChatProps {
@@ -51,6 +51,12 @@ const PlanChatBody: React.FC<SimplifiedPlanChatProps> = ({
5151
boxSizing: 'border-box',
5252
}}
5353
>
54+
<Tooltip
55+
content="Send"
56+
relationship="label"
57+
positioning="above"
58+
withArrow
59+
>
5460
<Button
5561
appearance="subtle"
5662
className="home-input-send-button"
@@ -69,6 +75,7 @@ const PlanChatBody: React.FC<SimplifiedPlanChatProps> = ({
6975
flexShrink: 0,
7076
}}
7177
/>
78+
</Tooltip>
7279
</ChatInput>
7380
</div>
7481
);

0 commit comments

Comments
 (0)