style: auto-fix lint and format

This commit is contained in:
ajnart authored and ajnart committed 2026-08-01 00:43:36 +02:00
1 parent 25c9955cc6
commit 0a80d70730
4 files changed
+8 -16

No files matched your search

@@ -95,7 +95,8 @@ export const ClientBoard = () => {
const laneWidths = [leftColumnCount, mainColumnCount, rightColumnCount] const laneWidths = [leftColumnCount, mainColumnCount, rightColumnCount]
.filter((columnCount) => columnCount > 0) .filter((columnCount) => columnCount > 0)
.map(getLogicalTrackSize); .map(getLogicalTrackSize);
const logicalWidth = laneWidths.reduce((total, width) => total + width, 0) + (laneWidths.length - 1) * LOGICAL_GRID_GAP; const logicalWidth =
laneWidths.reduce((total, width) => total + width, 0) + (laneWidths.length - 1) * LOGICAL_GRID_GAP;
const initialLogicalHeight = getInitialBoardLogicalHeight(board, currentLayoutId); const initialLogicalHeight = getInitialBoardLogicalHeight(board, currentLayoutId);
const initialAvailableWidth = Math.max(1, initialViewportWidth - APP_SHELL_INLINE_PADDING); const initialAvailableWidth = Math.max(1, initialViewportWidth - APP_SHELL_INLINE_PADDING);
const gridTemplateColumns = [ const gridTemplateColumns = [
@@ -1,11 +1,6 @@
import { describe, expect, test } from "vitest"; import { describe, expect, test } from "vitest";
import { import { getLayoutRowCount, getLogicalItemStyle, getLogicalTrackSize, normalizeGridPlacement } from "../index";
getLayoutRowCount,
getLogicalItemStyle,
getLogicalTrackSize,
normalizeGridPlacement,
} from "../index";
describe("fixed dashboard geometry", () => { describe("fixed dashboard geometry", () => {
test("keeps a 1x1 item exactly 200px with a fixed 24px gap", () => { test("keeps a 1x1 item exactly 200px with a fixed 24px gap", () => {
+4 -5
View File
@@ -1699,7 +1699,9 @@ const getUpdatedBoardLayout = (
const mainRoot = rootByLane.get("main"); const mainRoot = rootByLane.get("main");
if (!mainRoot) throw new Error(`Board "${board.id}" has no main canvas root`); if (!mainRoot) throw new Error(`Board "${board.id}" has no main canvas root`);
const sourceRootById = new Map(emptyRoots.map((section) => [section.id, getRootSectionLane(section.xOffset)] as const)); const sourceRootById = new Map(
emptyRoots.map((section) => [section.id, getRootSectionLane(section.xOffset)] as const),
);
const targetLaneBySourceLane = new Map<BoardLane, BoardLane>( const targetLaneBySourceLane = new Map<BoardLane, BoardLane>(
boardLanes.map((lane) => [ boardLanes.map((lane) => [
lane, lane,
@@ -1787,10 +1789,7 @@ interface BoardLayoutGeometry {
rightGutterColumnCount: number; rightGutterColumnCount: number;
} }
const getRootSectionForLane = ( const getRootSectionForLane = (board: Awaited<ReturnType<typeof getFullBoardWithWhereAsync>>, lane: BoardLane) => {
board: Awaited<ReturnType<typeof getFullBoardWithWhereAsync>>,
lane: BoardLane,
) => {
const roots = board.sections.filter( const roots = board.sections.filter(
(section) => section.kind === "empty" && getRootSectionLane(section.xOffset) === lane, (section) => section.kind === "empty" && getRootSectionLane(section.xOffset) === lane,
); );
+1 -4
View File
@@ -5,10 +5,7 @@ interface ResponsiveLayout {
breakpoint: number; breakpoint: number;
} }
export const getLayoutIdForViewportWidth = ( export const getLayoutIdForViewportWidth = (layouts: readonly ResponsiveLayout[], viewportWidth: number): string => {
layouts: readonly ResponsiveLayout[],
viewportWidth: number,
): string => {
if (layouts.length === 0) { if (layouts.length === 0) {
throw new Error("Expected the board to contain a layout"); throw new Error("Expected the board to contain a layout");
} }