The poll breakdown modal replaces the grouped pie charts feature.
Includes:
* MODAL: Untangle `onSelectPanel`
Previously modal-tab component would call on click the onSelectPanel callback with itself (modal-tab) as `this` which severely limited its usefulness. Now showModal binds the callback to its controller.
"The PR includes a fix/change to d-modal (b7f6ec6) that hasn't been extracted to a separate PR because it's not currently possible to test a change like this in abstract, i.e. with dynamically created controllers/components in tests. The percentage/count toggle test for the poll breakdown feature is essentially a test for that d-modal modification."
18 lines
458 B
Handlebars
18 lines
458 B
Handlebars
<li
|
|
class="poll-breakdown-option"
|
|
style={{this.colorBackgroundStyle}}
|
|
{{on "mouseover" @onMouseOver}}
|
|
{{on "mouseout" @onMouseOut}}
|
|
>
|
|
<span class="poll-breakdown-option-color" style={{this.colorPreviewStyle}}></span>
|
|
|
|
<span class="poll-breakdown-option-count">
|
|
{{#if showPercentage}}
|
|
{{this.percent}}%
|
|
{{else}}
|
|
{{@option.votes}}
|
|
{{/if}}
|
|
</span>
|
|
<span class="poll-breakdown-option-text">{{{@option.html}}}</span>
|
|
</li>
|