stable

Clone or download

Read-only

Stop loading widget's assets on all dashboards

Part of request #12590 Widgets should not include their CSS files on empty dashboards This patch aims to improve performances on all dashboards by removing unused assets. How to test: For each of the following widgets: - Cross Tracker Search - Document Manager: Documents under review (User Dashboard) - Continuous Integration: Test Results - Labeled Items - Project Links - Timetracking Overview - Personal time tracking The following is true: - Their CSS / JS files are NOT loaded on an empty User / Project dashboard - When added to a User / Project dashboard, their CSS / JS files are loaded Performance notes: Before this patch, on an empty project dashboard, without any extension, Lighthouse on Chromium 70 reports a Performance Audit score of 52 with a Time to Interactive of 6930ms (with simulated 3G and 4x CPU slowdown). We load 12 CSS files and 5 JS files. After this patch, same settings: Performance score is 63, Time to Interactive is 6,370ms. We load 6 CSS files and 4 JS files. Will be done later: - Renderer Widget makes us load Tracker / Cardwall / Graph on trackers v5 CSS files on every dashboard. It will be dealt with separately. - Provide a way for widgets to declare javascript dependencies for adding widgets (for Labeled items to load "configure-widget.js") Change-Id: Ia66c58147eab7c92b71303ae81164c8041fa992a

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/Widget/ProjectCrossTrackerSearch.php +12 −1 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.class.php +0 −22 Go to diff View file
M plugins/docman/build-manifest.json +2 −1 Go to diff View file
M plugins/docman/include/Docman_Widget_MyDocman.class.php +13 −3 Go to diff View file
M plugins/docman/include/docmanPlugin.class.php +0 −16 Go to diff View file
M plugins/hudson/build-manifest.json +2 −1 Go to diff View file
M plugins/hudson/include/hudsonPlugin.class.php +3 −33 Go to diff View file
M plugins/hudson/include/hudson_Widget_JobTestResults.class.php +24 −0 Go to diff View file
M plugins/label/build-manifest.json +6 −5 Go to diff View file
M plugins/label/include/Label/Widget/ProjectLabeledItems.php +19 −3 Go to diff View file
M plugins/label/include/labelPlugin.class.php +4 −16 Go to diff View file
M plugins/projectlinks/build-manifest.json +2 −7 Go to diff View file
M plugins/projectlinks/include/ProjectLinks_Widget_HomePageLinks.class.php +14 −3 Go to diff View file
M plugins/projectlinks/include/projectlinksPlugin.class.php +0 −23 Go to diff View file
D plugins/projectlinks/www/themes/default/css/style.scss +0 −7 Go to diff View file
M plugins/svn/include/svnPlugin.class.php +1 −1 Go to diff View file
M plugins/timetracking/include/Timetracking/Widget/TimeTrackingOverview.php +11 −0 Go to diff View file
M plugins/timetracking/include/Timetracking/Widget/UserWidget.php +11 −0 Go to diff View file
M plugins/timetracking/include/timetrackingPlugin.class.php +0 −21 Go to diff View file
M src/common/Request/CurrentPage.php +1 −1 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +2 −1 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +2 −1 Go to diff View file