lit / lit/lit.dev

[docs] Expand on controllers & directive doc

Open
#1,156 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

Suggested by @bennypowers

We have a section in the docs describing combinations of controllers and directives: https://lit.dev/docs/composition/controllers/#controllers-and-directives

It would be good to add a bit more details there, maybe show some code and/or link to examples.

Directive controllers -> Add more concrete code of how to add controller to host from directive's update? Ex. `@lit-labs/motion`'s `animate()` directive.

Controllers owning directive -> We have some incomplete code example in the doc. Could add more to that. Another example is final form integration controller exposing directive for binding https://lit.dev/playground/#gist=08b866474027f36eaa0d1863a61c7065

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Controllers and Directives section at the linked lit.dev documentation page. Review the @lit-labs/motion animate() directive and the final form integration controller playground example for concrete patterns. Done means the section has clearer code examples or links explaining both directive controllers and controllers that own directives.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.