Improve JS Initialisation that we do on each page
What does this MR do?
Improves setup of main.js and header.js so that during initialisation we defer load to a later point. This is a first incremental step but definitely more to come. This reduces time to first paint and time of execution for domContentLoaded
Moved Initialisations in 'main.js' to function (deferredInitialisation
) which is executed through requestIdleCallback
. This executes normally ms after the first rendering is done.
- Init BreadCrumbs
- Init Importer Status
- Init Todo Toggle
- Init Logo Animation
- Init Search Autocomplete
- Init Performance Bar if there is one
- Focus Behaviour
- Global Ajax Handling
- Awards Handler
header.js
- requestIdleCallback for initialisation of the User Status Modals
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Tim Zallmann