Skip to content

Commit 4566416

Browse files
authored
refactor: tooltips (#2382)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 8fdc612 commit 4566416

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

src/renderer/components/Sidebar.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export const Sidebar: FC = () => {
8585
onClick={() => navigate('/', { replace: true })}
8686
size="small"
8787
tooltipDirection="e"
88-
unsafeDisableTooltip={false}
8988
variant="invisible"
9089
/>
9190

@@ -97,7 +96,6 @@ export const Sidebar: FC = () => {
9796
onClick={() => openGitHubNotifications(primaryAccountHostname)}
9897
size="small"
9998
tooltipDirection="e"
100-
unsafeDisableTooltip={false}
10199
variant={hasUnreadNotifications ? 'primary' : 'invisible'}
102100
/>
103101

@@ -110,7 +108,6 @@ export const Sidebar: FC = () => {
110108
onClick={() => toggleFilters()}
111109
size="small"
112110
tooltipDirection="e"
113-
unsafeDisableTooltip={false}
114111
variant={hasActiveFilters(settings) ? 'primary' : 'invisible'}
115112
/>
116113
)}
@@ -122,7 +119,6 @@ export const Sidebar: FC = () => {
122119
onClick={() => openGitHubIssues(primaryAccountHostname)}
123120
size="small"
124121
tooltipDirection="e"
125-
unsafeDisableTooltip={false}
126122
variant="invisible"
127123
/>
128124

@@ -133,7 +129,6 @@ export const Sidebar: FC = () => {
133129
onClick={() => openGitHubPulls(primaryAccountHostname)}
134130
size="small"
135131
tooltipDirection="e"
136-
unsafeDisableTooltip={false}
137132
variant="invisible"
138133
/>
139134
</Stack>
@@ -156,7 +151,6 @@ export const Sidebar: FC = () => {
156151
onClick={() => refreshNotifications()}
157152
size="small"
158153
tooltipDirection="e"
159-
unsafeDisableTooltip={false}
160154
variant="invisible"
161155
/>
162156

@@ -167,7 +161,6 @@ export const Sidebar: FC = () => {
167161
onClick={() => toggleSettings()}
168162
size="small"
169163
tooltipDirection="e"
170-
unsafeDisableTooltip={false}
171164
variant="invisible"
172165
/>
173166
</>
@@ -181,7 +174,6 @@ export const Sidebar: FC = () => {
181174
onClick={() => quitApp()}
182175
size="small"
183176
tooltipDirection="e"
184-
unsafeDisableTooltip={false}
185177
variant="invisible"
186178
/>
187179
)}

src/renderer/components/fields/Tooltip.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { type FC, type ReactNode, useState } from 'react';
33
import { QuestionIcon } from '@primer/octicons-react';
44
import { AnchoredOverlay } from '@primer/react';
55

6+
import { cn } from '../../utils/cn';
7+
68
export interface ITooltip {
79
name: string;
810
tooltip: ReactNode | string;
@@ -31,9 +33,11 @@ export const Tooltip: FC<ITooltip> = (props: ITooltip) => {
3133
side="outside-bottom"
3234
>
3335
<div
34-
className={
35-
'z-10 w-60 rounded-sm border border-gray-300 p-2 shadow-sm bg-gitify-tooltip-popout text-left text-xs text-gitify-font'
36-
}
36+
className={cn(
37+
'z-10 w-60 p-2',
38+
'text-left text-xs text-gitify-font',
39+
'rounded-sm border border-gray-300 shadow-sm bg-gitify-tooltip-popout',
40+
)}
3741
>
3842
{props.tooltip}
3943
</div>

src/renderer/components/settings/SettingsFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const SettingsFooter: FC = () => {
2424
return (
2525
<Footer justify="space-between">
2626
<Stack direction="horizontal">
27-
<Tooltip direction="n" text="View release notes">
27+
<Tooltip direction="ne" text="View release notes">
2828
<Button
2929
data-testid="settings-release-notes"
3030
onClick={() => openGitifyReleaseNotes(appVersion)}

src/renderer/routes/__snapshots__/Settings.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)