-
-
Notifications
You must be signed in to change notification settings - Fork 243
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 error page for initial REST request failure & Abort further load #1987
Conversation
Job #1147: Bundle Size — 15.76MiB (~+0.01%).Metrics (2 changes)
Total size by type (2 changes)
|
Thanks - not a fan of Note that it could be redesigned to offer more insight, it was just a simple version of something like this: |
Good idea, I will try to have a look at this. |
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.
Great! Let me know if you think it's better to merge this still, it's an improvement over a dialog that didn't show but alert()
is IMO too obtrusive.
@ghys I've added such a "page" (it is no real page, but instead part of app.vue, but anyway it should work fine): |
I have tested this on my dev system by deploying the UI artifact and then stopping the |
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.
Thanks, I like the different options for reloading at different levels!
In your last commit you reordered the buttons in a more logical manner (in increasing order of "strength") but also removed the warning on purging the cache, can you elaborate why? I thought it was rather nice to warn the user.
Yeah, but when deploying the UI bundle to my dev server (instead of running the dev server) I noticed that the warning was not shown. I guess it is a CSS visibility problem, I will have to check that when I’m back home. |
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
013b23f
to
06b2a84
Compare
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
06b2a84
to
994046d
Compare
@ghys I have added the logic to only show the "Purge Caches And Reload" button from about.vue and re-introduced the confirmation dialog. It was not visible because of CSS visibility set on for f7-app, I fixed that and also cleaned up app.vue a bit. From my side, this is ready for merging now. |
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@ghys I've fixed the conflict, can you please have a look? |
Uhh.. there are conflicts again. Probably due to me merging #2075. Could you please have a look again (sorry)? I also think we should start to offload some methods out of |
Yeah, I've already read your comment on that PR. I will have a look at refactoring that error handling logic to a mixin, I will ping you when I am finished. |
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@ghys I have refactored this now: The reload stuff moved to the reload-mixin, which is now also used by about.vue and the connection health stuff from app.vue moved to the connection-health-mixin. As I have done that refactoring from my iPad (I am currently on a short trip to a concert) I haven‘t been able to test this, so please test:
|
@@ -0,0 +1,94 @@ | |||
import mixin from 'reload-mixin.js' |
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.
Thanks - this could have waited, enjoy your concert! (who is it?)
I'll tentatively do the testing tomorrow. The builds still fail, though:
[INFO] ERROR in ./src/components/connection-health-mixin.js
[INFO] Module not found: Error: Can't resolve 'reload-mixin.js' in '/home/runner/work/openhab-webui/openhab-webui/bundles/org.openhab.ui/web/src/components'
[INFO] @ ./src/components/connection-health-mixin.js 1:0-36 3:11-16
import mixin from 'reload-mixin.js' | |
import mixin from './reload-mixin' |
As an habit I dropped the .js extensions in imports, except in assets
where is it required to build the component docs (as it is run by Node which requires them).
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
We had to drive 6 hours though Germany, and I wasn't driving so I had plenty of free time.
I have just tested everything I mentioned above, fixed the build and addressed your review regading file extensions. |
This was what appeared on Spotify when I checked them out, so I guess it was already my kind of stuff :) I'm sure it was indeed epic. I think we're good here! |
This re-applies the fix from openhab#2075, which must have been lost while rebasing openhab#1987. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Migitates and therefore closes #1205.