Skip to content

feat: responsive UI enhancements (v1.22.0)#53

Merged
Data-Wise merged 10 commits intodevfrom
feature/responsive-ui
Feb 26, 2026
Merged

feat: responsive UI enhancements (v1.22.0)#53
Data-Wise merged 10 commits intodevfrom
feature/responsive-ui

Conversation

@Data-Wise
Copy link
Copy Markdown
Owner

Summary

  • Minimum window size (900x600) and window position memory via tauri-plugin-window-state
  • Auto-collapse sidebars on resize — right first, then left, maintaining 500px minimum editor width (useResponsiveLayout hook)
  • Right sidebar resize handle with drag + touch support (250–600px range, double-click to reset)
  • Global zoom via ⌘+/⌘- (50%–200%, WCAG 1.4.4 compliant, useGlobalZoom hook)
  • Touch resize support, .resizing CSS class during drag, reduced-motion audit
  • 42 new tests (2,322 total), full documentation update across 18 doc files

New files

  • src/renderer/src/hooks/useResponsiveLayout.ts
  • src/renderer/src/hooks/useGlobalZoom.ts
  • 5 test files (ResponsiveFoundation, useResponsiveLayout, RightSidebarResize, useGlobalZoom, ResizeHandleTouch)

Modified

  • App.tsx — integrated hooks, ResizeHandle, zoom indicator
  • ResizeHandle.tsx — touch events, onDragStateChange callback, useRef for stale closures
  • useAppViewStore.tsRIGHT_SIDEBAR_WIDTHS constants, autoCollapsedLeft/Right state
  • index.css.resizing class, .zoom-indicator, reduced-motion rules
  • tauri.conf.jsonminWidth/minHeight, hiddenTitle
  • Cargo.toml / lib.rstauri-plugin-window-state

Test plan

  • Unit tests pass (42 new, 2,322 total)
  • Visual test: auto-collapse at 850px (right sidebar collapses)
  • Visual test: auto-collapse at 640px (both sidebars collapse)
  • Visual test: auto-restore at 1400px (sidebars re-expand)
  • Visual test: zoom ⌘+ to 130% (indicator shows, all elements scale)
  • Visual test: zoom indicator hidden at 100%
  • Visual test: resize handle drag (320→420px)
  • Visual test: double-click reset (→320px)
  • Visual test: width clamping (min=250, max=600)
  • Manual: Tauri-native window-state persistence (quit/relaunch)
  • Manual: macOS Stage Manager, split-screen, Sequoia snap zones

🤖 Generated with Claude Code

Test User and others added 10 commits February 25, 2026 14:50
5-increment plan covering window resize behavior, auto-collapse sidebars,
global zoom, right sidebar resize handle, and macOS window arrangement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…structure

Install tauri-plugin-window-state for persisting window geometry across
restarts. Set minimum window dimensions (900x600), enable hiddenTitle for
cleaner title bar, and add CSS transition infrastructure for both sidebars
including a .resizing class to disable transitions during drag. All new
transitions respect prefers-reduced-motion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add useResponsiveLayout hook with debounced resize listener that
auto-collapses sidebars when the editor drops below 500px. Right
sidebar collapses first, then left. Re-expands when window grows
back, respecting user overrides to avoid fighting manual toggles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline right sidebar resize handler with the shared ResizeHandle
component for consistent behavior, ARIA attributes, and double-click
reset. Extract RIGHT_SIDEBAR_WIDTHS constants (min: 250, default: 320,
max: 600) and use them for clamping and collapsed icon width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add useGlobalZoom hook providing ⌘+/⌘- zoom (0.5x–2.0x range, 10%
steps). Persists to localStorage, applies via root font-size scaling
for rem-compatible zooming. Adds a zoom indicator in the editor header
that appears when zoom ≠ 100% and resets on click. WCAG 1.4.4 compliant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add touch event handlers (touchstart/touchmove/touchend) to ResizeHandle
for trackpad and touch-screen resize. Add onDragStateChange callback so
parent sidebars apply .resizing class during drag, disabling CSS
transitions for instant feedback. Complete reduced-motion audit covering
zoom indicator and all new transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update SPEC to implemented status, add responsive layout system section
to ARCHITECTURE.md with Mermaid data flow diagram, and document new
hooks (useResponsiveLayout, useGlobalZoom) and ResizeHandle in COMPONENTS.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bump version (1.20.0 → 1.22.0) and test count (2,280 → 2,322) across
18 files. Add Responsive Layout section to features guide, Zoom shortcuts
to shortcuts guide, v1.22.0 entry to reference changelog, and responsive
UI status to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix stale rightSidebarWidth in onResizeEnd via useRef (closure bug)
- Remove as any cast on expandSmartIcon (type was already correct)
- Delete ORCHESTRATE-responsive-ui.md (working artifact, not for dev)
- Fix package-lock.json version drift (1.21.0 → 1.22.0)
- Remove unused autoCollapsedLeft/Right from Zustand store (tracked in hook refs)
- Remove redundant aria-valuenow={undefined} from ResizeHandle
- Update docs to reflect hook-internal state tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Data-Wise Data-Wise merged commit 669f44c into dev Feb 26, 2026
@Data-Wise Data-Wise deleted the feature/responsive-ui branch February 26, 2026 17:48
Data-Wise pushed a commit that referenced this pull request Feb 26, 2026
npm version only bumped package.json — tauri.conf.json and Cargo.toml
were still at 1.21.0. Also resolves merge conflict in .STATUS from
PR #53 merge and archives completed test-file-errors doc.

Co-Authored-By: Claude Opus 4.6 <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.

1 participant