-
Notifications
You must be signed in to change notification settings - Fork 168
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
Add loading indicator for each tab and add error screens for errors in each tab #1459
Conversation
jerelmiller
commented
Jul 25, 2024
•
edited
Loading
edited
#790 Bundle Size — 1.51MiB (+0.45%).54ce7e9(current) vs 756cf06 main#785(baseline) Warning Bundle contains 13 duplicate packages – View duplicate packages Warning Bundle introduced one new package: react-error-boundary – View changed packages Bundle metrics
|
Current #790 |
Baseline #785 |
|
---|---|---|
Initial JS | 1.47MiB (+0.46% ) |
1.46MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 92.81% |
0% |
Chunks | 5 |
5 |
Assets | 12 |
12 |
Modules | 1213 (+0.25% ) |
1210 |
Duplicate Modules | 45 |
45 |
Duplicate Code | 3.07% (-0.32% ) |
3.08% |
Packages | 183 (+0.55% ) |
182 |
Duplicate Packages | 10 |
10 |
Bundle size by type 1 change
1 regression
Current #790 |
Baseline #785 |
|
---|---|---|
JS | 1.47MiB (+0.46% ) |
1.46MiB |
IMG | 35.85KiB |
35.85KiB |
HTML | 810B |
810B |
Other | 778B |
778B |
Bundle analysis report Branch jerel/loading-error-indicator Project dashboard
Generated by RelativeCI Documentation Report issue
dff343e
to
71a5949
Compare
if (error) { | ||
throw error; | ||
} |
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.
If I add something along the lines of
if (2 > 1)
throw new ApolloError({ networkError: new Error("Network error") });
here, the whole extension always ends up in a "Client not found" state.
Could you look into that a bit more?
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'm not sure I follow. Let's connect tomorrow (Tuesday).
Edit: I think I understand now that you're adding this arbitrarily to see how the UI behaves as if that error had occurred (that 2 > 1
is so that you can create an "always true" condition ya?).
I'd still love to connect to understand what you're looking for here. I'm intentionally taking over the whole screen to show the error since any error here is unexpected and usually means we can't communicate with the content scripts but perhaps you have some better ideas.
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.
Yeah, the 2>1
is to keep the TS compiler from yelling that a lot of code after the fixed throw
will not be executed.
Generally, I was just throwing errors here to test these changes. What stood out for me was that doing this in the mutation panel had no effects on the connection, but doing so from within the queries panel made the whole connection impossible (probably because this is the first panel we show).
This might be perfectly okay as my test was a bit unrealistic, but it felt a bit weird and I wanted to point it out.
@phryneas that error usually occurs when you "update" the extension, whether thats the browser doing it in the background, reloading the extension in dev, or having the webpack extension reload it for you by updating code. Each of these invalidate the extension context so the devtools script is no longer able to communicate to the background service worker script (since that service worker has now been replaced with the updated extension). I plan to address this separately. So far I can't seem to find any way to automatically reconnect the devtools script with the new service worker without having the user close and reopen devtools. I suppose that makes sense anyways since there might be new code in the devtools script. For that we should probably show a message to the user that the user needs to close and reopen. I'd like to do that separately ( Previously though, when that update would occur, the timeout would mean that the UI appears frozen since we can no longer get messages from the background script, so you'd stop receiving updates from the client. With this change, we at least see an error page so you know something went wrong so its a "something better than nothing" approach for now. |
d5d468a
to
617c080
Compare