stable
Clone or download
Revert "Introduce the new post action option "Add to backlog" in the post action modal"
This reverts commit dbd1a274d5ba02799d4eb373f39039d7ebe8edef. Part of story #14096 have a post action to add "Scrum Top Backlog" flag There are several problems with this approach: - AgileDashboard Vue components cannot import components from Tracker. In this situation, it means they cannot use PostAction, while all other PostActions components do use it, which creates inconsistency. If an external component DOES import PostAction, it creates two versions of it, and unexpected things start to occur. For example, getComponentByName() will return things for the Tracker version and will not for the AgileDashboard version. It is very disturbing for developpers... - This means we cannot use Vue slots in combination with external components, and they cannot instanciate any component from their importer. In other words, it's almost like two separate Vue apps. - Typescript complains at every turn. This is because we now depend on a Vue instance that is not present anywhere in AgileDashboard, but present in Tracker. Typescript cannot know that we have $gettext or $store available. - Unit-testing is a pain too. In order to test, we need to install another version of vuex, vue-test-tools, etc. Combined with Typescript, it makes things difficult. It also means we can have different "test" versions of Vue, vuex, etc. between importer and imported, but they will share the same "prod" versions. Nothing can stop it. - We have no choice but to check for undefined when declaring our external components. Before "setExternalComponents" is called, the array of external components is empty. - The whole JSONP mechanism is very brittle. We are forced to create script tags manually to control the order of execution. The only thing tying the importer and the exporter together is the JSONP callback name, so you must be sure to use the same name in the "library" config in webpack and the function call in "window" in the importer. Worse yet, we need to be 100% certain that the JSONP function exists on window BEFORE the JSONP script is executed. Otherwise, error. That means we are forced to build manual Promises that only resolve once the JSONP callback has been called. We would have used dynamic import() which is much simplet, except that we need to support IE11 which does not have it. For all these reasons, we should revert this mechanism and use a simpler method. Change-Id: I04765ad1fa2f4adeec4ce0f4c3129dfe156ad8ae
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/agiledashboard/build-manifest.json | +0 | −5 | Go to diff View file |
M | plugins/agiledashboard/include/agiledashboardPlugin.php | +1 | −24 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/jest.config.js | +0 | −26 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/package-lock.json | +0 | −376 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/package.json | +0 | −27 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/po/fr.po | +0 | −19 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/AddToBacklogPostActionOption.test.ts | +0 | −35 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/AddToBacklogPostActionOption.vue | +0 | −47 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/helpers/local-vue-for-test.ts | +0 | −31 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/index.ts | +0 | −27 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/type.ts | +0 | −25 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/src/vue.shims.d.ts | +0 | −25 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/tsconfig.json | +0 | −6 | Go to diff View file |
D | plugins/agiledashboard/scripts/agiledashboard-workflow/webpack.config.js | +0 | −64 | Go to diff View file |
D | plugins/agiledashboard/scripts/jest.projects.config.js | +0 | −22 | Go to diff View file |
M | plugins/tracker/include/Tracker/Workflow/WorkflowMenuTabPresenter.php | +3 | −15 | Go to diff View file |
M | plugins/tracker/include/Tracker/Workflow/WorkflowMenuTabPresenterBuilder.php | +2 | −2 | Go to diff View file |
M | plugins/tracker/include/Tracker/Workflow/WorkflowTransitionController.php | +8 | −27 | Go to diff View file |
D | plugins/tracker/include/Workflow/PostAction/ExternalWorkflowAssetsPathsRetrieverEvent.php | +0 | −61 | Go to diff View file |
D | plugins/tracker/include/Workflow/PostAction/JSONPCallback.php | +0 | −51 | Go to diff View file |
D | plugins/tracker/include/Workflow/PostAction/JSONPCallbackPresenter.php | +0 | −39 | Go to diff View file |
M | plugins/tracker/include/trackerPlugin.php | +1 | −3 | Go to diff View file |
M | plugins/tracker/templates/workflow-transitions/workflow-transitions.mustache | +0 | −1 | Go to diff View file |
M | plugins/tracker/www/scripts/workflow-transitions/src/components/TransitionModal/PostAction/PostAction.vue | +3 | −12 | Go to diff View file |
D | plugins/tracker/www/scripts/workflow-transitions/src/helpers/cross-plugin-component-importer.js | +0 | −50 | Go to diff View file |
D | plugins/tracker/www/scripts/workflow-transitions/src/helpers/cross-plugin-component-importer.test.js | +0 | −86 | Go to diff View file |
D | plugins/tracker/www/scripts/workflow-transitions/src/helpers/external-component-state.js | +0 | −29 | Go to diff View file |
M | plugins/tracker/www/scripts/workflow-transitions/src/index.js | +4 | −28 | Go to diff View file |