mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat(client): add configurable multi-row dashboard shelves
A shelf rendered a single horizontal row, which wastes space on wide screens and shows very few books on narrow ones. Each shelf now carries a row count of 1 to 3, set per shelf in the dashboard settings drawer. Books fill bands left to right rather than filling each column top to bottom. The cheaper grid-auto-flow approach would put the second most recent book directly under the first, which reads wrong on ordered shelves like Continue Reading and Up Next in Series. Below the sm breakpoint the row count is capped at two, since only two covers fit across and a third row costs a screen height to gain two books. A shelf fetches limit * rows books, clamped to the limit the server already accepts, so no server behaviour changes. DASHBOARD_SCROLLER_MAX_LIMIT moves into the shared types package so both sides read one value instead of drifting apart. The row count is part of the shelf key because a shelf snapshots its fetch limit during setup; without it, switching to three rows would re-flow the books fetched for one. Also widen the settings drawer, which was pinned at 384px because SheetContent's own sm:max-w-sm outranked the plain max-w override in tailwind-merge, put Shelves ahead of Widgets, and move the customize control out of the floating layer into the greeting row where it is not missed. Closes #928
This commit is contained in:
@@ -14,9 +14,9 @@ import {
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
|
||||
import { DASHBOARD_SCROLLER_BATCH_MAX, SCROLLER_TYPES, type ScrollerType } from '@bookorbit/types';
|
||||
import { DASHBOARD_SCROLLER_BATCH_MAX, DASHBOARD_SCROLLER_MAX_LIMIT, SCROLLER_TYPES, type ScrollerType } from '@bookorbit/types';
|
||||
|
||||
export const DASHBOARD_SCROLLER_MAX_LIMIT = 50;
|
||||
export { DASHBOARD_SCROLLER_MAX_LIMIT };
|
||||
|
||||
export class DashboardScrollerBatchItemDto {
|
||||
@IsString()
|
||||
|
||||
Reference in New Issue
Block a user