Skip to content

feat(docs): 677 — demo page for custom path atoms (yyyy-mm-dd, name.ext) - #97

Open
randomdevpete wants to merge 1 commit into
task-679-investigate-per-demo-scoped-store-contextfrom
task-677-complex-routing-demo-custom-path-atoms
Open

feat(docs): 677 — demo page for custom path atoms (yyyy-mm-dd, name.ext)#97
randomdevpete wants to merge 1 commit into
task-679-investigate-per-demo-scoped-store-contextfrom
task-677-complex-routing-demo-custom-path-atoms

Conversation

@randomdevpete

Copy link
Copy Markdown
Owner

Summary

Adds a new /demos/complex-routing page demonstrating custom single-segment path atoms built directly on routeAtom (not staticRouteAtom/paramRouteAtom):

  • yyyy-mm-dd archive-date segment parsed to {year, month, day} and validated against real calendar dates via validateAtom, showing a valid leap-year date (2024-02-29) and an invalid one (2023-02-29) to demonstrate validation rejection.
  • name.ext filename segment parsed to {name, ext}, including a file with a dot in the base name to show the regex correctly splits only on the last dot.

Implementation

Both custom atoms are self-contained factories demonstrating the pattern for single-segment parsing. Registry edits (routes.ts) are purely additive, allowing ticket 678 to stack cleanly. SSG/SSR paths only include valid calendar dates to ensure the build succeeds.

Notes

One exception to CODING-STYLE.md section 2: dateSegmentRouteAtom has a multi-line docblock despite being an internal function. This is justified as teaching material on a public docs site where clarity warrants the exception.

Stacked on PR #96 (task-676-demo-page-cancel-navigation-dirty-edits).

@randomdevpete randomdevpete changed the title feat(docs): demo page for custom path atoms (yyyy-mm-dd, name.ext) feat(docs): 677 — demo page for custom path atoms (yyyy-mm-dd, name.ext) Aug 19, 2026
Adds /demos/complex-routing: routeAtom-built single-segment atoms for a
yyyy-mm-dd archive date (gated on the real calendar with validateAtom)
and a name.ext filename.

Ticket: 677
@randomdevpete
randomdevpete changed the base branch from task-676-demo-page-cancel-navigation-dirty-edits to task-679-investigate-per-demo-scoped-store-context August 21, 2026 03:37
@randomdevpete
randomdevpete force-pushed the task-677-complex-routing-demo-custom-path-atoms branch from 099b87a to ad941aa Compare August 21, 2026 03:37
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.

1 participant