From 4505ce96c9cb113ed42f9b63c6a62c38f55e8e06 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 15 Aug 2026 10:44:37 +0200 Subject: [PATCH] fix: refine dashboard interactions and widget options (#6597) * fix: refine dashboard item interactions * fix board interactions and widget options * feat: improve bookmark selection * fix: address dashboard review feedback --- apps/docs/docs/widgets/bookmarks/index.mdx | 5 +- apps/docs/docs/widgets/bookmarks/index.ts | 8 +- apps/nextjs/next.config.ts | 2 +- .../app/[locale]/boards/(content)/_client.tsx | 4 +- .../src/components/board/items/item-menu.tsx | 26 +-- .../board/layout/scaled-board-canvas.tsx | 4 +- .../board/remove-confirmation-menu-item.tsx | 39 ++++ .../board/sections/container-section.tsx | 21 +- .../sections/container/container-menu.tsx | 33 ++- .../board/sections/grid/dnd/engine.spec.ts | 80 +++++++- .../board/sections/grid/dnd/engine.ts | 31 ++- .../board/sections/grid/dnd/index.ts | 2 +- .../board/sections/grid/dnd/targeting.spec.ts | 29 ++- .../board/sections/grid/dnd/targeting.ts | 26 +++ .../board/sections/grid/grid-editor.css | 67 +++++-- .../board/sections/grid/grid-editor.tsx | 189 ++++++------------ .../board/sections/grid/grid-portal-host.tsx | 89 ++++++--- .../board/sections/grid/section-grid.tsx | 6 +- e2e/onboarding.spec.ts | 49 ----- packages/spotlight/src/modes/home/context.tsx | 19 +- packages/translation/src/lang/en.json | 11 +- packages/widgets/src/_inputs/common.tsx | 2 +- ...widget-custom-widget-select-input.spec.tsx | 2 +- .../_inputs/widget-location-input.spec.tsx | 118 +++++++++++ .../src/_inputs/widget-location-input.tsx | 43 +++- .../src/_inputs/widget-multi-text-input.tsx | 12 +- .../widget-sortable-item-list-input.tsx | 61 +++--- .../beszel-system-grid/component.module.css | 12 +- .../src/beszel-system-grid/component.tsx | 14 +- .../src/beszel/_shared/disk-usage.module.css | 2 + packages/widgets/src/bookmarks/add-button.tsx | 89 +++++++-- .../src/bookmarks/app-select-modal.tsx | 109 ---------- packages/widgets/src/bookmarks/component.tsx | 82 ++++++-- packages/widgets/src/bookmarks/index.tsx | 8 +- packages/widgets/src/bookmarks/layout.spec.ts | 23 ++- packages/widgets/src/downloads/component.tsx | 4 +- packages/widgets/src/options.ts | 6 +- 37 files changed, 824 insertions(+), 503 deletions(-) create mode 100644 apps/nextjs/src/components/board/remove-confirmation-menu-item.tsx create mode 100644 packages/widgets/src/_inputs/widget-location-input.spec.tsx delete mode 100644 packages/widgets/src/bookmarks/app-select-modal.tsx diff --git a/apps/docs/docs/widgets/bookmarks/index.mdx b/apps/docs/docs/widgets/bookmarks/index.mdx index 3e2710788..b043ccc9c 100644 --- a/apps/docs/docs/widgets/bookmarks/index.mdx +++ b/apps/docs/docs/widgets/bookmarks/index.mdx @@ -13,8 +13,9 @@ import { bookmarksWidget } from "."; -The bookmarks widget allows you to display multiple app links in a single widget. -You can add links to your favorite applications, websites, or any other resources you want quick access to. +The bookmarks widget allows you to display multiple links in a single widget. +Select one or more existing Apps directly in the widget settings; these bookmarks keep a reference to the App, so changes to its name, icon, or URL are reflected automatically. +For links that do not need an App, add their URLs under **Custom links** instead. Its normal view adapts each configured layout to the available width and height: lower-priority hostnames are hidden before names or icons, and larger collections scroll instead of crushing cards. Advanced view shows every bookmark as a roomy card with its full title, hostname, icon, and complete description regardless of the compact layout and visibility choices. diff --git a/apps/docs/docs/widgets/bookmarks/index.ts b/apps/docs/docs/widgets/bookmarks/index.ts index 57fea9836..eaeec258e 100644 --- a/apps/docs/docs/widgets/bookmarks/index.ts +++ b/apps/docs/docs/widgets/bookmarks/index.ts @@ -47,9 +47,15 @@ export const bookmarksWidget: WidgetDefinition = { { name: "Bookmarks", description: "List of bookmarks to display in the widget.", - values: "Select of all your apps and order them as you like.", + values: "Select one or more Apps directly, then order them as you like.", defaultValue: "No bookmarks selected", }, + { + name: "Custom links", + description: "URLs to display without first creating an App.", + values: "List of URLs.", + defaultValue: "No custom links", + }, ], }, }; diff --git a/apps/nextjs/next.config.ts b/apps/nextjs/next.config.ts index 812596cd3..71e31402c 100644 --- a/apps/nextjs/next.config.ts +++ b/apps/nextjs/next.config.ts @@ -46,7 +46,7 @@ const nextConfig: NextConfig = { serverExternalPackages: ["dockerode", "isomorphic-dompurify", "jsdom", "better-sqlite3"], experimental: { optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"], - preloadEntriesOnStart: false, + preloadEntriesOnStart: true, turbopackFileSystemCacheForBuild: true, useTypeScriptCli: true, }, diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_client.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_client.tsx index 061a08051..9a2d65b36 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_client.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_client.tsx @@ -49,7 +49,7 @@ export const ClientBoard = () => { .map(getLogicalTrackSize); const logicalWidth = laneWidths.reduce((total, width) => total + width, 0) + (laneWidths.length - 1) * LOGICAL_GRID_GAP; - const initialLogicalHeight = getInitialBoardLogicalHeight(board, currentLayoutId) + LOGICAL_GRID_GAP; + const initialLogicalHeight = getInitialBoardLogicalHeight(board, currentLayoutId); const representativeWidth = layoutOverrideId ? getRepresentativeLayoutWidth(currentLayout, board.layouts) : null; const initialAvailableWidth = Math.max(1, (representativeWidth ?? initialViewportWidth) - APP_SHELL_INLINE_PADDING); const gridTemplateColumns = [ @@ -74,7 +74,7 @@ export const ClientBoard = () => { > -
+
{leftColumnCount > 0 && leftSection && (