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

Fixes #9453 - improve tooltips on puppetclass selection forms #2607

Closed
wants to merge 1 commit into from

Conversation

tbrisker
Copy link
Member

…s in host/hostgroup/configgroup edit

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 37a7ad8 must be in the format Fixes/refs #redmine_number - brief description.

Guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 150bb68 must be in the format Fixes/refs #redmine_number - brief description.

Guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

links.attr('onclick', 'remove_puppet_class(this)');
links.attr('data-original-title', __('Click to undo adding this class'));
links.attr('data-original-title', __('Click to remove ')+_.escape(fullname));
Copy link
Contributor

Choose a reason for hiding this comment

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

Use sprintf, not concatenation.

@domcleal
Copy link
Contributor

Please use commas between ticket numbers in the commit message.

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 21e3b90 must be in the format Fixes/refs #redmine_number - brief description.

Guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@tbrisker
Copy link
Member Author

@domcleal addressing your comments led to a bit of refactoring to DRY and remove dead code. Please review, [test] failure is random katello failure.

options = options_for_puppetclass_selection(klass, type)
text = remove_link_to_function(truncate(klass.name, :length => 28), options)
content_tag(:span, text).html_safe +
remove_link_to_function('', options.merge!(:class => 'glyphicon glyphicon-minus-sign'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Use merge and not ! in all of these calls, as the result is being passed into the method.

@domcleal
Copy link
Contributor

re ticket #2879, it looks like this is already working correctly in develop. I think there was a change to the CSS of tooltips somewhere else lately, might that have done it? I can't see what in your PR changes this.

screenshot from 2015-08-24 12-34-00
(develop)

Ditto with #5733, isn't that the same issue?

This most directly seems to be #9453, though you've implemented something different. I do prefer leaving the class name in the tooltip though, as I think it's more helpful when it's truncated.

@tbrisker
Copy link
Member Author

@domcleal It seems like #2879 and #5733 are indeed already fixed in develop, although there are some issues with the tooltips as they are currently. I seem to recall a certain case where they were broken but can't seem to reproduce now. As far as I'm concerned they can both be marked as resolved and I'll edit the commit message for this to only #9453 (or also add another new issue for the other changes in this if you wish).

@domcleal
Copy link
Contributor

Yep, please just use #9453, you've improved the wording. If you can mark the other two with release 1.10.0 and resolved, then that's good. Thanks.

@tbrisker tbrisker changed the title Fixes #2879 #5733 #9453 - Correctly display tooltips for puppetclasse… Fixes #9453 - improve tooltips on puppetclass selection forms Aug 25, 2015
@tbrisker
Copy link
Member Author

@domcleal updated commit message, addressed comments and marked other bugs as resolved.

@dLobatog
Copy link
Member

@tbrisker I think on the original bug they want it to say "Add this class" and "Remove this class", as it's a bit more 'friendly'. I'd say just change that & I'll merge. Works fine.

@domcleal
Copy link
Contributor

I think it's an improvement as it is, just ignore that suggestion?

@domcleal
Copy link
Contributor

One reason it's important to keep the class name in the tooltip is because the names in the actual list may be truncated, as there's limited space. The tooltips allow users to see the long names, which is what the other tickets in the title were originally about (but are currently fixed in develop).

@dLobatog
Copy link
Member

Merged as acc0752, thanks @tbrisker!

@dLobatog dLobatog closed this Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants