Skip to content

Commit 0d79ef4

Browse files
authored
fix: hover interaction with more button (#7020)
* fix: hover interaction with more button * fix: variant for square IconButton * chore: comment
1 parent 34777c2 commit 0d79ef4

File tree

14 files changed

+63
-10
lines changed

14 files changed

+63
-10
lines changed

packages/app/src/app/components/CreateSandbox/CreateSandbox.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,14 @@ export const CreateSandbox: React.FC<CreateSandboxProps> = ({
220220
// TODO: add aria-label based on title to IconButton?
221221
<IconButton
222222
name="arrowDown"
223+
variant="square"
223224
size={16}
224225
title="Back to overview"
225226
css={{
226227
transform: 'rotate(90deg)',
228+
'&:active:not(:disabled)': {
229+
transform: 'rotate(90deg)',
230+
},
227231
}}
228232
onClick={() => {
229233
setViewState('initial');
@@ -255,6 +259,7 @@ export const CreateSandbox: React.FC<CreateSandboxProps> = ({
255259
// TODO: IconButton doesn't have aria label or visuallyhidden text (reads floating label too late)
256260
<IconButton
257261
name="cross"
262+
variant="square"
258263
size={16}
259264
title="Close modal"
260265
onClick={() => actions.modals.newSandboxModal.close()}

packages/app/src/app/pages/Dashboard/Components/Branch/BranchCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export const BranchCard: React.FC<BranchProps> = ({
4343
':hover': {
4444
backgroundColor: 'card.backgroundHover',
4545
},
46+
':has(button:hover)': {
47+
backgroundColor: 'card.background',
48+
},
4649
':focus-visible': {
4750
borderColor: 'focusBorder',
4851
},
@@ -90,8 +93,9 @@ export const BranchCard: React.FC<BranchProps> = ({
9093
</Text>
9194
</Tooltip>
9295
<IconButton
96+
variant="square"
9397
name="more"
94-
size={9}
98+
size={14}
9599
title="Branch actions"
96100
onClick={evt => {
97101
evt.stopPropagation();

packages/app/src/app/pages/Dashboard/Components/Branch/BranchListItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export const BranchListItem = ({
4444
? 'purpleOpaque'
4545
: 'list.hoverBackground',
4646
},
47+
':has(button:hover)': {
48+
backgroundColor: 'transparent',
49+
},
4750
})}
4851
>
4952
<Element
@@ -96,8 +99,9 @@ export const BranchListItem = ({
9699
</Column>
97100
</Grid>
98101
<IconButton
102+
variant="square"
99103
name="more"
100-
size={9}
104+
size={14}
101105
title="Branch actions"
102106
onClick={evt => {
103107
evt.stopPropagation();

packages/app/src/app/pages/Dashboard/Components/Filters/SortOptions/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const SortOptions: FunctionComponent = React.memo(() => {
3636
<IconButton
3737
name="arrowDown"
3838
size={11}
39+
variant="square"
3940
title="Reverse sort direction"
4041
onClick={toggleSort}
4142
css={{ transform: `rotate(${order === 'desc' ? 0 : 180}deg)` }}

packages/app/src/app/pages/Dashboard/Components/Folder/FolderCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export const FolderCard: React.FC<FolderItemComponentProps> = ({
5454
':hover': {
5555
backgroundColor: 'card.backgroundHover',
5656
},
57+
':has(button:hover)': {
58+
backgroundColor: 'card.background',
59+
},
5760
':focus-visible': {
5861
borderColor: 'focusBorder',
5962
},
@@ -67,8 +70,9 @@ export const FolderCard: React.FC<FolderItemComponentProps> = ({
6770
>
6871
{!isNewFolder ? (
6972
<IconButton
73+
variant="square"
7074
name="more"
71-
size={9}
75+
size={14}
7276
title="Folder actions"
7377
onClick={onContextMenu}
7478
/>

packages/app/src/app/pages/Dashboard/Components/Folder/FolderListItem.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export const FolderListItem = ({
5656
cursor: 'default',
5757
backgroundColor: selected ? 'purpleOpaque' : 'list.hoverBackground',
5858
},
59+
':has(button:hover)': {
60+
backgroundColor: 'transparent',
61+
},
5962
width: '100%',
6063
height: 64,
6164
borderBottom: '1px solid',
@@ -73,7 +76,13 @@ export const FolderListItem = ({
7376
height: 32,
7477
})}
7578
>
76-
<Icon name="folder" size={24} width={32} title="folder" color="#E3FF73" />
79+
<Icon
80+
name="folder"
81+
size={24}
82+
width={32}
83+
title="folder"
84+
color="#E3FF73"
85+
/>
7786
</Stack>
7887
<Stack justify="space-between" align="center">
7988
{editing ? (
@@ -109,8 +118,9 @@ export const FolderListItem = ({
109118
</Grid>
110119
{!isNewFolder ? (
111120
<IconButton
121+
variant="square"
112122
name="more"
113-
size={9}
123+
size={14}
114124
title="Sandbox actions"
115125
onClick={onContextMenu}
116126
/>

packages/app/src/app/pages/Dashboard/Components/Notification/Notification.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export const Notification = ({ children, pageType }: NotificationProps) => {
5858
>
5959
<IconButton
6060
name="cross"
61+
variant="round"
6162
title="Dismiss notification"
6263
onClick={dismissNotification}
6364
/>

packages/app/src/app/pages/Dashboard/Components/Repository/RepositoryCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export const RepositoryCard: React.FC<RepositoryProps> = ({
3636
':hover': {
3737
backgroundColor: 'card.backgroundHover',
3838
},
39+
':has(button:hover)': {
40+
backgroundColor: 'card.background',
41+
},
3942
':focus-visible': {
4043
borderColor: 'focusBorder',
4144
},
@@ -51,8 +54,9 @@ export const RepositoryCard: React.FC<RepositoryProps> = ({
5154
marginLeft: 'auto',
5255
marginRight: 0,
5356
})}
57+
variant="square"
5458
name="more"
55-
size={9}
59+
size={14}
5660
title="Repository actions"
5761
onClick={evt => {
5862
evt.stopPropagation();

packages/app/src/app/pages/Dashboard/Components/Repository/RepositoryListItem.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export const RepositoryListItem: React.FC<RepositoryProps> = ({
4343
? 'purpleOpaque'
4444
: 'list.hoverBackground',
4545
},
46+
':has(button:hover)': {
47+
backgroundColor: 'transparent',
48+
},
4649
})}
4750
>
4851
<Element
@@ -85,8 +88,9 @@ export const RepositoryListItem: React.FC<RepositoryProps> = ({
8588
</Column>
8689
</Grid>
8790
<IconButton
91+
variant="square"
8892
name="more"
89-
size={9}
93+
size={14}
9094
title="Repository actions"
9195
onClick={evt => {
9296
evt.stopPropagation();

packages/app/src/app/pages/Dashboard/Components/Sandbox/SandboxCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ const SandboxTitle: React.FC<SandboxTitleProps> = React.memo(
131131
</div>
132132
) : (
133133
<IconButton
134+
variant="square"
134135
name="more"
135-
size={9}
136+
size={14}
136137
title="Sandbox Actions"
137138
onClick={onContextMenu}
138139
/>
@@ -259,6 +260,9 @@ export const SandboxCard = ({
259260
':hover': {
260261
backgroundColor: 'card.backgroundHover',
261262
},
263+
':has(button:hover)': {
264+
backgroundColor: 'card.background',
265+
},
262266
':focus-visible': {
263267
borderColor: 'focusBorder',
264268
},

0 commit comments

Comments
 (0)