Compare commits

..
Author SHA1 Message Date
ajnart bb9d4d77eb fix: keep media stream status at table edge 2026-08-22 11:40:49 +02:00
Thomas 2accdc2fad feat: rework board switcher (#6660)
* feat: rework board switcher

* fix: address board switcher review
2026-08-22 11:15:40 +02:00
Thomas 8a08293016 fix: restore bookmark grid fill (#6659)
* fix: restore bookmark grid fill

* fix: use scroll area viewport class
2026-08-22 11:14:41 +02:00
3 changed files with 34 additions and 30 deletions

No files matched your search

@@ -23,3 +23,15 @@
.bookmarkButton:focus-visible .bookmarkIcon { .bookmarkButton:focus-visible .bookmarkIcon {
background-color: var(--mantine-color-iconColor-filled-hover); background-color: var(--mantine-color-iconColor-filled-hover);
} }
.compactScrollViewport > div {
display: flex !important;
width: 100%;
min-height: 100%;
}
.compactScrollContent {
flex: 1;
min-width: 100%;
min-height: 100%;
}
+21 -29
View File
@@ -2,19 +2,7 @@
import type { CSSProperties } from "react"; import type { CSSProperties } from "react";
import { useMemo } from "react"; import { useMemo } from "react";
import { import { Anchor, Card, Flex, Group, ScrollArea, SimpleGrid, Stack, Text, Title, UnstyledButton } from "@mantine/core";
Anchor,
Box,
Card,
Flex,
Group,
ScrollArea,
SimpleGrid,
Stack,
Text,
Title,
UnstyledButton,
} from "@mantine/core";
import { IconLink } from "@tabler/icons-react"; import { IconLink } from "@tabler/icons-react";
import combineClasses from "clsx"; import combineClasses from "clsx";
@@ -42,6 +30,7 @@ export interface CompactBookmarkLayout {
columns: number; columns: number;
hideHostname: boolean; hideHostname: boolean;
hideTitle: boolean; hideTitle: boolean;
minimumItemWidth: number;
minimumItemSize: number; minimumItemSize: number;
} }
@@ -64,6 +53,7 @@ export function getCompactBookmarkLayout(
columns, columns,
hideHostname: cellWidth < 120 || cellHeight < (usesHorizontalItems ? 52 : 96), hideHostname: cellWidth < 120 || cellHeight < (usesHorizontalItems ? 52 : 96),
hideTitle: cellWidth < 64 || cellHeight < 40, hideTitle: cellWidth < 64 || cellHeight < 40,
minimumItemWidth: targetWidth,
minimumItemSize: usesHorizontalItems ? 48 : 96, minimumItemSize: usesHorizontalItems ? 48 : 96,
}; };
} }
@@ -139,12 +129,17 @@ export default function BookmarksWidget({
/> />
)} )}
{displayMode !== "advanced" && ( {displayMode !== "advanced" && (
<ScrollArea type="auto" scrollbarSize={6} offsetScrollbars style={{ flex: 1, minHeight: 0 }}> <ScrollArea
<Box mih="100%"> classNames={{ viewport: classes.compactScrollViewport }}
type="auto"
scrollbarSize={6}
style={{ flex: 1, minHeight: 0 }}
>
<div className={classes.compactScrollContent}>
{options.layout === "grid" || options.layout === "gridHorizontal" ? ( {options.layout === "grid" || options.layout === "gridHorizontal" ? (
<GridLayout <GridLayout
data={data} data={data}
columns={compactLayout.columns} minimumItemWidth={compactLayout.minimumItemWidth}
minimumItemHeight={compactLayout.minimumItemSize} minimumItemHeight={compactLayout.minimumItemSize}
itemDirection={options.layout === "gridHorizontal" ? "horizontal" : "vertical"} itemDirection={options.layout === "gridHorizontal" ? "horizontal" : "vertical"}
hideTitle={compactHideTitle} hideTitle={compactHideTitle}
@@ -167,7 +162,7 @@ export default function BookmarksWidget({
hasIconColor={board.iconColor !== null} hasIconColor={board.iconColor !== null}
/> />
)} )}
</Box> </div>
</ScrollArea> </ScrollArea>
)} )}
</Stack> </Stack>
@@ -340,7 +335,7 @@ interface GridLayoutProps {
withBorder: boolean; withBorder: boolean;
itemDirection: "horizontal" | "vertical"; itemDirection: "horizontal" | "vertical";
hasIconColor: boolean; hasIconColor: boolean;
columns: number; minimumItemWidth: number;
minimumItemHeight: number; minimumItemHeight: number;
} }
@@ -353,20 +348,13 @@ const GridLayout = ({
withBorder, withBorder,
itemDirection, itemDirection,
hasIconColor, hasIconColor,
columns, minimumItemWidth,
minimumItemHeight, minimumItemHeight,
}: GridLayoutProps) => { }: GridLayoutProps) => {
const board = useRequiredBoard(); const board = useRequiredBoard();
return ( return (
<SimpleGrid <Flex gap={4} wrap="wrap" miw="100%" mih="100%" style={{ alignContent: "stretch" }}>
cols={columns}
spacing={4}
verticalSpacing={4}
miw="100%"
mih="100%"
style={{ gridAutoRows: `minmax(${minimumItemHeight}px, 1fr)` }}
>
{data.map((app) => { {data.map((app) => {
const href = getSafeAppHref(app.href); const href = getSafeAppHref(app.href);
return ( return (
@@ -377,7 +365,11 @@ const GridLayout = ({
target={href ? (openNewTab ? "_blank" : "_self") : undefined} target={href ? (openNewTab ? "_blank" : "_self") : undefined}
rel={href && openNewTab ? SAFE_NEW_TAB_REL : undefined} rel={href && openNewTab ? SAFE_NEW_TAB_REL : undefined}
key={app.id} key={app.id}
h="100%" style={{
flex: `1 0 calc(${minimumItemWidth}px * var(--mantine-scale, 1))`,
minWidth: 0,
minHeight: `calc(${minimumItemHeight}px * var(--mantine-scale, 1))`,
}}
> >
<Card <Card
h="100%" h="100%"
@@ -407,7 +399,7 @@ const GridLayout = ({
</UnstyledButton> </UnstyledButton>
); );
})} })}
</SimpleGrid> </Flex>
); );
}; };
@@ -147,7 +147,7 @@ function StreamTableHeader({
const SortIcon = !active ? IconArrowsSort : sort.descending ? IconChevronDown : IconChevronUp; const SortIcon = !active ? IconArrowsSort : sort.descending ? IconChevronDown : IconChevronUp;
return ( return (
<Table.Th w={width} aria-sort={active ? (sort.descending ? "descending" : "ascending") : "none"}> <Table.Th style={{ width }} aria-sort={active ? (sort.descending ? "descending" : "ascending") : "none"}>
{sortable ? ( {sortable ? (
<UnstyledButton className={classes.sortButton} onClick={() => onSort(column)}> <UnstyledButton className={classes.sortButton} onClick={() => onSort(column)}>
<Text component="span" size="xs" fw={600} c="dimmed" style={{ letterSpacing: "0.02em" }} truncate> <Text component="span" size="xs" fw={600} c="dimmed" style={{ letterSpacing: "0.02em" }} truncate>