mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 15:43:43 +08:00
cd4f251891
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."
43 lines
646 B
SCSS
43 lines
646 B
SCSS
div.poll {
|
|
.poll-buttons {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
padding: 0.5em 1em 0.5em 1em;
|
|
|
|
button {
|
|
margin: 0 0.5em 0.5em 0;
|
|
}
|
|
}
|
|
|
|
.poll-info {
|
|
padding: 0 1em;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-direction: column;
|
|
.info-text {
|
|
display: inline;
|
|
}
|
|
.info-number {
|
|
font-size: $font-up-6;
|
|
}
|
|
p {
|
|
margin: 0;
|
|
width: 100%;
|
|
}
|
|
.info-label {
|
|
margin-left: 0.25em;
|
|
}
|
|
}
|
|
|
|
.poll-show-breakdown {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
div.poll.pie {
|
|
.poll-container {
|
|
width: calc(100% - 30px);
|
|
border-bottom: 1px solid var(--primary-low);
|
|
}
|
|
}
|