Skip to content

docs: UI/UX improvement plan for all examples#52

Merged
adnaan merged 1 commit intomainfrom
plan/improve-ui-ux
Apr 4, 2026
Merged

docs: UI/UX improvement plan for all examples#52
adnaan merged 1 commit intomainfrom
plan/improve-ui-ux

Conversation

@adnaan
Copy link
Copy Markdown
Contributor

@adnaan adnaan commented Apr 4, 2026

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:

  • Narrow focused layout (640px max-width via shared CSS)
  • Compact action buttons for inline use in tables/toolbars
  • Single-row toolbars using <fieldset role="group">
  • Consistent card structure with <article> + <hgroup>

Code hygiene:

  • Remove all inline styles (ws-disabled has 5 violations)
  • Remove all custom CSS blocks (progressive-enhancement, chat, todos)
  • Remove inline JavaScript (shared-notepad, progressive-enhancement, avatar-upload)
  • Add missing lang="en", color-scheme meta to all templates

Shared 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/toolbars

CLAUDE.md additions:

  • HTML boilerplate standard
  • Visual layout standard
  • Button sizing guidelines
  • Form pattern standard
  • List/item display standard

14 implementation todos with dependency graph

See docs/plans/improve-ui-ux.md for full details.

Ref: #51

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>
Copilot AI review requested due to automatic review settings April 4, 2026 05:13
@adnaan adnaan merged commit 02f1ba0 into main Apr 4, 2026
8 of 11 checks passed
@adnaan adnaan deleted the plan/improve-ui-ux branch April 4, 2026 05:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +30 to +32
## Phase 1: Create Shared CSS (`livetemplate.css`)

Create `../client/livetemplate.css` (relative to examples root) with reusable utilities:
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
## 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:

Copilot uses AI. Check for mistakes.
Comment on lines +196 to +200

### 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
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.
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