Skip to content

feat: Add comprehensive appearance customization system#151

Open
olereon wants to merge 6 commits into
winfunc:mainfrom
olereon:feature/appearance-customization
Open

feat: Add comprehensive appearance customization system#151
olereon wants to merge 6 commits into
winfunc:mainfrom
olereon:feature/appearance-customization

Conversation

@olereon

@olereon olereon commented Jul 6, 2025

Copy link
Copy Markdown

Feature: Add comprehensive appearance customization system

Summary

This pull request introduces a comprehensive appearance customization system to Claudia, addressing accessibility needs for users with high-resolution monitors and alternative keyboard layouts. The feature adds:

  • Global font scaling with 8 size options (12px to 32px) affecting ALL UI text
  • Universal panel width customization with 9 width options (768px to 2560px + full width) applying to ALL GUI panels
  • Responsive tab layout that prevents overflow at large font sizes
  • Keyboard layout support for COLEMAK, DVORAK, and WORKMAN with real-time translation

Problem Solved

  1. Accessibility on high-resolution monitors: Fixed font sizes make the UI difficult to read on 4K+ displays
  2. Screen space utilization: Default panel width doesn't make optimal use of wide monitors
  3. Tab overflow at large font sizes: Settings tabs overlapped when using 24px+ fonts
  4. Alternative keyboard layouts: Users with non-QWERTY layouts couldn't type correctly in the application

Approach

1. Global Font Scaling System

  • Implemented CSS custom properties (--font-scale) that cascade through the entire UI
  • Created font size variables that scale proportionally: --font-size-xs through --font-size-4xl
  • Override Tailwind utilities to use scaled sizes globally
  • Scale MDEditor toolbar: Buttons, icons, padding, and height scale with font size
  • Font sizes range from "small" (12px) to "giant" (32px)

2. Universal Panel Width Management

  • Added CSS variable --panel-max-width for dynamic panel sizing
  • Implemented 9 width options from "compact" (768px) to "ultra-wide+" (2560px) plus full width
  • Applied to ALL GUI panels: Settings dialogs, Usage Dashboard, CLAUDE.md editor, main content, modals, and all containers
  • Full width mode includes responsive padding for better readability
  • Uses data attributes and comprehensive CSS selectors for global application
  • Default changed to Ultra Wide (1920px) for better modern display support

3. Responsive Tab Layout

  • Fixed tab overflow issue at large font sizes (24px+)
  • Implemented responsive grid that adapts to screen size
  • Reduced tab text size on smaller screens while maintaining readability

4. Keyboard Layout Translation

  • Created comprehensive keyboard mappings for COLEMAK, DVORAK, and WORKMAN
  • Implemented real-time character translation at the input level
  • Added KeyboardInput and KeyboardTextarea components with automatic translation
  • Translation happens transparently without affecting clipboard or shortcuts

Technical Implementation

New Components

  • PreferencesContext - Centralized state management for appearance settings
  • KeyboardInput - Input component with layout translation
  • KeyboardTextarea - Textarea component with layout translation

New Hooks

  • usePreferences - Access appearance preferences throughout the app
  • useKeyboardLayoutInput - Handle keyboard translation logic

New Utilities

  • keyboardLayouts.ts - Complete keyboard layout mappings and translation functions

Modified Files

  • Settings.tsx - Added "Appearance" tab with all customization options
  • App.tsx - Integrated PreferencesProvider for app-wide preferences
  • FloatingPromptInput.tsx - Updated to use KeyboardTextarea for layout support
  • styles.css - Added global CSS scaling system
  • package.json - Added concurrently dependency for development workflow

Features Details

Font Size Options

  1. Small (12px) - For maximum content density
  2. Default (14px) - Standard size
  3. Medium (16px) - Slightly larger for comfort
  4. Large (18px) - Better readability
  5. Extra Large (20px) - High visibility
  6. Huge (24px) - Accessibility focused
  7. Massive (28px) - Maximum readability
  8. Giant (32px) - Ultra high visibility

Panel Width Options

  1. Compact (768px) - Minimal width
  2. Comfortable (1024px) - Standard laptop
  3. Spacious (1280px) - Standard desktop
  4. Wide (1440px) - Wide monitors
  5. Wider (1600px) - Ultra-wide
  6. Widest (1760px) - Maximum fixed
  7. Ultra Wide (1920px) - Full HD width (NEW DEFAULT)
  8. Ultra Wide+ (2560px) - NEW: Extreme wide displays
  9. Full Width - Responsive with padding

Keyboard Layouts

  • COLEMAK: Popular ergonomic layout
  • DVORAK: Classic alternative layout
  • WORKMAN: Modern ergonomic layout

Testing

  • ✅ TypeScript compilation passes without errors
  • ✅ Build process completes successfully
  • ✅ Font scaling affects all UI elements (menus, headers, content)
  • ✅ Panel width adjustments work correctly across ALL panels (Settings, Usage Dashboard, CLAUDE.md editor, main content)
  • ✅ MDEditor toolbar scales with font size settings (buttons, icons, height)
  • ✅ Keyboard layouts translate accurately
  • ✅ Preferences persist in localStorage
  • ✅ No console errors or warnings

Screenshots

Font Size Scaling

Claudia_2025-07-06-181453

Panel Width Options

Claudia_2025-07-06-181551

Keyboard Layout Settings

Claudia_2025-07-06-182237

Dependencies

  • Added concurrently@^8.2.2 for improved development workflow (dev:tauri script)

Notes

  • All features are opt-in with sensible defaults
  • Preferences are stored in localStorage for persistence
  • Keyboard translation doesn't affect system shortcuts or clipboard
  • CSS scaling ensures consistent proportions across all font sizes
  • Full JSDoc documentation added to all exported functions and components

Benefits

  1. Improved Accessibility: Users with visual impairments or high-res monitors can now comfortably use Claudia
  2. Better Screen Utilization: Wide monitor users can take advantage of their full screen real estate (including ultra-wide 2560px+ displays)
  3. Consistent Panel Sizing: All application panels now respect the width setting, providing a uniform experience
  4. Inclusive Design: Support for alternative keyboard layouts makes Claudia accessible to a wider audience
  5. Future-Proof: The preference system can be easily extended for additional customization options

This feature significantly improves the user experience and accessibility of Claudia while maintaining backward compatibility and following the project's coding standards.

olereon and others added 6 commits July 6, 2025 16:00
- Add Appearance tab in Settings with font size, panel width, and keyboard layout options
- Implement global font scaling system affecting all UI text (8 size options: small to giant)
- Add panel width customization with 8 options from compact (768px) to full width with padding
- Create keyboard layout support for COLEMAK, DVORAK, and WORKMAN with real-time translation
- Add PreferencesContext for centralized app preferences management
- Create KeyboardInput and KeyboardTextarea components with layout translation
- Implement CSS custom properties for dynamic font and panel scaling
- Update FloatingPromptInput to use keyboard-aware textarea component
- Add concurrently package and dev:tauri script for development workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add JSDoc comments to all exported functions and types
- Document component props and interfaces
- Add usage examples for hooks
- Improve code documentation for maintainability
- Fix tab overflow at large font sizes with responsive grid layout
- Apply panel width setting to ALL GUI panels (not just main content)
- Change default panel width to 1600px (wider option)
- Update CSS to target all max-width classes and common containers
- Improve accessibility for users with large fonts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…er coverage

- Add Ultra Wide+ (2560px) panel width option for extreme wide screens
- Change default panel width to Ultra Wide (1920px) for better modern display support
- Apply panel width settings to ALL GUI panels including Settings and Usage Dashboard
- Ensure max-w-4xl and max-w-6xl containers respect the global panel width setting
- Improve description to clarify panel width affects all panels, not just main content

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…tor toolbar

- Add specific CSS overrides for div.max-w-4xl, div.max-w-5xl, div.max-w-6xl to ensure Settings and other panels respect panel width setting
- Scale MDEditor toolbar buttons, icons, and height according to font size setting
- Apply font scaling to toolbar SVG icons and button padding for consistent UI scaling
- Fix panel width application for Settings, Usage Dashboard, and CLAUDE.md editor

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants