Remove `jquery.tablesorter.js` from `vendor/assets/javascripts` in favor of packaged `tablesorter`
What does this MR do?
This MR does following;
- Removes
vendor/assets/javascripts/jquery.tablesorter.js. - Removes
tablesorterplugin entry fromapp/assets/javascripts/commons/jquery.js, thus reducing jQuery bundle significantly. - Adds fork of original jquery.tablesorter as a package dependency from tablesorter.
- Uses imported
tablesorterpackage inee/app/assets/javascripts/pages/groups/analytics/show/index.jssuch that module is available only on page where it is used.
Are there points in the code the reviewer needs to double check?
In my testing, Contributions per group member table on Group Contribution Analytics behaves as expected when using forked tablesorter instead of the unmaintained jquery.tablesorter.js placed in vendor/assets/javascripts/ directory. However, the newer tablesorter brings lot of additional features which we may not be using.
After this MR, tablesorter will not be a part of jQuery commons bundle and will be included only on pages where we explicitly import it. But given that tablesorter in general is heavy library, I'm not sure if it is worth the bundle size (even if for only one page with tree-shaking in place). On contrary, I couldn't find any decent jQuery Tablesorter alternatives that are light weight and provide basic column sorting abilities.
Why was this MR needed?
Original issue for this MR proposes to remove vendor/assets/javascripts/jquery.tablesorter.js in favour of NPM package that can be imported as dependency to reduce CE to EE diff.
Screenshots
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary [ ] Documentation created/updated[ ] API support added-
Tests added for this feature/bug - Review
[ ] Has been reviewed by UX-
Has been reviewed by Frontend [ ] Has been reviewed by Backend[ ] Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan [ ] End-to-end tests pass (package-qamanual pipeline job)
What are the relevant issue numbers?
Closes #4949 (closed)
