Skip to content

Commit 812f61c

Browse files
fix: FIT-1139: Copy region link option in Outliner (Regions tab) disappears on hover (#9017)
1 parent b735fd7 commit 812f61c

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

web/libs/editor/src/components/ContextMenu/ContextMenu.module.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353

5454
.trigger {
5555
&.open {
56-
background-color: var(--color-primary-emphasis);
57-
color: var(--color-neutral-content);
58-
border-radius: 4px;
5956
opacity: 1;
6057
}
6158
}

web/libs/editor/src/components/SidePanels/Components/RegionContextMenu.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,11 @@ export const RegionContextMenu: FC<{ item: any }> = observer(({ item }: { item:
4646

4747
return (
4848
<ContextMenuTrigger
49-
className={cn("region-context-menu").toClassName()}
49+
className={cn("region-context-menu").mod({ open }).toClassName()}
5050
content={<ContextMenu actions={actions} />}
5151
onToggle={(isOpen) => setOpen(isOpen)}
5252
>
53-
<Button
54-
variant="neutral"
55-
look="string"
56-
size="smaller"
57-
style={{ ...(open ? { display: "flex !important" } : null) }}
58-
aria-label="Region options"
59-
>
53+
<Button variant="neutral" look="string" size="smaller" aria-label="Region options">
6054
<IconEllipsis />
6155
</Button>
6256
</ContextMenuTrigger>

web/libs/editor/src/components/SidePanels/OutlinerPanel/TreeView.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,26 @@
233233
}
234234

235235
.region-context-menu button {
236-
display: none;
236+
transition: none;
237+
opacity: 0;
238+
}
239+
240+
.region-context-menu_open button {
241+
opacity: 1;
237242
}
238243
}
239244

240-
&:hover &__controls {
245+
&:hover &__controls,
246+
&:has(.region-context-menu_open) &__controls {
241247
display: flex;
242248

243249
.outliner-item__control_type_lock {
244250
display: flex;
245251
}
252+
253+
.region-context-menu button {
254+
opacity: 1;
255+
}
246256
}
247257
}
248258

0 commit comments

Comments
 (0)