Compare: templ → gsx migration of examples#30
Open
jackielii wants to merge 13 commits into
Open
Conversation
jackielii
commented
Jun 25, 2026
…lter Rewrite the gsx examples to use gsx pipeline filters instead of ctx-threading structpages.URLFor/ID/IDTarget calls. Each example wires url/id/target via a cmd/gen generator (gen.WithFilter), regenerated .x.go included. Full working examples (build green), comparing against the templ baseline (PR base).
… body param
A custom-body wrapper component should ride the built-in Children prop rather
than declaring a bespoke body gsx.Node param. Drop the param, use {children} in
the body; the Go caller passes AdminShellWithProps{…, Children: body}.
… package, not a binary `examples/blog/blog` (no trailing slash) matched the blog feature SOURCE directory, forcing its files to be force-added. The blog example is run via `go run .` and can't even build a `blog` binary there (the name collides with the source subdir), so there is no binary to ignore — remove the line.
…a installed gsx) Claude-Session: https://claude.ai/code/session_01AVv1VYM5pjrSTVfYtBDzBG
Match the renamed gsx config schema (gsx [aliases] -> [filters]). Also fix the stale 'go tool gsx' comment to 'gsx generate .' (the tool directive was removed).
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.
Side-by-side comparison of the structpages examples written in templ (base branch) vs gsx (this branch). This is a review/comparison artifact, not for merge — it shows the authoring difference between the two templating approaches.
Scope
.templ↔.gsx). Generated files (*_templ.go,*.x.go) are omitted on both sides so the diff is the hand-written authoring experience, not machine output.examples/— all library/.gocode is identical on both branches, so it does not appear in the diff.{pages.templ => pages.gsx}); ones that were reworked show as paired add/delete.What to look at
blog/blog/components.templhas no gsx counterpart: the gsx rewrite consolidated those shared primitives intoblog/ui/components(one-way dependency: features → ui).*Propsstructs (no generated<Name>Props),Attrsfallthrough on components, kebab-named HTMX targets, nullaryPage()methods on route receivers.Caveats
main.