Templates: category tabs + new starters with theme presets#16
Merged
Templates: category tabs + new starters with theme presets#16
Conversation
Adds five new starters (docs-home, changelog, status-page, blog-post, dashboard-skeleton) and a category dimension that groups every template into one of four buckets: - :landing — the original eight realistic marketing-site scaffolds. - :docs — docs-home, changelog, status-page, blog-post. - :dashboard — dashboard-skeleton. - :demo — kinetic-showcase. The templates panel grows a tab bar above the card list. `:all` is the default tab and renders every template in declared order; the four real-category tabs filter to their members. Tab state is local to the panel via a JS-object closure — transient UI state with no need to enter state/app-state. Active class hops between sibling tabs without rebuilding the bar so clicks feel instant. Two new public helpers carry the data: - `category-order` / `category-labels` — the tab list and display names. Update both in lockstep when adding a category. - `templates-in-category` — pure filter; `:all` is the pseudo-cat that returns the full registry. Tested independently. Coverage: bareforge.ui.templates-test (9 tests, 122 assertions) asserts every template carries the required fields, every category is declared, every category's filter respects its membership, and every builder thunk produces a non-empty doc. Test count: 584 → 593. Gates green: - cljfmt check — clean. - npx shadow-cljs compile test — 593 tests / 1935 assertions / 0 failures. - npx shadow-cljs release app — 0 warnings. - clj-kondo — 0 errors / 0 warnings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The new docs / dashboard / blog templates landed without explicit vertical breathing room — sections sat against each other and the result felt cramped against the existing eight landing templates, which use spacers liberally between sections. New private helper `add-spacer` (vertical x-spacer with a CSS- length size) drops the boilerplate. Section breaks across the five new templates pick up reasonable rhythm: - docs-home: 2rem after navbar; 0.75rem heading→subtitle; 2rem before grid; 0.5rem inside each card between title and body. - changelog: 0.5rem heading→subtitle; 2rem before first release; 0.5rem inside each card between header and body; 1rem between releases (omitted after the last so trailing whitespace doesn't drift). - status-page: 1rem after title; 2.5rem after the alert; 0.75rem heading→content for both sub-sections; 2.5rem between the services grid and the incidents heading. - blog-post: 0.5rem after the overline; 1.5rem after the headline; 1.5rem on either side of the divider; 1rem between body paragraphs (omitted after the last). - dashboard-skeleton: 1.5rem after navbar; 1rem heading→stats; 2rem stats→activity card; 0.5rem inside the activity card. Reduce paths that append release / paragraph bodies switched from explicit `(+ N i)` indices to `slot-count` + a per-iteration last-item check so the trailing-spacer omission stays correct without manual index bookkeeping. Gates green; 593 tests still passing, 0 release-build warnings, 0 lint warnings, formatting clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
apply-template! preserves the user's current theme by default —
loading a landing template shouldn't wipe theme tweaks the user
already made. Templates that declare a `:theme-preset` now switch
to that preset instead, so the visual rhythm of the new starters
lands as designed.
Theme assignments across the five new templates pick distinct
presets so the Templates panel doubles as a theme showcase:
- docs-home → ocean (calm, friendly trusted-doc feel)
- changelog → mono-ai (release-notes / code aesthetic)
- status-page → forest ("all systems green" energy)
- blog-post → warm-mineral (warm reading-friendly tones)
- dashboard-skeleton → aurora (vibrant data-viz palette)
The eight pre-existing landing templates remain preset-free, so
loading them keeps whatever theme the user has dialled in.
Test coverage: theme-presets-are-real asserts every declared
preset is one of the eight in `theme-editor/presets`. Drift
(typo in a preset name, BareDOM removing a preset) fails loudly.
Test count 593 → 594. Gates green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The eight original landing templates had no :theme-preset, so loading one preserved whatever theme the prior document used. Loading a themed starter (e.g. docs-home → ocean) and then the SaaS hero would leave the SaaS hero rendered in ocean — drift the user noticed as "all landing page templates now use ocean". Pinning each landing template to "default" makes the load reproducible: the template-load flow honours :theme-preset and resets to that preset on apply. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avanelsas
added a commit
that referenced
this pull request
May 2, 2026
* Release v0.3.0 — minor release with multi-step actions, State panel, inline binding chip, templates revamp + Hickey-style export pipeline refactor Promotes the [Unreleased] section in CHANGELOG.md to a tagged [0.3.0] — 2026-05-02 entry, adds the standard ### Verified block, and refreshes the comparison links at the bottom. package.json's version bumps 0.2.0 → 0.3.0 to match. This is a minor (not patch) release because PRs #16-#19, #21 add substantial editor surfaces (multi-step actions, live State panel, inline binding chip, templates panel revamp with five new starters, inspector field-as-data foundation), and PRs #20 / #23 / #24 / #25 land the full Hickey-style refactor of the export pipeline (clj-form data values for every codegen path; lower-document as the canonical lowered model every plugin consumes). PRs #15 and #22 fix three reconciler bugs along the way. Saved project files are unchanged; every export target stays at parity. Verified locally: - 747 tests / 2243 assertions / 0 failures / 0 errors. - npx shadow-cljs release app — 0 warnings under Closure Advanced. - clj-kondo --lint src test scripts — 0 errors, 0 warnings. - cljfmt check — all files formatted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * CHANGELOG: tighten v0.3.0 entry Drop the per-PR detail in favour of a brief summary. Each bullet is one line / one short paragraph; the inline rationales and namespace-level notes move out of the changelog (commit messages and PR descriptions are the canonical record for those). Net: 165 lines of v0.3.0 entry → 60 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:all,:landing,:docs,:dashboard,:blog).:theme-presetthat is applied at instantiation; landing starters pin to the default preset.add-spacerhelper for consistent vertical rhythm across builders.Test plan
clj-kondo --lint src test scripts— 0/0cljfmt check— cleannpx shadow-cljs compile test— 594 tests / 1948 assertions, 0 failnpx shadow-cljs release app— 0 warnings🤖 Generated with Claude Code