Skip to content

Template gallery: pagination and form validation display - #102

Merged
ManavA merged 1 commit into
mainfrom
feat/keel-94
Sep 20, 2026
Merged

ManavA merged 1 commit into
mainfrom
feat/keel-94

Conversation

@ManavA

@ManavA ManavA commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Closes #94.

What was missing: the gallery already showed empty states, flash messaging, and both themes (landing + dashboard) with theming in tokens. This adds the two remaining blocks from the issue:

  • pagination: new blocks/pagination.html block rendered under the list on the notes and app pages. It names the count and says whether older notes lie beyond the page (HasMore comes from the List next cursor). Token-only styling.
  • form validation display: the note form now marks the title field inline on a 422 (field-error message with role=alert, aria-invalid and aria-describedby on the input) in addition to the flash. The gallery renders the form in its error state to show it.

Parity: the new block is mirrored in cmd/keel/testdata/minimal, pinned in TestNewGeneratesAMinimalProject, and covered by TestTemplateMatchesExample. gengallery requires docs and sample data for every block, so gallery.html and both theme fragments are regenerated from the real templates.

Evidence:

  • Failing first: new tests failed before the implementation (unknown fields TitleError/HasMore; missing pagination.html in the generated project).
  • KEEL_REQUIRE_DB=1 go test -count=1 ./examples/minimal/ ok (9.1s, includes the 422 field-error assertion and pagination branch tests).
  • KEEL_REQUIRE_DB=1 go test -count=1 ./cmd/keel/ ok (7.2s, includes scaffold boot tests).
  • go test ./site/ ok (gallery covers all 6 blocks in both themes).
  • gofmt clean, go vet clean on the touched packages, go build ./... ok. golangci-lint is not installed here, so that check did not run.

@ManavA
ManavA merged commit ad47b1a into main Sep 20, 2026
8 checks passed
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.

Template gallery: more blocks and a second theme

1 participant