Bug 1293486 - Puppet class names are trunctated to 32 chars irrespective of cell width
Summary: Puppet class names are trunctated to 32 chars irrespective of cell width
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.1.5
Hardware: All
OS: All
unspecified
high vote
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: sthirugn@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-21 21:49 UTC by Andrew Schofield
Modified: 2019-04-01 20:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1255182
Environment:
Last Closed: 2016-07-27 09:00:50 UTC
Target Upstream Version:


Attachments (Terms of Use)
puppet class with 81 characters name (85.26 KB, image/png)
2016-04-07 20:35 UTC, sthirugn@redhat.com
no flags Details
puppet class page (81.37 KB, image/png)
2016-04-07 20:38 UTC, sthirugn@redhat.com
no flags Details
How would the class names look when wrapping instead of ellipsis (27.07 KB, image/png)
2016-04-11 08:27 UTC, Ivan Necas
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Andrew Schofield 2015-12-21 21:49:38 UTC
+++ This bug was initially created as a clone of Bug #1255182 +++

Description of problem:
Puppet class names in the web UI do not resize to the width of the cell (So if you have a <module>::<var> class name that approaches 32 chars this may not be fully visible).


Version-Release number of selected component (if applicable):
6.1.5

How reproducible:
Config -> Puppet classes

Steps to Reproduce:

This is generated by /usr/share/foreman/app/views/puppetclasses/index.html.erb 

<% for puppetclass in @puppetclasses %>
      <tr>
        <td><%=link_to_if_authorized trunc(puppetclass.name), hash_for_edit_puppetclass_path(:id => puppetclass).merge(:auth_object => puppetclass, :authorizer => authorizer) %></td>
        <td>


And the trunc method (from : /usr/share/foreman/app/helpers/layout_helper.rb) says this:

def trunc(text, length = 32)
    text    = text.to_s
    options = text.size > length ? { :'data-original-title' => text, :rel => 'twipsy' } : {}
    content_tag(:span, truncate(text, :length => length), options).html_safe
  end



Actual results:
Class name text is trucated to 32 chars

Expected results:
Class names should be fully visible

Additional info:

Comment 1 Bryan Kearney 2016-01-12 20:38:48 UTC
Since i missed this earlier... 1255182  is about the capsule name, this is about the puppet class.

Comment 2 Brad Buckingham 2016-01-26 17:42:13 UTC
Created redmine issue http://projects.theforeman.org/issues/13384 from this bug

Comment 4 Bryan Kearney 2016-01-26 19:10:13 UTC
Upstream bug component is Provisioning

Comment 5 Bryan Kearney 2016-01-27 09:10:07 UTC
Upstream bug component is WebUI

Comment 6 Brad Buckingham 2016-01-27 12:33:27 UTC
Based on the comment in the upstream redmine, this has already been addressed.  Moving the bug to POST, since it should be included with the next rebase.

Comment 9 sthirugn@redhat.com 2016-04-07 20:35:11 UTC
Verified in satellite-6.2.0-6.2.beta.el7sat.noarch

I am able to hover over the class to see the full puppet class name - I tested a class with 81 characters and the screenshot is attached.

Comment 10 sthirugn@redhat.com 2016-04-07 20:35:52 UTC
Created attachment 1144879 [details]
puppet class with 81 characters name

Comment 11 sthirugn@redhat.com 2016-04-07 20:38:21 UTC
Created attachment 1144880 [details]
puppet class page

Comment 12 sthirugn@redhat.com 2016-04-07 20:43:29 UTC
Looking at the capsule bug, https://bugzilla.redhat.com/show_bug.cgi?id=1255182, I think the expectation is to wrap the name and not truncate it.

Comment 13 Brad Buckingham 2016-04-07 20:57:55 UTC
Hi Ivan,  Do you have any thoughts on this one? 

My assumption is that using ellipsis is the expected behavior for fields that may be long strings; however, it appears that the solution for this bug may be inconsistent with bug 1255182 (i.e. ellipsis vs wrapping).

In addition, looking at screenshot that Suresh attached for 'New Host Group' showing the 'Available Classes', it appears that we are not leveraging the space available before applying the ellipsis.

Comment 14 Ivan Necas 2016-04-08 12:55:05 UTC
This bug is about the puppet classes index page, which I understand from https://bugzilla.redhat.com/show_bug.cgi?id=1293486#c11 is handled properly now, and the case is with the puppet classes selector in host details. Since it's not part of the original bugzilla, that was already in verified state, I would suggest creating a separate bz redscribing this problem

Comment 15 sthirugn@redhat.com 2016-04-08 20:58:46 UTC
@Ivan,
Let me rephrase my concerns:

1. Ignore comment 10
2. In comment 11, as per the screenshot, it is clear that we are not wrapping the long names - instead we are showing the full name in mouse hover.
3. Now this is contradicting https://bugzilla.redhat.com/show_bug.cgi?id=1255182#c8 which says that the longer names are wrapped and not ellipsized.

Comment 16 Ivan Necas 2016-04-11 08:26:10 UTC
The difference between the capsule names and class names is the class names contain only chars and ::, so there is not natural place for wrapping, unlike with capsule names, so we would need to allow to wrap in between of class names.

Is this desired behavior?

My understanding of the initial bug was we were always truncating to 32 chars (regardless of free space on the page). Honestly the ellipsis looks better to me than the artificial wrapping (see attachment when I tried that out)

Comment 17 Ivan Necas 2016-04-11 08:27:18 UTC
Created attachment 1145862 [details]
How would the class names look when wrapping instead of ellipsis

Comment 18 sthirugn@redhat.com 2016-04-11 13:24:17 UTC
As per Comment 16, if there is not a way to wrap puppet class names, I am okay with leaving it as ellipsis.

Verified in satellite-6.2.0-6.2.beta.el7sat.noarch

Comment 19 Bryan Kearney 2016-04-11 14:07:06 UTC
Script cleanup. This was fixed by
http://projects.theforeman.org/issues/13384

Comment 21 errata-xmlrpc 2016-07-27 09:00:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1500


Note You need to log in before you can comment on or make changes to this bug.