-
Notifications
You must be signed in to change notification settings - Fork 987
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
Fixes #21135 - Add tooltip for overridden flag icon #4938
Conversation
shiramax
commented
Oct 23, 2017
Issues: #21135 |
@@ -50,7 +50,7 @@ | |||
<% @puppetclass.class_params.includes(:environments, :environment_classes, :lookup_values).each do |key| %> | |||
<li data-used-environments=<%= key.environments.map(&:to_s).to_json %> > | |||
<a data-toggle="tab" id="pill_<%= key.to_param %>" href="#<%= key.to_param %>" title="<%= key %>"> | |||
<div class="clip"><%= icon_text((key.override ? "flag": ""), key.to_s.tr('_',' '), :kind => 'fa') %></div> | |||
<div class="clip"><%= icon_text((key.override ? "flag": ""), key.to_s.tr('_',' '), :kind => 'fa', :title=>"Overridden") %></div> |
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.
please make sure you extract the string, thanks :)
@ohadlevy , |
@orrabin can you review please? |
lgtm. I think we should change the tooltip on the key to only appear for long keys, that would make it easier to find the flag tooltip but that could be addressed in a separate pr. |
in that case, can you add a test please? |
@orrabin, |
@shiramax something like the fact that the string is getting shorter if its longer than...? |
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.
test/integration/puppetclass_test.rb
Outdated
click_link 'Smart Class Parameter' | ||
assert_empty page.find("#pill_#{smart_class_parameter_short.id}-#{smart_class_parameter_short.key}")['data-original-title'] | ||
click_link 'Smart Variables' | ||
assert_empty page.find("#pill_#{smart_variable_short.id}-#{smart_variable_short.key}")['data-original-title'] |
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.
Put one space between the method name and the first argument.
test/integration/puppetclass_test.rb
Outdated
smart_variable_short = FactoryBot.create(:variable_lookup_key, :key_type => '', :puppetclass => puppet_class_short, :key => "c"*40) | ||
visit edit_puppetclass_path(puppet_class_short) | ||
click_link 'Smart Class Parameter' | ||
assert_empty page.find("#pill_#{smart_class_parameter_short.id}-#{smart_class_parameter_short.key}")['data-original-title'] |
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.
Put one space between the method name and the first argument.
Thanks @shiramax ! |