Skip to content
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

Make LitElement's property accessors creation and metadata easily customizable #911

Closed
sorvell opened this issue Mar 3, 2020 · 0 comments · Fixed by #914
Closed

Make LitElement's property accessors creation and metadata easily customizable #911

sorvell opened this issue Mar 3, 2020 · 0 comments · Fixed by #914

Comments

@sorvell
Copy link
Member

sorvell commented Mar 3, 2020

Initiative / goal

LitElement configures reactive properties, but this behavior is currently difficult to extend and customize. Making property creation and metadata easily customizable would unlock many use specific cases that users have asked for but that we do not want to burden everyone with by adding the behavior to the core library.

Scope

  • Make property metadata easily customizable.
    • One approach is to create static methods for setting/getting property metadata for a property.
    • This work must also ensure that metadata can continue to be typed correctly in TypeScript.
  • Make property accessors easily customizable. While users can currently override static createProperty, the code for making a property reactive is private.
    • One approach is to rename and expose the private _requestUpdate method.
    • This leaves private storage as the only not easily callable work done in createProperty. This could be sugared or left to overriders to deal with.

Acceptance criteria and must have scope

Add a set of tests that prove that the requested use cases can be implemented by adding this features. For example:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant