-
Notifications
You must be signed in to change notification settings - Fork 983
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 #34515, #34516 - Add host owner and comment on host list page #9182
Conversation
Issues: #34516 |
I've tried to apply this to get the screenshot from the instance with real data. I encountered the following issue though, let me know once fixed, I'm happy to retest.
|
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.
Thanks, @pkoprda! Some comments/suggestions inline. Also, I've noticed that a user doesn't have to actually hover over the icon to see the full comment, which is... just weird :) Moreover, when the full text is shown, I don't have much time to read it, so not sure if it's useful for long descriptions, maybe we could disable autofading? Here is a gif:
app/views/hosts/_list.html.erb
Outdated
<td class="hidden-tablet hidden-xs"><%= label_with_link host.hostgroup, 23, @hostgroup_authorizer %></td> | ||
<td class="hidden-tablet hidden-xs ellipsis"><%= last_report_column(host) %></td> | ||
<td class="hidden-tablet hidden-xs" title="<%= host.comment.truncate(255) %>"><%= icon_text('comment', '') unless host.comment.empty? %></td> |
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.
<td class="hidden-tablet hidden-xs" title="<%= host.comment.truncate(255) %>"><%= icon_text('comment', '') unless host.comment.empty? %></td> | |
<td class="hidden-tablet hidden-xs" title="<%= host.comment&.truncate(255) %>"><%= icon_text('comment', '') unless host.comment.empty? %></td> |
You can use safe navigation in Ruby, so in case there is no comment for the host, it won't raise an exception. Probably this why the tests are failing.
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.
Thanks @ofedoren for suggestion. I am not sure how to fix that autofading, because in my environment seems like that it does not fade. So when I hover over the icon, the tooltip stays there until I move away my cursor.
app/views/hosts/_list.html.erb
Outdated
<td class="hidden-tablet hidden-xs"><%= label_with_link host.hostgroup, 23, @hostgroup_authorizer %></td> | ||
<td class="hidden-tablet hidden-xs ellipsis"><%= last_report_column(host) %></td> | ||
<td class="hidden-tablet hidden-xs" title="<%= host.comment.truncate(255) %>"><%= icon_text('comment', '') unless host.comment.empty? %></td> |
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.
Since we use icon only and we cannot shrink the column a bit more, maybe it's better to actually put text there? Truncated, of course, and leave the full text to be shown on hover.
Or at least we could center the icon like with Power
column.
Thanks for the updates. What do you think about moving Also, I've played a bit and I guess a simple centered icon looks better: But I'd better ask more competent people regarding this: @MariaAga, @Ron-Lavi, @ares |
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.
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.
Adding a screen of both versions presented here from the system with more data:
I like the second option more. I also agree we should do something about the auto-hiding of the tooltip. Ideally it should still until hover out. If that's not possible, I'd consider clicking the icon to open the modal.
@MariSvirik any thoughts? We're adding two new columns here, the host owner and the comment.
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.
Looks good to me, @ofedoren any other thoughts on this?
[test katello] |
Add two columns in host list page - owner of the host and host comment