FEATURE: Poll breakdown 2.0 (#10345)
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."
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
function initializePollUIBuilder(api) {
|
||||
api.modifyClass("controller:composer", {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import EmberObject from "@ember/object";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
import { getRegister } from "discourse-common/lib/get-owner";
|
||||
import WidgetGlue from "discourse/widgets/glue";
|
||||
import { getRegister } from "discourse-common/lib/get-owner";
|
||||
import { observes } from "discourse-common/utils/decorators";
|
||||
|
||||
function initializePolls(api) {
|
||||
const register = getRegister(api);
|
||||
|
||||
Reference in New Issue
Block a user