Skip to content
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 to providers for toolbar and use it to resolve promise from toolbarClick #3351

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

karelhala
Copy link
Contributor

@karelhala karelhala commented Jan 31, 2018

Fixes #3348

When clicking on toolbar items which does not return promise UI console would throw error which was silenced with reload of page. This PR wrap return object in $q.resolve() which works for checking if the return value of miqToolbarOnClick is really promise like object. If not, TOOLBAR_CLICK_FINISH is still sent from toolbarController (it will be sent emediately no need to wait for promise reolve).

UI changes

none

BZ

https://bugzilla.redhat.com/show_bug.cgi?id=1530939

@karelhala karelhala changed the title [WIP] Add to providers for toolbar and use it to resolve promise from toolbarClick Add to providers for toolbar and use it to resolve promise from toolbarClick Jan 31, 2018
@karelhala
Copy link
Contributor Author

@miq-bot add_label bug, gaprindashvili/yes
@miq-bot assign @himdel
@skateman this should resolve your issue.

@miq-bot
Copy link
Member

miq-bot commented Jan 31, 2018

Checked commit karelhala@74d1445 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Seal of Approval

@himdel himdel added this to the Sprint 79 Ending Feb 12, 2018 milestone Jan 31, 2018
@himdel
Copy link
Contributor

himdel commented Jan 31, 2018

Makes sense, Promise.resolve fixes it and we do have it shimmed for older browsers 👍

@himdel himdel merged commit 3e2eaff into ManageIQ:master Jan 31, 2018
@simaishi
Copy link
Contributor

simaishi commented Mar 7, 2018

@karelhala Please add BZ link.

@karelhala
Copy link
Contributor Author

@simaishi I don't think this has BZ.

@simaishi
Copy link
Contributor

simaishi commented Mar 7, 2018

@karelhala Backport to z-stream requires a BZ!

@karelhala
Copy link
Contributor Author

@simaishi oh I see, the problem is that #3192 fixed BZ, but introduced bug on some screens and this PR fixes that bug. So I guess linking https://bugzilla.redhat.com/show_bug.cgi?id=1530939 might be ok.

@simaishi
Copy link
Contributor

simaishi commented Mar 7, 2018

@karelhala 5.9 clone of that BZ (https://bugzilla.redhat.com/show_bug.cgi?id=1533234) is already closed, so that can't be reused... Can you please create a new BZ for this PR?

@himdel
Copy link
Contributor

himdel commented Mar 8, 2018

Backport together with #3532 please.

@karelhala
Copy link
Contributor Author

@simaishi sorry for the long delay, I thought this was resolved, but looks like we need to backport this to gaprindashvili as well, here is the coresponding BZ - https://bugzilla.redhat.com/show_bug.cgi?id=1596172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange JS error when trying to add a provider
5 participants