docs: add guided documentation for the library - #28
Draft
dogmar wants to merge 1 commit into
Draft
Conversation
Replace the stub Getting Started page with a full set of guided docs modeled on Base UI's documentation structure: - Overview: Introduction (what/why, comparison with other date pickers), Quick start (install → assemble → read value → style), and Accessibility (keyboard map, ARIA semantics, localization) - Guides: Composition (component tree, templates, render prop, custom parts), Styling (data-attribute reference, CSS/Tailwind, range overlays), Selection modes (single/multiple/range, controlled/uncontrolled, rangeMode, previews, drag handles), and Dates & formats (temporal prop, format types, subpaths, tz/locale) - Components: rewrite CalendarProvider, MonthView, and WeeksView pages with guided prose and examples ahead of the API tables Also: - Fix basic-calendar example: MonthView creates its own provider, so the outer CalendarProvider's onValueChange was never wired up; pass props to MonthView directly and model the temporal prop - Add range-calendar, multiple-months, and weeks-view-basic examples - Point the landing page CTA at /docs/quick-start Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019HXuPqRT1HnbeqSKMrAhjs
✅ Deploy Preview for colander-cal ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Adds full guided documentation to the docs site, modeled on Base UI's docs structure. Until now the site had a stub Getting Started page and three API-table-only component pages; this PR adds a proper Overview → Guides → Components narrative around the autogenerated API reference.
New pages (
website/content/docs/)Overview
temporal, assembling a complete calendar step-by-step, reading the selection, and a working plain-CSS styling pass.keyboard.ts), roving tabindex, grid semantics/labelling, live regions, drag-handle ARIA, localization, and the consumer's responsibilities (focus rings, contrast, hit targets).Guides
MonthViewvsCalendarProvider+MonthView.Root, therenderprop contract, and building custom parts with the hooks/contexts.data-*attribute reference (verified againstdayStateAttributesMappingand each component's mapping), plain CSS + Tailwind examples, range overlays, and grid-layout tips (--calendar-days-per-week).onValueChangemeta, the sixrangeModepolicies,preventRangeReversal, hover preview /previewRange,setRange, drag handles, and date restriction props.temporalprop and polyfill options, theformattable, format-narrowed subpath entry points, bounds, time zones, locale, andweekStartDay.Components (rewritten with guided prose;
{% api %}tables kept at the bottom)fixedWeeks,outsideDays, bounds behavior, week numbers.firstWeekspecs, scrolling +scrollToWeeksnap modes, all fiveoutOfRangeBehaviorvalues, month separators.Example fixes/additions (
website/src/examples/)basic-calendar.tsx: it wrappedCalendarProvideraroundMonthView, butMonthViewcreates its own inner provider — so the outeronValueChangewas never wired to the grid. The example now passes props toMonthViewdirectly, adds header navigation, and models thetemporalprop as consumers need it.range-calendar.tsx,multiple-months.tsx,weeks-view-basic.tsxexamples referenced by the guides./docs/quick-start(old route is pruned automatically).Verification
pnpm readypasses (fmt, lint, 445 package + 54 website tests).pnpm --filter website buildsucceeds; all 10 doc routes generate.vite preview: sidebar section order (Overview → Guides → Components → API groups), GFM tables, TS/JS example tabs, and API tables all render correctly.Notes / possible follow-ups
{% example %}blocks are code-only today; live rendered previews would be a nice follow-up feature for these guides.website/src/config.tsGITHUB_REPO_URLpoints atdogmar/colanderrather thanklink-ing/colander— left untouched here, but worth a look.🤖 Generated with Claude Code
https://claude.ai/code/session_019HXuPqRT1HnbeqSKMrAhjs
Generated by Claude Code