-
Notifications
You must be signed in to change notification settings - Fork 356
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
GTL - use miqSparkle-style spinner when loading #4844
Conversation
Cc @hstastna (because that BZ) |
I am ok with this PR, but not able to recreate the BZ, too. But @h-kataria I think you were able to recreate the BZ. Maybe you could also to test this PR 😏 Maybe also @kbrock Thanks! ❇️ |
This pull request is not mergeable. Please rebase and repush. |
Checked commit https://github.com/himdel/manageiq-ui-classic/commit/825a368705fb19e7ab66278c5c948c6c1e96fbcc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@himdel i was not able to recreate on upstream, was only randomly able to recreate on Gaprindashvili. But i have tested this on several explorer screen with and without some |
@himdel can you knock down code climate issues? other then those i am good with merging this PR. |
@h-kataria Aah, good catch, added gaprindashvili/yes :). Re CC, I don't see a good way of fixing those... I don't think doing ReportDataController.prototype.loading = function(loading) {
this.$window.ManageIQ.gtl.loading = loading;
this.settings.isLoading = loading;
loading ? miqSparkleOn() : miqSparleOff();
}; increases readability much, do you? |
@himdel how about something like this, a little clearer (I even fixed your typo): ReportDataController.prototype.setLoadingState = function(state) {
this.$window.ManageIQ.gtl.loading = state;
this.settings.isLoading = state;
state ? miqSparkleOn() : miqSparkleOff();
}; |
this changes the GTL spinner code to show the ManageIQ spinner when the content is loading this should prevent timing issues when trying to switch views (tree_select) when a GTL view is being loaded using ManageIQ.gtl.loading in miqSparkleOff is ...sub-optimal, but I'm currently seeing no way not to do that without the spinner disappearing and reapearring when the ajax request finishes but before the angular gtl code finishes initializing https://bugzilla.redhat.com/show_bug.cgi?id=1626627
@@ -355,7 +361,6 @@ | |||
ReportDataController.prototype.setDefaults = function() { | |||
this.settings.selectAllTitle = __('Select All'); | |||
this.settings.sortedByTitle = __('Sorted By'); | |||
this.settings.isLoading = false; |
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.
(removed because setDefaults
is only called from the same getData
response handler as that setLoading
in $timeout
above, but too early because no timeout)
Ok ok, fixed & rebased :) |
GTL - use miqSparkle-style spinner when loading (cherry picked from commit 249138c) https://bugzilla.redhat.com/show_bug.cgi?id=1626627
Hammer backport details:
|
this changes the GTL spinner code to show the ManageIQ spinner when the content is loading
this should prevent timing issues when trying to switch views (tree_select) when a GTL view is being loaded
using
ManageIQ.gtl.loading
inmiqSparkleOff
is ...sub-optimal,but I'm currently seeing no way not to do that without the spinner disappearing and reapearring when the ajax request finishes but before the angular gtl code finishes initializing
Probably needs quite some testing :).
https://bugzilla.redhat.com/show_bug.cgi?id=1626627