Skip to content

Commit a212417

Browse files
authored
🐛(frontend) fix action buttons not clickable (#1162)
If the title was too long, or the children deepness too deep, the action buttons in the doc tree were not clickable. This commit fixes the issue by ensuring that the action buttons are always clickable, regardless of the title length or children depth.
1 parent 500d4ea commit a212417

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to
1212

1313
- 🌐(frontend) keep simple tag during export #1154
1414
- 🐛(back) manage can-edit endpoint without created room in the ws
15+
- 🐛(frontend) fix action buttons not clickable #1162
1516

1617
## [3.4.0] - 2025-07-09
1718

src/frontend/apps/impress/src/features/docs/doc-tree/components/DocSubPageItem.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
import { useLeftPanelStore } from '@/features/left-panel';
1919
import { useResponsiveStore } from '@/stores';
2020

21-
import Logo from './../assets/sub-page-logo.svg';
21+
import SubPageIcon from './../assets/sub-page-logo.svg';
2222
import { DocTreeItemActions } from './DocTreeItemActions';
2323

2424
const ItemTextCss = css`
@@ -99,13 +99,25 @@ export const DocSubPageItem = (props: Props) => {
9999
return (
100100
<Box
101101
className="--docs-sub-page-item"
102+
$position="relative"
102103
$css={css`
103104
background-color: ${actionsOpen
104105
? 'var(--c--theme--colors--greyscale-100)'
105106
: 'var(--c--theme--colors--greyscale-000)'};
106107
107108
.light-doc-item-actions {
108109
display: ${actionsOpen || !isDesktop ? 'flex' : 'none'};
110+
position: absolute;
111+
right: 0;
112+
background: ${isDesktop
113+
? 'var(--c--theme--colors--greyscale-100)'
114+
: 'var(--c--theme--colors--greyscale-000)'};
115+
}
116+
117+
.c__tree-view--node.isSelected {
118+
.light-doc-item-actions {
119+
background: var(--c--theme--colors--greyscale-100);
120+
}
109121
}
110122
111123
&:hover {
@@ -114,6 +126,7 @@ export const DocSubPageItem = (props: Props) => {
114126
115127
.light-doc-item-actions {
116128
display: flex;
129+
background: var(--c--theme--colors--greyscale-100);
117130
}
118131
}
119132
`}
@@ -136,7 +149,7 @@ export const DocSubPageItem = (props: Props) => {
136149
$minHeight="24px"
137150
>
138151
<Box $width="16px" $height="16px">
139-
<Logo />
152+
<SubPageIcon />
140153
</Box>
141154

142155
<Box

src/frontend/apps/impress/src/features/docs/doc-tree/components/DocTree.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ export const DocTree = ({ initialTargetId }: DocTreeProps) => {
136136
.c__tree-view--container {
137137
z-index: 1;
138138
margin-top: -10px;
139+
140+
.c__tree-view {
141+
overflow: hidden !important;
142+
}
139143
}
140144
`}
141145
>

0 commit comments

Comments
 (0)