-
Notifications
You must be signed in to change notification settings - Fork 9
Consolidate all recipe development docs #1688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate all recipe development docs #1688
Conversation
|
@jsantell tagging you because I thought of a potentially clever/stupid idea: I made Previously, these files were in our This is but one part of a broad effort to clean up our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! handful of comments
| ### Conditional State Updates | ||
| ```typescript | ||
| const toggleItem = handler< | ||
| Record<string, never>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typing these events would go a long way it seems, let's talk more on how we can do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yah I don't know how to make the types easily available, but odds are most of the events take the shape:
type CommonEvent<T> = {
detail: T
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is a bit to be congruent with DOM events, but we should discuss whether we really want to carry this over to events that are clearly not DOM. Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the ct- components it seems reasonable to use detail and since these sometimes appear in a lit context outside of recipes where DOM conventions are expected?
Regardless of structure, what we need to do is associate the event types with the onClick etc. bindings via jsx.d.ts somehow so the handlers can infer the type... Seems tricky but possible.
Consolidate docs and update paths
c2080a6 to
f346c5f
Compare
labsfromrecipesrepo (see https://github.com/commontoolsinc/recipes/pull/47)docs/commonwhen runningct initSummary by cubic
Consolidated all recipe development docs under docs/common and updated references for a single, consistent source of truth (addresses CT-815). ct init now bundles these docs and copies them to .ct-docs for easy, offline access.
New Features
Refactors