1
0
mirror of https://github.com/XFox111/TabsAsideExtension.git synced 2026-04-22 07:58:01 +03:00

chore: large groups now collapse on drag-n-drop

This commit is contained in:
2025-07-18 20:58:05 +03:00
parent 54a1e48672
commit 5f2d18f509
3 changed files with 20 additions and 2 deletions
@@ -99,12 +99,23 @@ export const useStyles_GroupView = makeStyles({
display: "flex", display: "flex",
columnGap: tokens.spacingHorizontalS, columnGap: tokens.spacingHorizontalS,
rowGap: tokens.spacingHorizontalSNudge, rowGap: tokens.spacingHorizontalSNudge,
height: "100%" height: "100%",
position: "relative"
}, },
verticalList: verticalList:
{ {
flexFlow: "column" flexFlow: "column"
}, },
verticalListCollapsed:
{
maxHeight: "136px",
overflow: "clip"
},
horizontalListCollapsed:
{
maxWidth: "400px",
overflow: "clip"
},
listContainer: listContainer:
{ {
padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalXS}`, padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalXS}`,
@@ -88,7 +88,13 @@ export default function GroupView({ group, indices, dragOverlay }: GroupViewProp
<Caption1Strong>{ i18n.t("groups.empty") }</Caption1Strong> <Caption1Strong>{ i18n.t("groups.empty") }</Caption1Strong>
</div> </div>
: :
<div className={ mergeClasses(cls.list, !tilesView && cls.verticalList) }> <div
className={ mergeClasses(
cls.list,
!tilesView && cls.verticalList,
((active?.item.type === "group" && active?.indices[0] === indices[0]) || dragOverlay) && (tilesView ? cls.horizontalListCollapsed : cls.verticalListCollapsed)
) }
>
<SortableContext <SortableContext
items={ group.items.map((_, index) => [...indices, index].join("/")) } items={ group.items.map((_, index) => [...indices, index].join("/")) }
disabled={ disableSorting } disabled={ disableSorting }
@@ -8,6 +8,7 @@ export const useStyles_TabView = makeStyles({
width: "160px", width: "160px",
height: "120px", height: "120px",
flexShrink: 0,
marginBottom: tokens.spacingVerticalSNudge, marginBottom: tokens.spacingVerticalSNudge,
border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`, border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`,