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

Simplify parameters on sl-able and sl-unable #53

Closed
jonathandavidson opened this issue Jun 30, 2015 · 2 comments
Closed

Simplify parameters on sl-able and sl-unable #53

jonathandavidson opened this issue Jun 30, 2015 · 2 comments

Comments

@jonathandavidson
Copy link
Contributor

There is some unnecessary complexity in the provider parameter when an object is supplied. In order to simplify this feature without sacrificing any functionality, the sl-able and sl-unable components will be revised as follows:

  • The behavior parameter will be renamed resource and will otherwise remain unchanged
  • The provider parameter will be renamed activity and will no longer accept an object, only a string corresponding to the Behavior Group key name used in the Behaviors structure
  • An additional possible parameter will be added which accepts a boolean, computed property that evaluates to a boolean, or a function returning a boolean. This will take the place of the behaviors object passed in through the provider parameter since only one behavior (activity) is being evaluated in a component instance.
  • The possible parameter will be observed to make the component responsive to changes in the value supplied.
@notmessenger
Copy link
Collaborator

@jonathandavidson For clarification, the possible parameter in the 3rd bullet point in the previous comment will accept any input that resolves to a boolean, be it an actual boolean, a computed property or a plain function, correct?

@jonathandavidson
Copy link
Contributor Author

@notmessenger Correct. I have updated the description to reflect that clarification.

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

No branches or pull requests

2 participants