Page MenuHomekolab.org

Split client javascript code into core+unauthenticated and authenticated, the same for admin/reseller
ClosedPublic

Authored by machniak on Nov 10 2021, 10:28 AM.

Details

Summary

As we're adding more and more features the client-side code grows. To make the main page still responsive
I split the code into two parts. One that is always loaded and one that is loaded only if user is authenticated.

So, before we had user.js - 493 KB, now it is user.js - 395 KB and user/pages.js 94 KB.

I also saved a few kilobytes with use of whitespace:condense option.

Test Plan

./phpunit --testsuite=Browser

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

machniak requested review of this revision.Nov 10 2021, 10:29 AM
machniak created this revision.
machniak updated this revision to Diff 8990.Dec 27 2021, 9:46 AM
  • Merge branch 'master' into dev/split-client
machniak edited the summary of this revision. (Show Details)Dec 27 2021, 10:35 AM
machniak updated this revision to Diff 9089.Jan 3 2022, 10:51 AM
  • Small css fixes

Looks reasonable, maybe a webpackPrefetch: true could make sense to enable prefetching (might be enabled by default anyways though).

The css changes seem unrelated, I trust you know what you're doing there ;-)

mollekopf accepted this revision.Jan 10 2022, 11:19 AM
This revision is now accepted and ready to land.Jan 10 2022, 11:19 AM
This revision was automatically updated to reflect the committed changes.