sl-ember-components
sl-ember-components copied to clipboard
Define capabilities and API for sl-modal
This issue is where discussion about all of the things we want to change about the sl-modal
component should occur and the final definition of its capabilities and API are defined. As these items are discussed and vetted, issues will be created to work any individual tasks, with this issue serving as the overall source of progress.
To indicate that a capability of the component needs to be verified, add a comment with **VERIFY**
as the first line.
To propose a change to the component, add a comment with **PROPOSAL**
as the first line.
To indicate that something needs to be researched, add a comment with **RESEARCH**
as the first line.
As you are leaving comments regarding any of these VERIFY
, PROPOSAL
, or RESEARCH
comments, link back to the comments link in your own so that the conversation can be more easily followed (in absence of threaded conversation support in Github). This should be done on the first line of the comment via **RE: <url>**
Capabilities and API
- [ ] ARIA support
- [ ] ...
Tasks Adding them here until issues are created
- Update documentation for each change
- Complete review of documentation against capabilities
Issues tracking these efforts
https://github.com/softlayer/sl-ember-components/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22v0.13.0+%28Final+push+for+a+1.0.0+release%29%22+label%3Asl-modal
Proposal
Using contextual components
Example code
How the consuming user would use it:
{{#sl-modal streamName="demoModal" size="small" as |modal|}}
{{modal.header title="Simple Example" ariaLabelledBy=modal.ariaLabelledBy}}
{{#modal.body}}
<p>A simple modal example</p>
{{/modal.body}}
{{modal.footer}}
{{/sl-modal}}
Pros
This is arguably a more "Ember" way of doing things instead of directly traversing the DOM. It cleans up quite a bit of code that is currently having to get attributes off the children.
Cons
The user has to get used to a new hash helper.
RE: https://github.com/softlayer/sl-ember-components/issues/1265#issuecomment-197708462
@erangeles The example code appears to be the current way of creating a modal, as per http://softlayer.github.io/sl-ember-components/#/demos/sl-modal