You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[labs/observers] Consider some refactoring and add Lit directive #2350
There are a few potential feature and refactoring improvements to consider:
We want to add a Lit directive for more ergonomically observing elements. This could be a separate module that provides an observeWith(observer) directive. This approach allows the controllers to be used without loading lit-html, but it's a little unergonomic v. something like ${controller.observe()}. If we do the latter, we'll need to disambiguate between using observe as a directive and imperatively. This could be done by checking if an argument is provided.
Refine the types associated with the callback and value. These are currently just marked as unknown but they could be handled with a generic. Working this out with the tests will take a bit of refinement.
The 4 observer controllers could share a base class. They are similar but each have some differences which need to be carefully considered. There's definitely an opportunity for more code sharing, however.
changed the title [-][@lit-labs/observers] Consider some refactoring[/-][+][@lit-labs/observers] Consider some refactoring and add Lit directive[/+]on Dec 9, 2021
changed the title [-][@lit-labs/observers] Consider some refactoring and add Lit directive[/-][+][lit-labs/observers] Consider some refactoring and add Lit directive[/+]on Oct 12, 2022
changed the title [-][lit-labs/observers] Consider some refactoring and add Lit directive[/-][+][labs/observers] Consider some refactoring and add Lit directive[/+]on Oct 13, 2022
Activity
[-][@lit-labs/observers] Consider some refactoring[/-][+][@lit-labs/observers] Consider some refactoring and add Lit directive[/+][-][@lit-labs/observers] Consider some refactoring and add Lit directive[/-][+][lit-labs/observers] Consider some refactoring and add Lit directive[/+][-][lit-labs/observers] Consider some refactoring and add Lit directive[/-][+][labs/observers] Consider some refactoring and add Lit directive[/+]