docs: UI/UX improvement plan for all examples#52
Conversation
Closes #51 (plan phase) Includes: - UX audit findings across all 10 templates - Visual design principles (narrow layout, compact buttons, single-row toolbars) - Shared CSS specification (livetemplate.css) - Per-example fix proposals with current vs improved comparisons - CLAUDE.md guideline additions - 14 implementation todos with dependency graph Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new documentation plan describing a repository-wide UI/UX and code-hygiene standardization effort across all LiveTemplate examples (Issue #51), including shared CSS utilities and template/controller refactors to align with CLAUDE.md guidelines.
Changes:
- Added a comprehensive multi-phase implementation plan for UI/UX consistency across all examples.
- Proposed shared CSS utilities (
livetemplate.css) and a consistent HTML boilerplate/layout standard. - Outlined per-example refactor tasks plus expected test update impacts and a dependency graph.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Phase 1: Create Shared CSS (`livetemplate.css`) | ||
|
|
||
| Create `../client/livetemplate.css` (relative to examples root) with reusable utilities: |
There was a problem hiding this comment.
The plan says to create the shared CSS at ../client/livetemplate.css “relative to examples root”, but this repo’s examples root is the repository root and there is no client/ directory here. This path would also point outside the repo from root. Please clarify the intended location within this repository (e.g., a client/ or clients/ directory at repo root) and update the plan to use a consistent path that all examples can serve reliably.
| ## Phase 1: Create Shared CSS (`livetemplate.css`) | |
| Create `../client/livetemplate.css` (relative to examples root) with reusable utilities: | |
| ## Phase 1: Create Shared CSS (`client/livetemplate.css`) | |
| Create `client/livetemplate.css` at the repository root so all examples can reference and serve the same shared stylesheet reliably: |
|
|
||
| ### 4b. All examples — serve shared CSS | ||
| - Each example's main.go serves `/livetemplate.css` at runtime via `http.ServeFile` pointing to `../client/livetemplate.css` | ||
| - Templates link it with `<link rel="stylesheet" href="/livetemplate.css">` | ||
| - For production/CDN, the CSS would be published alongside the client JS package |
There was a problem hiding this comment.
Issue #51 / PR description calls out putting reusable CSS in ../clients/livetemplate.css, but this plan refers to ../client/livetemplate.css (singular) and later suggests serving it via http.ServeFile from that location. Align the plan with the agreed directory name/location and update the serving approach accordingly so contributors don’t implement the wrong path.
| 2. **Add `<meta name="color-scheme" content="light dark">`** to all `<head>` blocks | ||
| 3. **Remove `data-theme="light"`** from todos template | ||
| 4. **Link shared CSS**: `<link rel="stylesheet" href="/livetemplate.css">` in all templates | ||
| 5. **Serve shared CSS**: Add `http.Handle("/livetemplate.css", ...)` in each example's main.go (or via the testing framework) |
There was a problem hiding this comment.
The plan suggests adding http.Handle("/livetemplate.css", ...) in each example’s main.go, but several examples use a dedicated http.NewServeMux() (e.g., counter, ws-disabled) and pass that mux to ListenAndServe. In those cases http.Handle would register on the default mux and the CSS route won’t be served. Recommend updating the plan to register the handler on whatever mux each example is using (or standardize on one pattern).
| 5. **Serve shared CSS**: Add `http.Handle("/livetemplate.css", ...)` in each example's main.go (or via the testing framework) | |
| 5. **Serve shared CSS**: Register `/livetemplate.css` on the same mux each example passes to `ListenAndServe` (for examples using the default mux, `http.Handle(...)` is fine; for examples using `http.NewServeMux()`, use `mux.Handle(...)` or standardize on one serving pattern). This can also be done via the testing framework. |
UI/UX Improvement Plan
Adds
docs/plans/improve-ui-ux.md— a comprehensive plan to improve the visual design and code quality of all examples.Key Proposals
Visual improvements:
<fieldset role="group"><article>+<hgroup>Code hygiene:
lang="en",color-schememeta to all templatesShared CSS (
livetemplate.css):--pico-container-max-width: 640px— narrow layout.compact— smaller buttons for inline actions.visually-hidden— accessible hidden labels.inline— margin-free forms for tables/toolbarsCLAUDE.md additions:
14 implementation todos with dependency graph
See
docs/plans/improve-ui-ux.mdfor full details.Ref: #51