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:
@@ -99,12 +99,23 @@ export const useStyles_GroupView = makeStyles({
|
||||
display: "flex",
|
||||
columnGap: tokens.spacingHorizontalS,
|
||||
rowGap: tokens.spacingHorizontalSNudge,
|
||||
height: "100%"
|
||||
height: "100%",
|
||||
position: "relative"
|
||||
},
|
||||
verticalList:
|
||||
{
|
||||
flexFlow: "column"
|
||||
},
|
||||
verticalListCollapsed:
|
||||
{
|
||||
maxHeight: "136px",
|
||||
overflow: "clip"
|
||||
},
|
||||
horizontalListCollapsed:
|
||||
{
|
||||
maxWidth: "400px",
|
||||
overflow: "clip"
|
||||
},
|
||||
listContainer:
|
||||
{
|
||||
padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalXS}`,
|
||||
|
||||
@@ -88,7 +88,13 @@ export default function GroupView({ group, indices, dragOverlay }: GroupViewProp
|
||||
<Caption1Strong>{ i18n.t("groups.empty") }</Caption1Strong>
|
||||
</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
|
||||
items={ group.items.map((_, index) => [...indices, index].join("/")) }
|
||||
disabled={ disableSorting }
|
||||
|
||||
@@ -8,6 +8,7 @@ export const useStyles_TabView = makeStyles({
|
||||
|
||||
width: "160px",
|
||||
height: "120px",
|
||||
flexShrink: 0,
|
||||
marginBottom: tokens.spacingVerticalSNudge,
|
||||
|
||||
border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke3}`,
|
||||
|
||||
Reference in New Issue
Block a user