Enable preboot event replay for shorter apparent TTI#1761
Enable preboot event replay for shorter apparent TTI#1761ybnd wants to merge 11 commits intoDSpace:mainfrom
Conversation
preboot is triggered when the app first becomes stable, which caused the app to hang once CSR started Tracked the issue down to initialization - GoogleAnalyticsService.addTrackingIdToPage() - AuthService.trackTokenExpiration()
SSR HTML inlines CSS into style.ng-transition elements. By default, Angular removes these as soon as CSR starts. Because preboot buffers CSR off-screen, the SSR HTML remains visible during the transition - without CSS. This workaround strips the ng-transition attribute from SSR styles so they aren't removed automatically and subsequently removes these same styles once preboot is finished.
On the server, @slideSidebarPadding always resolved to 'expanded' because slideSidebarOver did not emit true
…imize-initial-page-load-by-leveraging-preboot
This reverts commit d1741e2.
|
This pull request introduces 1 alert when merging 818c142 into f6d2014 - view on LGTM.com new alerts:
|
|
This pull request has been automatically marked as stale because it has not had Allowing pull requests to close as stale helps us filter out old work that is no longer All pull requests closed by this bot act like normal pull requests; If these changes are still relevant then please comment and/or rebase your PR based on the |
|
We'll need to re-evaluate how we can introduce event replay in our current Angular version |
References
Description
This (work-very-much-in-progress) PR continues the integration of Angular
prebootinto DSpace by enabling event replay, which further improves perceived loading performance by allowing (limited) interaction with the page during the SSR→CSR transition, e.g.:While working on #1760 it became clear that this feature won't be easy (or quick) to integrate
idto support event replay. Currently this is not the case for a serious number of our components. For now, this branch can serve as a showcase of the kind & number of changes we would need to make to address this.a.btn-style buttons won't work with event replay if defined with[routerLink]=""; they should usehref="javascript:void(0)";instead.Instructions for Reviewers
TBD
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.