stable

Clone or download

Read-only

request #11514 Import Tooltip instead of having a hidden dependency

We should aim to reduce interdependent files and instead rely on "import" to reveal explicitly dependencies. Previously, all apps using Tooltips and (transitively) all apps using the angular artifact modal required loading 'Tooltip.js' and 'Tooltip-loader.js' to function properly. This meant two more blocking HTTP requests for code that might never even be actually used. We also sometimes forgot to load them before the modal, leading to errors. Now, in "webpack context" where module.exports exists, it exports a function that we can then "import" where needed. Since Tooltip uses jquery, Apps using the angular artifact modal now also must declare 'jquery' as external (it is in TLP). The dependency was always there, but was hidden. Warning: Testmanagement needs a patch of its own (see https://gerrit.tuleap.net/#/c/11465/ ) How to test: make post-checkout (you may have an error in testmanagement, see dedicated patch) Tooltips should show up on cross-references in the following pages: - Kanban artifact modal (e.g. follow-ups) - Planning-v2 artifact modal (e.g. follow-ups) - Pull requests - Heartbeat widget - Dashboards (async and sync widgets) Change-Id: Ia51b621b5b07e25ed15f514a896772fc33445b64

Modified Files

Name
M plugins/agiledashboard/include/agiledashboardPlugin.class.php +0 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/webpack.config.js +14 −9 Go to diff View file
M plugins/agiledashboard/www/js/planning-v2/webpack.config.js +4 −7 Go to diff View file
M plugins/pullrequest/www/scripts/src/app/tooltip-service.js +3 −3 Go to diff View file
M plugins/pullrequest/www/scripts/webpack.config.js +2 −1 Go to diff View file
M plugins/tracker/www/scripts/angular-artifact-modal/src/tuleap-artifact-modal-controller.js +2 −3 Go to diff View file
M plugins/tracker/www/scripts/webpack.config.js +4 −4 Go to diff View file
M src/common/Dashboard/JavascriptFilesIncluder.php +0 −2 Go to diff View file
M src/www/scripts/codendi/Tooltip.js +16 −5 Go to diff View file
M src/www/scripts/dashboards/dashboard-async-widget.js +14 −14 Go to diff View file
M src/www/scripts/dashboards/dashboard.js +2 −0 Go to diff View file
M src/www/scripts/dashboards/widgets/project-heartbeat/project-heartbeat.js +4 −3 Go to diff View file
M tests/simpletest/common/Dashboard/JavascriptFilesIncluderTest.php +12 −14 Go to diff View file
M tools/utils/scripts/webpack-aliases.js +36 −8 Go to diff View file