feat: Warn user if XKit fails to initialize#1971
Open
marcustyphoon wants to merge 9 commits intomasterfrom
Open
feat: Warn user if XKit fails to initialize#1971marcustyphoon wants to merge 9 commits intomasterfrom
marcustyphoon wants to merge 9 commits intomasterfrom
Conversation
This reverts commit 88aa55e.
Owner
|
I like the concept. I wouldn't have this extracted out to a util, though; we're not going to reuse it. And if you're looking for a better arbitrary number than 10s, I think 60s gives us more confidence that something has gone awfully wrong. |
Collaborator
Author
|
I feel like as a user I would want to be informed before an entire minute has passed :D |
This reverts commit e74e5b5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Proof of concept; I'm not sure what we would want to actually show here so I copied something from one of my dev scripts. (Clickable button with more info would be cool? Of course, this is not worth much effort, so...)
This makes a UI element appear if we're confident the user is logged in, but the XKit initialization function hasn't succeeded after [arbitrary value, I put 10] seconds. This was motivated by yet another wave of posts I saw about a) XKit mysteriously not working, and b) the site being slow. I'd love to be able to be slightly more confident about whether b is the cause of a.
I dunno. What do you think?
Resolves #1913, I guess.
Testing steps
Add an error to the init function in main.js, to one of the three critical utility functions that we preload, and/or to the injected functions they call using top level await. Observe that XKit modifications don't load and a warning message eventually appears.
Add a really long delay to the init function in main.js, to one of the three critical utility functions that we preload, and/or to the injected functions they call using top level await. Observe that a warning message appears, but then disappears as XKit modifications eventually load.
Repeat this when logged out and confirm that nothing happens.