From f8e9d1945f43486d518f85898dc0c0f5592238b8 Mon Sep 17 00:00:00 2001 From: Adnaan Date: Mon, 6 Apr 2026 00:14:51 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20revise=20UI/UX=20plan=20=E2=80=94=20tod?= =?UTF-8?q?os=20showcase,=20shared=20CSS,=20CSP=20compliance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite the UI/UX improvement plan to focus on: - Todos as the flagship README showcase with two-tab demo GIF - Shared semantic CSS in livetemplate.css (compact, visually-hidden, inline, chat styles) - Strict CSP compliance — fix all inline JS/styles across examples - Leverage latest client features (v0.8.19): lvt-on:change, lvt-el:, lvt-fx:, data-lvt-target - New CLAUDE.md constraints for future examples Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/plans/improve-ui-ux.md | 682 ++++++++++++++++++++++++++---------- 1 file changed, 497 insertions(+), 185 deletions(-) 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 `