stable

Clone or download

Read-only

request #10195: Use a module-loader in kanban

Sorry for the giant review, if you have ideas on how to split it, let me know. This adds a first "component" for the cumulative chart d3 code that is directly imported in kanban. Instead of adding to a global object, code using it will need to import it and use a module-loader. Next steps could be to only import parts of d3 or lodash or moment that are actually needed. How to test: - bower prune; bower install (we still need bower for the modal and angular-ui-bootstrap) - yarn (or npm) install in kanban dir - yarn run build in tuleap root - yarn run build should still: - build the SCSS files to bin/assets/kanban.css - build and minify the JS files to bin/assets/kanban.js - copy all used images to bin/assets/ - yarn run test should run unit tests once - yarn run coverage should run unit tests and show test coverage html on your browser - yarn run watch should: - watch js files and rebuild, run unit tests and extract gettext - watch and build SCSS files Some of the things that were done in gruntfile have not been migrated: - adding a banner to the generated minified file - using ng-annotate. I don't think it's necessary as we use $inject everywhere. Change-Id: Ib292bad96febdbe3cf0d77bfd556187f96a12f70

Modified Files

Name
M plugins/agiledashboard/include/agiledashboardPlugin.class.php +0 −3 Go to diff View file
M plugins/agiledashboard/templates/kanban.mustache +14 −1 Go to diff View file
M plugins/agiledashboard/www/js/cumulative-chart-factory.js +10 −7 Go to diff View file
M plugins/agiledashboard/www/js/cumulative-chart.js +3 −6 Go to diff View file
M plugins/agiledashboard/www/js/kanban/.gitignore +2 −1 Go to diff View file
D plugins/agiledashboard/www/js/kanban/Gruntfile.js +0 −530 Go to diff View file
M plugins/agiledashboard/www/js/kanban/bower.json +1 −21 Go to diff View file
D plugins/agiledashboard/www/js/kanban/build.config.js +0 −98 Go to diff View file
A plugins/agiledashboard/www/js/kanban/gulpfile.js +116 −0 Go to diff View file
A plugins/agiledashboard/www/js/kanban/karma.conf.js +63 −0 Go to diff View file
D plugins/agiledashboard/www/js/kanban/karma/karma-unit.tpl.js +0 −68 Go to diff View file
D plugins/agiledashboard/www/js/kanban/module.prefix +0 −1 Go to diff View file
D plugins/agiledashboard/www/js/kanban/module.suffix +0 −1 Go to diff View file
M plugins/agiledashboard/www/js/kanban/package.json +41 −22 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/add-in-place/add-in-place-controller.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/add-in-place/add-in-place-directive.js +10 −9 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-config.js +5 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-kanban-controller.js +19 −17 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-kanban-controller.spec.js +6 −2 Go to diff View file
D plugins/agiledashboard/www/js/kanban/src/app/app-kanban.spec.js +0 −5 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-main-controller.js +29 −23 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app-resize-directive.js +2 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/app.js +93 −13 Go to diff View file
A plugins/agiledashboard/www/js/kanban/src/app/app.spec.js +12 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/card-fields/card-computed-field/card-computed-field-directive.js +4 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/card-fields/card-fields-service.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/card-fields/card-fields.js +21 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/card-fields/card-text-field/card-text-field-directive.js +4 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/card-fields/tuleap-simple-field-directive.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/column-collection-service.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/column-collection-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/dropped-service.js +7 −10 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/dropped-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/edit-kanban/edit-kanban-autofocus-directive.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/edit-kanban/edit-kanban-controller.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/error/error-controller.js +2 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/esc-key/esc-key-directive.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/filter-value.js +3 −5 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/highlight-filter/highlight-filter.js +5 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/highlight-filter/highlight-filter.spec.js +63 −54 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/in-properties-filter/in-properties-filter.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/in-properties-filter/in-properties-filter.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/jwt/jwt-service.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/jwt/jwt.js +8 −1 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column-controller.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column-controller.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column-directive.js +4 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column-service.js +4 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column-service.spec.js +6 −2 Go to diff View file
D plugins/agiledashboard/www/js/kanban/src/app/kanban-column/kanban-column.js +0 −7 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-item/kanban-item-controller.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-item/kanban-item-directive.js +6 −5 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-item/kanban-item-rest-service.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-item/kanban-item-rest-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-item/kanban-item.js +13 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-service.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/kanban.scss +3 −3 Go to diff View file
A plugins/agiledashboard/www/js/kanban/src/app/modal-moment-fix.js +5 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/reports-modal/diagram-directive.js +5 −5 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/reports-modal/diagram-rest-service.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/reports-modal/diagram-rest-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/reports-modal/reports-modal-controller.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/reports-modal/reports-modal-controller.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/rest-error-service.js +3 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/rest-error-service.spec.js +6 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/shared-properties/shared-properties-service.js +109 −113 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/shared-properties/shared-properties.js +6 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/socket/socket-config.js +17 −11 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/socket/socket-disconnect-directive.js +5 −5 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/socket/socket-factory.js +5 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/socket/socket-service.js +4 −4 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/socket/socket.js +19 −2 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/strip-tags/strip-tags-filter.js +6 −6 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/user-preferences/user-preferences-service.js +1 −3 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/user-preferences/user-preferences.js +6 −1 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/uuid-generator/uuid-generator-service.js +44 −49 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/uuid-generator/uuid-generator.js +6 −1 Go to diff View file
M plugins/agiledashboard/www/js/kanban/src/app/wip-popover/wip-popover-directive.js +8 −8 Go to diff View file
A plugins/agiledashboard/www/js/kanban/webpack.config.js +68 −0 Go to diff View file
M plugins/agiledashboard/www/js/kanban/yarn.lock +2752 −1016 Go to diff View file