-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add app loader #17558
feat: Add app loader #17558
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #17558 +/- ##
==========================================
- Coverage 46.31% 46.12% -0.19%
==========================================
Files 758 760 +2
Lines 24904 25012 +108
Branches 5714 5724 +10
==========================================
+ Hits 11535 11538 +3
- Misses 11928 12031 +103
- Partials 1441 1443 +2 |
src/script/main/index.tsx
Outdated
const removeLoaderRoot = () => { | ||
const loaderRoot = document.getElementById('loader-root'); | ||
const loaderStyles = document.getElementById('loader-styles'); | ||
|
||
loaderRoot?.parentNode?.removeChild(loaderRoot); | ||
loaderStyles?.parentNode?.removeChild(loaderStyles); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not putting the loader inside wire-app
and let react override it completely?
This way you won't have to write this code at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could even put the style
tag in there and it will be overwritten by react
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed! :)
src/page/loader.js
Outdated
const userLang = navigator.language; | ||
|
||
setTimeout(() => { | ||
if (loadingMessage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do the getElementById
here, else we are going to have a memory leak and never release the reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
https://wearezeta.atlassian.net/browse/WPB-9719
Description
Display loading screen while app is not yet initialized. We displays also information while request takes more than 30s.
Screenshots/Screencast (for UI changes)
2024-06-12.11-53-08.mp4
For video delay for show message was changed to 6s.
Checklist
Important details for the reviewers
(Delete this section if unnecessary)