Skip to content

Commit 499859d

Browse files
committed
feat(settings): expand personalization options with resizable sidebar/columns and typography controls
- Added resizable sidebar and board columns with persisted width settings. - Introduced advanced typography sizing controls for various text elements. - Implemented a solid background preset system with built-in swatches and custom color support. - Added functionality for saving and deleting custom gradient presets in settings. - Updated documentation to reflect new features and changes in the API.
1 parent a8a1acf commit 499859d

14 files changed

Lines changed: 388 additions & 72 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,29 @@ This release fixes category creation ordering, extends drag-and-drop to cover fu
5454
- `scripts/electron-rebuild-native.cjs` Step 5: scans `destApp/.next/node_modules/` for any `better-sqlite3-*` alias directories and patches their `build/Release/better_sqlite3.node` with the Electron-ABI binary compiled in Step 1.
5555
- `ThemeToggle` import and component removed from `AppLayout.tsx`.
5656

57+
### 🎛️ Settings Personalization Expansion (March 5, 2026)
58+
59+
#### Added
60+
61+
- **Resizable sidebar with persisted width** — Sidebar can now be drag-resized from its right edge, with width saved in `fontConfig.sidebarWidth` (and included in settings presets).
62+
- **Resizable board columns with persisted width** — Category columns can now be resized from the board itself, with width saved in `fontConfig.columnWidth`.
63+
- **Advanced typography sizing controls** — Added independent controls for:
64+
- UI label size
65+
- Body text size
66+
- Category header size
67+
- Card title size
68+
- Code text size
69+
- **Solid background preset system** — Added built-in solid color swatches plus save/delete support for custom solid colors.
70+
- **Custom gradient preset library** — Added save/delete support for user-created gradients in Settings.
71+
72+
#### Changed
73+
74+
- **Sidebar default width tightened** — Expanded sidebar default is now the minimum width (`240px`) for a cleaner starting layout.
75+
- **Sidebar width persistence model** — Sidebar width moved from session-only state to durable settings persistence so it no longer resets when navigating between pages.
76+
- **Card/category title handling** — Category headers and card titles now support multi-line clamping to reduce clipping with larger fonts.
77+
- **Theme tokens expanded** — Added runtime CSS tokens for `--font-size-ui`, `--font-size-body`, `--font-size-category-title`, `--font-size-card-title`, `--font-size-code`, `--sidebar-width`, and `--board-column-width`.
78+
- **Background config model expanded**`backgroundConfig` now carries saved solid color and saved gradient libraries so they travel with settings/preset data.
79+
5780
---
5881

5982
## [2.4.0] - 2026-03-01

OVERVIEW.md

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 📚 ByteBox – Project Overview
22

3-
**Last Updated**: March 2, 2026
3+
**Last Updated**: March 5, 2026
44
**Version**: 2.5.0
55
**Author**: [Pink Pixel](https://pinkpixel.dev)
66
**License**: Apache 2.0
@@ -22,7 +22,7 @@
2222
- 💻 **Code-Friendly** — Syntax highlighting for 100+ languages (Shiki)
2323
- 🖼️ **Image Storage** — Save screenshots and images with full-screen lightbox preview, download, and clipboard support
2424
- 📋 **Copy & Delete** — One-click content copying and safe two-step card deletion
25-
- 🌌 **Customize** — Glassmorphic UI with accent/icon themes, custom gradients/solids, wallpaper library or uploads, font picks, and saveable presets
25+
- 🌌 **Customize** — Glassmorphic UI with accent/icon themes, saveable custom solids/gradients, wallpaper library or uploads, font/size controls, resizable sidebar/columns, and saveable presets
2626
- 🌫️ **Tune the Glow** — Real-time glass transparency slider that adapts blur, opacity, and shadows to your wallpaper
2727

2828
---
@@ -84,10 +84,10 @@
8484

8585
A cohesive customization stack that keeps the UI consistent while giving users deep control over color, texture, and type.
8686

87-
- **Theme Registry (`src/lib/themeRegistry.ts`)** – Curated accent palettes (Byte Classic, Neon Night, Rainbow Sprint, Midnight Carbon, Sunset Espresso, Pastel Haze) and icon palettes (Neon Grid, Carbon Tech, Espresso Circuit, Rainbow Loop, Pink Pulse, Custom Single) plus gradient presets and built-in wallpaper data URIs.
88-
- **Theme Context (`src/contexts/ThemeContext.tsx`)** – Loads settings from the database API on mount (with localStorage for instant hydration fallback), applies CSS variables (`--accent-*`, `--icon-*`, `--glass-*`, `--font-*`, background tokens), and keeps uploads/gradients/solids/presets in sync. Saves changes to both localStorage and API with 500ms debouncing. Supports 17 UI fonts and 13 mono fonts including stylized options.
89-
- **Global Tokens (`src/app/globals.css`)** – Glass utilities (`.glass`, `.glass--dense`), surface helpers, accent gradients, and configurable background stack (custom gradient, preset wallpaper, or user upload).
90-
- **Settings UI (`src/app/settings/page.tsx`)**Light/dark toggle, glass slider, accent/icon pickers, custom accent builder (2–6 colors), solid + gradient background editors with angle control, wallpaper library (12 built-in wallpapers) plus upload support, UI + mono font selectors, and named presets for saving/loading the whole appearance. All settings database-backed with localStorage as hydration fallback.
87+
- **Theme Registry (`src/lib/themeRegistry.ts`)** – Curated accent palettes (Byte Classic, Neon Night, Rainbow Sprint, Midnight Carbon, Sunset Espresso, Pastel Haze) and icon palettes (Neon Grid, Carbon Tech, Espresso Circuit, Rainbow Loop, Pink Pulse, Custom Single) plus gradient presets, solid-color presets, and wallpaper metadata.
88+
- **Theme Context (`src/contexts/ThemeContext.tsx`)** – Loads settings from the database API on mount (with localStorage for instant hydration fallback), applies CSS variables (`--accent-*`, `--icon-*`, `--glass-*`, `--font-*`, sizing/width tokens, background tokens), and keeps uploads/gradients/solids/presets in sync. Saves changes to both localStorage and API with 500ms debouncing. Supports 17 UI fonts and 13 mono fonts including stylized options.
89+
- **Global Tokens (`src/app/globals.css`)** – Glass utilities (`.glass`, `.glass--dense`), surface helpers, dynamic typography classes, and configurable background stack (custom gradient, preset wallpaper, or user upload).
90+
- **Settings UI (`src/app/settings/page.tsx`)**Glass slider, accent/icon pickers, custom accent builder (2–6 colors), solid + gradient editors with saveable custom color/gradient libraries, wallpaper library (12 built-in wallpapers) plus upload support, UI + mono font selectors, UI/body/category/card/code size controls, sidebar/column width controls, and named presets for saving/loading the whole appearance.
9191
- **Component Integration** – Layout, cards, filters, search, and stats all subscribe to the theme hooks so changes propagate instantly across the app.
9292

9393
All customizations are database-backed with localStorage as a fast hydration layer, ensuring consistent rendering on first paint and persistence across browser sessions.
@@ -144,7 +144,6 @@ bytebox/
144144
│ │ ├── Lightbox.tsx # Full-screen image preview modal
145145
│ │ ├── SearchBar.tsx # Global search input (Cmd+K)
146146
│ │ ├── Tag.tsx # Tag badge component
147-
│ │ ├── ThemeToggle.tsx # Light/dark toggle with accent-aware styles
148147
│ │ └── ViewModeSelector.tsx # View mode dropdown (All/Recent/Starred/By Tag)
149148
│ │
150149
│ ├── contexts/
@@ -262,13 +261,13 @@ bytebox/
262261
**UserSettings** (Singleton)
263262

264263
- `id`: Fixed value "default" (singleton pattern)
265-
- `mode`: Theme mode (dark/light)
264+
- `mode`: Base appearance mode value used by the theme engine
266265
- `accentThemeId`: Selected accent theme ID
267266
- `iconThemeId`: Selected icon theme ID
268267
- `customIconColor`: Custom icon hex color
269268
- `glassIntensity`: Glass transparency level (0-100)
270-
- `backgroundConfig`: JSON object with background settings
271-
- `fontConfig`: JSON object with UI and mono font selections
269+
- `backgroundConfig`: JSON object with active background plus saved solid-color and gradient libraries
270+
- `fontConfig`: JSON object with UI/mono font selections, UI/body/category/card/code sizes, and persisted sidebar/column widths
272271
- `customAccentThemes`: JSON array of user-created accent themes
273272
- `settingsPresets`: JSON array of saved settings presets
274273
- `createdAt`: Timestamp when created
@@ -306,18 +305,18 @@ bytebox/
306305
**Implementation**:
307306

308307
- `Board.tsx` wraps the entire dashboard with `DndContext`
309-
- `DraggableBoard.tsx` uses CSS Grid with `repeat(n, minmax(280px, 1fr))` for responsive columns
310-
- Columns stretch evenly to fill the viewport width
311-
- Minimum column width of 280px ensures cards remain readable
312-
- Horizontal scrolling only activates when minimum widths can't be maintained
308+
- `DraggableBoard.tsx` uses CSS Grid with user-configurable fixed column width (`repeat(n, {width}px)`)
309+
- Columns are drag-reorderable and resizeable via column-edge drag handles
310+
- Default column width is 320px and user-adjustable in Settings or by direct drag
311+
- Horizontal scrolling activates naturally as column count or width grows
313312
- `DraggableCard.tsx` wraps each card with `useDraggable` and `useSortable`
314313
- Drag events (`onDragStart`, `onDragEnd`) handle reordering and category changes
315314
- On drop, PATCH `/api/cards` with updated order/categoryId
316315
- Database updates persist the new state
317316

318317
**User Experience**:
319318

320-
- Columns automatically resize based on screen/viewport size
319+
- Column width is user-controlled and persisted as part of appearance settings/presets
321320
- Drag cards within a category to reorder
322321
- Drag cards between categories to move them
323322
- Visual feedback with hover states and active indicators
@@ -381,14 +380,14 @@ bytebox/
381380
- `syntax.ts` initializes Shiki with multiple languages
382381
- `CodeBlock.tsx` renders highlighted code blocks
383382
- Supports 100+ languages via validated dropdown (JavaScript, Python, Go, Rust, etc.)
384-
- Light and dark themes match app theme
383+
- Syntax theme tokens follow the active appearance profile
385384
- Copy-to-clipboard button for easy code copying
386385

387386
**User Experience**:
388387

389388
- Code snippets are beautifully highlighted
390389
- One-click copy to clipboard
391-
- Theme-aware (dark/light mode)
390+
- Theme-aware color tokens from the current appearance profile
392391

393392
---
394393

@@ -501,54 +500,52 @@ bytebox/
501500

502501
---
503502

504-
### 8️⃣ Dark Mode & Theme System
503+
### 8️⃣ Appearance & Theme System
505504

506505
**Technology**: React Context API + localStorage
507506

508507
**Implementation**:
509508

510-
- `ThemeContext.tsx` manages base mode, accent theme, icon palette, custom icon color, wallpaper, and the new glass intensity state (0–100).
509+
- `ThemeContext.tsx` manages the appearance profile, accent theme, icon palette, custom icon color, wallpaper, and glass intensity state (0–100).
511510
- Preferences persist to localStorage (`bytebox-*`) and hydrate once the app mounts.
512-
- System preference detection (respects OS theme)
513-
- `ThemeToggle.tsx` renders the sole sun/moon icon button for mode switching
514-
- Tailwind CSS `dark:` classes style components
515-
- Logo shadow effects are mode-aware (dark mode uses drop-shadow, light mode uses none to prevent visual artifacts)
511+
- Tailwind + CSS variable tokens style components consistently across customized appearances
512+
- Logo shadow effects are appearance-aware (drop-shadow is only applied where it improves clarity)
516513

517514
**User Experience**:
518515

519-
- Dark mode is the default
520-
- Click the icon toggle to switch bases—no duplicate buttons in Settings
521516
- Drag the Glass Transparency slider to move from airy to frosted instantly
522517
- All theme settings persist across sessions with smooth transitions
523518

524519
---
525520

526-
### 9️⃣ Collapsible Sidebar
521+
### 9️⃣ Collapsible + Resizable Sidebar
527522

528523
**Technology**: React state + Tailwind CSS transitions + Next.js Link
529524

530525
**Implementation**:
531526

532-
- `AppLayout.tsx` manages `sidebarOpen` state for expand/collapse behavior
527+
- `AppLayout.tsx` manages both `sidebarOpen` (expand/collapse) and persisted `sidebarWidth`
533528
- Uses Next.js `Link` component for all sidebar navigation (Dashboard, Search, Tags, Settings)
534529
- Client-side navigation preserves React state and theme settings across page transitions
535-
- Sidebar transitions smoothly between 320px (expanded) and 96px (collapsed) widths
530+
- Sidebar transitions between a user-configurable expanded width (240–460px, default 240px) and 96px collapsed width
536531
- **Logo Switching**:
537532
- Expanded: Shows full `logo_banner.png` (240×120)
538533
- Collapsed: Shows square `icon.png` (48×48)
539-
- Both logos use React `key` prop with current mode to prevent rendering issues on theme switch
540-
- **Toggle Button**:
534+
- Both logos use a stable React `key` strategy to avoid visual rendering artifacts during appearance updates
535+
- **Sidebar Button**:
541536
- Uses `ChevronLeftIcon` when expanded (indicates collapse)
542537
- Uses `ChevronRightIcon` when collapsed (indicates expand)
543538
- Dynamic `aria-label` for accessibility
544539
- **Layout Adaptation**:
545540
- Collapsed state uses vertical flex layout (`flex-col`) to center icon and button
546541
- Navigation items hide text labels when collapsed, showing only icons
547542
- Export/Import section and Quick Add text hidden when collapsed
543+
- Expanded width can be changed by dragging the sidebar edge and is saved in settings/presets
548544

549545
**User Experience**:
550546

551547
- Click chevron arrow to collapse/expand sidebar
548+
- Drag the right edge of the sidebar to resize it
552549
- Icons-only view when collapsed saves screen space
553550
- Square logo icon maintains branding in collapsed state
554551
- Smooth 300ms transition animation
@@ -602,10 +599,10 @@ bytebox/
602599
| -------------------- | --------- | --------------------------------------- |
603600
| **Pink** | `#ec4899` | Primary accent, gradients, focus states |
604601
| **Purple** | `#8b5cf6` | Secondary accent, gradients |
605-
| **Dark Background** | `#0a0a0a` | Main background (dark mode) |
606-
| **Light Background** | `#ffffff` | Main background (light mode) |
607-
| **Text Dark** | `#1f2937` | Primary text (light mode) |
608-
| **Text Light** | `#f9fafb` | Primary text (dark mode) |
602+
| **Surface Base** | `#0a0a0a` | Primary app background surface |
603+
| **Surface Contrast** | `#ffffff` | High-contrast background/surface option |
604+
| **Text Primary Dark**| `#1f2937` | Dark text token for bright surfaces |
605+
| **Text Primary Light** | `#f9fafb` | Light text token for deep surfaces |
609606

610607
### Typography
611608

@@ -738,7 +735,7 @@ npm run dev # → http://localhost:3000
738735
- [ ] Build succeeds (`npm run build`)
739736
- [ ] Manual testing (drag & drop, search, filters, etc.)
740737
- [ ] Export/import works
741-
- [ ] Theme toggle works
738+
- [ ] Appearance settings apply and persist
742739
- [ ] Keyboard shortcuts work (`Cmd+K`, `ESC`)
743740

744741
---

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
### 🎯 **Core Functionality**
2020

21-
- **📦 Kanban-Style Boards** — Organize resources into customizable categories with responsive columns that stretch to fill your viewport
21+
- **📦 Kanban-Style Boards** — Organize resources into customizable categories with drag-sortable columns and adjustable column widths
2222
- **🧭 View Mode Selector** — Switch between All Cards, Most Recent, Starred Only, and By Tag views with keyboard shortcuts (`⌘1-4`)
2323
- **🏷️ Smart Tagging** — Add multiple tags with color-coded filtering (AND/OR logic)
2424
- **⭐ Star Favorites** — Mark important cards as starred for quick access with dashboard filtering
@@ -35,11 +35,11 @@
3535
- **Adjustable Glass Intensity** — A transparency slider (Clear → Frosted) instantly recalibrates blur, opacity, and shadows to match your wallpaper.
3636
- **Accent Theme Library** — Swap between 6 built-in palettes (Byte Classic, Neon Night, Rainbow Sprint, Midnight Carbon, Sunset Espresso, Pastel Haze) or build your own 2–6 color palette.
3737
- **Icon Palettes** — Choose from 6 curated icon stacks (Neon Grid, Carbon Tech, Espresso Circuit, Rainbow Loop, Pink Pulse) or set a custom hex color.
38-
- **Background Playground** — Solid color picker, custom 2–4 color gradients with angle control, 8 curated gradient presets, and 12 built-in wallpapers (plus custom uploads).
39-
- **Typography Controls** — Choose from 17 UI fonts and 13 mono fonts independently (Inter, Geist, Poppins, Indie Flower, JetBrains Mono, Fira Code, and more).
40-
- **Settings Presets** — Save the entire appearance (mode, accent/icon, background, fonts, glass) as named profiles; apply or delete anytime.
38+
- **Background Playground** — Solid color picker with built-in swatches, saveable custom solid colors, custom 2–4 color gradients with angle control, saveable custom gradients, curated gradient presets, and 12 built-in wallpapers (plus custom uploads).
39+
- **Typography Controls** — Choose from 17 UI fonts and 13 mono fonts independently, plus dedicated size controls for UI labels, body text, category headers, card titles, and code blocks.
40+
- **Resizable Layout Controls** — Drag-resize sidebar width and board column width, then save those dimensions as part of your settings/presets.
41+
- **Settings Presets** — Save the entire appearance (accent/icon, background libraries, fonts/sizes, layout widths, glass) as named profiles; apply or delete anytime.
4142
- **Database-Backed Persistence** — All theme settings persist to SQLite database, surviving browser clears and syncing across sessions.
42-
- **System Detection** — Defaults to your OS preference on first load.
4343

4444
### 💾 **Data Management**
4545

@@ -267,17 +267,12 @@ Open [http://localhost:1334](http://localhost:1334) in your browser. 🎉
267267
1. Head to **Settings → Appearance**.
268268
2. Use the **Glass Transparency** slider to shift the interface from airy to frosted depending on your wallpaper.
269269
3. Pick an **Accent Theme** (or build a custom 2–6 color palette) and an **Icon Palette** (or custom hex).
270-
4. Choose **Background**: solid color, custom 2–4 color gradient with angle, one of 8 gradient presets, or one of 12 built-in wallpapers — upload your own if you prefer.
271-
5. Set **Typography**: pick from 17 UI fonts and 13 mono fonts separately.
272-
6. Toggle **Light/Dark Mode** with the sun/moon button in the header.
273-
7. Click **Save preset** to store the whole setup (mode, colors, background, fonts, glass) and reapply it later.
270+
4. Choose **Background**: solid color (with built-in swatches and saveable custom colors), custom 2–4 color gradient with angle (saveable custom gradients), one of 8 built-in gradient presets, or one of 12 built-in wallpapers — upload your own if you prefer.
271+
5. Set **Typography**: pick from 17 UI fonts and 13 mono fonts, then tune UI/body/category/card/code text sizes.
272+
6. Adjust **Layout Widths**: set sidebar width and board column width (or drag-resize directly in the UI).
273+
7. Click **Save preset** to store the whole setup (colors, background libraries, fonts/sizes, sidebar/column widths, glass) and reapply it later.
274274
8. All settings persist to the database and the entire UI updates in real time.
275275

276-
### 🌙 **Theme Toggle**
277-
278-
- Click the **sun/moon icon** (top-right) to switch between dark and light base themes.
279-
- Accent/icon palettes remain in sync as you switch modes.
280-
281276
---
282277

283278
## 🗂️ Project Structure
@@ -297,7 +292,7 @@ bytebox/
297292
│ ├── components/
298293
│ │ ├── cards/ # Card, DraggableCard, CardModal, CreateCardModal
299294
│ │ ├── layout/ # AppLayout, Board, DraggableBoard
300-
│ │ └── ui/ # Tag, SearchBar, FilterPanel, CodeBlock, ThemeToggle, ExportImport, ViewModeSelector, Lightbox
295+
│ │ └── ui/ # Tag, SearchBar, FilterPanel, CodeBlock, ExportImport, ViewModeSelector, Lightbox
301296
│ ├── contexts/
302297
│ │ └── ThemeContext.tsx # Theme, accent, icon, background, font controller
303298
│ ├── hooks/

dev.db

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)