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
[AMBARI-22802] Styling for install wizard #134
[AMBARI-22802] Styling for install wizard #134
Conversation
Refer to this link for build results (access rights to CI server needed): |
ambari-web/app/assets/index.html
Outdated
$('[data-toggle="tooltip"]').tooltip(); | ||
//enables tooltips added later | ||
const body = document.getElementsByTagName('body')[0]; | ||
const observer = new MutationObserver(() => { |
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.
It's bad for performance to trigger tooltip on any DOM change, also it may add already removed tooltips(which should be hidden). Use MutationObserver locally with a particular element that needs tooltip.
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.
Where exactly would you move this code? I already tried putting it in some API hook of the view and it would not work.
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.
You can put tooltip initialization in didInsertElement of an appropriate view.
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 tried that, but it did not work. I need something that is guaranteed to run after all dynamic items are added to the DOM. didInsertElement() only runs after the template is initially added. If you have, say, table rows that contain tooltips that get added after the initial render, they will not get activated. At least, that was my observation.
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 meant to add MutationObserver in didInsertElement, and it will observe change only inside table or any other parent element.
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.
OK, that worked. Thanks.
@@ -36,7 +36,7 @@ App.ModalPopup = Ember.View.extend({ | |||
disableSecondary: false, | |||
disableThird: false, | |||
primaryClass: 'btn-success', | |||
secondaryClass: 'btn-default', |
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.
By design secondary button should have "btn-default" class
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.
Why? It seems like a secondary button should have the btn-secondary class. Otherwise, why is that part of the spec?
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, we have "btn-secondary" class, change is good.
Refer to this link for build results (access rights to CI server needed): |
# Conflicts: # ambari-web/app/styles/application.less # ambari-web/app/styles/wizard.less # ambari-web/app/templates/installer.hbs
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
retest this please |
Refer to this link for build results (access rights to CI server needed): |
@@ -149,8 +149,9 @@ App.WizardStep7Controller = App.WizardStepController.extend(App.ServerValidatorM | |||
if (!this.get('stepConfigs.length')) return true; |
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.
You can replace all "if"s by one expression joined by "or"
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.
Done.
Refer to this link for build results (access rights to CI server needed): |
What changes were proposed in this pull request?
Styling for new and updated Install Wizard components. This includes:
How was this patch tested?
All units tests passing:
20297 passing (25s)
125 pending