Skip to content

Commit f5323cf

Browse files
committed
fixup! ✨(frontend) enable enter key to open documents and subdocuments
1 parent cab4f61 commit f5323cf

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/frontend/apps/impress/src/features/docs/doc-management/components/SimpleDocItem.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ type SimpleDocItemProps = {
2626
doc: Doc;
2727
isPinned?: boolean;
2828
showAccesses?: boolean;
29-
onActivate?: () => void;
3029
};
3130

3231
export const SimpleDocItem = ({

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,29 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
114114
padding: ${spacingsTokens['3xs']};
115115
border-radius: 4px;
116116
}
117-
118-
.c__tree-view--node:hover {
119-
background-color: var(--c--theme--colors--greyscale-100);
120-
}
121-
117+
background-color: ${menuOpen
118+
? 'var(--c--theme--colors--greyscale-100)'
119+
: 'var(--c--theme--colors--greyscale-000)'};
122120
.light-doc-item-actions {
123-
display: flex;
124-
opacity: ${isActive || !isDesktop ? 1 : 0};
121+
display: ${menuOpen || !isDesktop ? 'flex' : 'none'};
125122
position: absolute;
126123
right: 0;
127-
top: 0;
128-
height: 100%;
129-
z-index: 10;
124+
background: ${isDesktop
125+
? 'var(--c--theme--colors--greyscale-100)'
126+
: 'var(--c--theme--colors--greyscale-000)'};
130127
}
131-
132-
.row.preview & {
133-
background-color: inherit;
128+
.c__tree-view--node.isSelected {
129+
.light-doc-item-actions {
130+
background: var(--c--theme--colors--greyscale-100);
131+
}
132+
}
133+
&:hover {
134+
background-color: var(--c--theme--colors--greyscale-100);
135+
border-radius: 4px;
136+
.light-doc-item-actions {
137+
display: flex;
138+
background: var(--c--theme--colors--greyscale-100);
139+
}
134140
}
135141
`}
136142
>

0 commit comments

Comments
 (0)