mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
The caret that folds the left menu away - on All Boards and in the Admin Panel - rendered, pointed down, and did nothing at all when clicked. Its template draws the caret; the click that folds the menu and the isLeftMenuCollapsed helper that says whether it is folded live in client/components/settings/leftMenu.js, and nothing imported that file. package.json sets meteor.mainModule, so the client is NOT eagerly loaded: a file nobody imports is not in the bundle at all. The click handler was never registered, so the caret was a dead control - and an unregistered Blaze helper is undefined, so the panel never took the collapsed class either, which is why even the caret itself never turned to point right. The same thing had happened to adminReports.css, which is why the Admin Panel reports lost their styling. One import fixes it. The new guard is what stops it happening a third time: tests/clientBundleImports.test.cjs walks the import graph from client/main.js and pins that every file under client/components which REGISTERS something with Blaze - a template's events, helpers or lifecycle, a global helper, a BlazeComponent - is reachable from the entry point, and that every stylesheet and template beside them is too. A file that only exports helpers is left alone: whoever uses it pulls it in. It carries the negative case as well, checking that removing this very import is reported rather than shrugged off. Thanks to xet7 !