Skip to content

Commit 081939c

Browse files
jmcteDimillian
andauthored
fix: sidebar workspace group expansion (#228)
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
1 parent 734ad09 commit 081939c

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/features/app/components/WorkspaceGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function WorkspaceGroup({
6464
</div>
6565
)}
6666
<div className={`workspace-group-list ${isCollapsed ? "collapsed" : ""}`}>
67-
{children}
67+
<div className="workspace-group-content">{children}</div>
6868
</div>
6969
</div>
7070
);

src/styles/sidebar.css

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,24 +223,29 @@
223223
}
224224

225225
.workspace-group-list {
226-
display: flex;
227-
flex-direction: column;
228-
gap: 10px;
226+
display: grid;
227+
grid-template-rows: 1fr;
229228
margin-top: 8px;
230-
max-height: 1200px;
231229
opacity: 1;
232-
overflow: hidden;
233230
transform: translateY(0);
234231
transition:
235-
max-height 0.2s ease,
232+
grid-template-rows 0.2s ease,
236233
opacity 0.2s ease,
237234
transform 0.2s ease,
238235
margin-top 0.2s ease;
239236
}
240237

238+
.workspace-group-content {
239+
display: flex;
240+
flex-direction: column;
241+
gap: 10px;
242+
overflow: hidden;
243+
min-height: 0;
244+
}
245+
241246
.workspace-group-list.collapsed {
242247
margin-top: 0;
243-
max-height: 0;
248+
grid-template-rows: 0fr;
244249
opacity: 0;
245250
transform: translateY(-4px);
246251
}

0 commit comments

Comments
 (0)