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

uib-tooltip - respect newlines in tooltips #5038

Merged
merged 1 commit into from Dec 7, 2018
Merged

uib-tooltip - respect newlines in tooltips #5038

merged 1 commit into from Dec 7, 2018

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Dec 4, 2018

This makes sure we can have multiline tooltips that actually show the line breaks.

This should not affect any tooltips which are just one line, but makes it possible for multiline tooltips to look properly:

before:

tooltipbefore

after:

tooltipnewline

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

@himdel
Copy link
Contributor Author

himdel commented Dec 4, 2018

(Testing, I did this to get the screenshots:

--- a/app/views/static/notification_drawer/_notification-body.html.haml
+++ b/app/views/static/notification_drawer/_notification-body.html.haml
@@ -23,7 +23,7 @@
     %span.drawer-pf-notification-message{'uib-tooltip-append'      => true,
                                          'uib-tooltip-popup-delay' => 500,
                                          'tooltip-placement'       => 'bottom',
-                                         'uib-tooltip'             => '{{ notification.message }}'}
+                                         'uib-tooltip'             => '{{ "foo\nbar:" + notification.message }}'}
       {{ notification.message }}
     .drawer-pf-notification-info{'ng-click' => 'customScope.markNotificationRead(notification, notificationGroup)'}
       %span.date

)

@himdel
Copy link
Contributor Author

himdel commented Dec 4, 2018

Cc @epwinchell .. do you know of any places where we would not want multiline tooltips to ..be multiline?

@himdel himdel added the bug label Dec 4, 2018
this makes sure we can have multiline tooltips that actually show the line breaks

this should not affect any tooltip which are just one line

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1655977
@miq-bot
Copy link
Member

miq-bot commented Dec 4, 2018

Checked commit https://github.com/himdel/manageiq-ui-classic/commit/a2e6c7c55d946901069ab30b5aec22f48f5fd312 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Contributor

@epwinchell epwinchell left a comment

Choose a reason for hiding this comment

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

@himdel I think this is fine

@mzazrivec mzazrivec self-assigned this Dec 7, 2018
@mzazrivec mzazrivec added this to the Sprint 101 Ending Dec 17, 2018 milestone Dec 7, 2018
@mzazrivec mzazrivec merged commit 1fbce87 into ManageIQ:master Dec 7, 2018
@himdel himdel deleted the tooltip-newline branch December 7, 2018 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants