diff --git a/docs/plans/improve-ui-ux.md b/docs/plans/improve-ui-ux.md index 7bc903c..7f121c8 100644 --- a/docs/plans/improve-ui-ux.md +++ b/docs/plans/improve-ui-ux.md @@ -1,43 +1,64 @@ -# Plan: Improve UI/UX of All Examples (Issue #51) +# Plan: Improve UI/UX — Todos as Showcase + Shared CSS + CSP Compliance -## Problem +## Context -The examples lack visual polish and consistency. Content stretches too wide, buttons are oversized for their context, controls are spread across multiple rows wasting vertical space, and each example feels like it was built by a different person. Additionally, there are inline styles/JS violating CLAUDE.md and missing accessibility attributes. The goal is to produce cohesive, production-quality examples with tight visual design and establish guidelines for future apps. +The examples lack visual consistency, have CSP violations (inline JS/styles), and the `livetemplate.css` in the client repo is underutilized (only 25 lines of CSS custom property defaults). The todos example should become the flagship showcase for the main README, demonstrating LiveTemplate's top features with minimal, readable code. UX extends to code readability — templates should be standard HTML with lvt attributes only when truly needed. -## Approach +This plan supersedes the previous UI/UX improvement plan with the latest library capabilities (client v0.8.19), CSP compliance, and showcase-first approach. -1. Use livetemplate/client/livetemplate.css to create common visual utilities (narrow container, compact buttons, visually-hidden) -2. Apply visual improvements to every template: narrow focused layout, compact action buttons, single-row toolbars, breathing space -3. Clean up code hygiene: remove inline styles/JS, fix accessibility -4. Update CLAUDE.md with established visual and coding standards -5. Verify all tests still pass +**Prerequisites**: Before starting implementation, update all dependencies to their latest versions: +- `github.com/livetemplate/livetemplate` — latest release +- `github.com/livetemplate/lvt` — latest pseudo-version +- `@livetemplate/client` — latest release (currently v0.8.19) ---- - -## Visual Design Principles +Run `go get -u` in each example's `go.mod` and update CDN script tags to pin the latest client version. -These apply to ALL examples: +--- -1. **Narrow, focused layout** — All examples are single-purpose apps. Constrain content to ~640px max-width for a focused feel with breathing space on wider screens. -2. **Single-row toolbars** — Group related controls (search + sort, action buttons) into one horizontal row using `
` or `