Bug 913778 - tags view broken due to change to super class LocatableIButton
Summary: tags view broken due to change to super class LocatableIButton
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: RHQ 4.6
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-22 02:17 UTC by John Mazzitelli
Modified: 2013-09-03 14:42 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-03 14:42:36 UTC
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2013-02-22 02:17:09 UTC
A change was made on Februrary 8, 2013:

Commit 3125d4e96856d39de9b81bc52e54ef26fd25ede2
"Setting auto fit for button's width when title consits from more than 15 chars"

that broke the Reports>Tags view.

I think the problem is:

        if (getTitle().length() > 15) {
            setAutoFit(true);
        }

assumes getTitle will always be non-null. This is not necessarily the case all the time.

We need to go through the UI and make sure this didn't break anything else. Perhaps the best thing to do is just to do a NPE check

String title = getTitle();
if (title != null) {
  if (title.length() > 15) {
     setAutoFit(true);
  }
}

This bug completely renders the Reports>Tags UI inoperable. Would like to get this in before we build RHQ 4.6.

Comment 1 John Mazzitelli 2013-02-22 02:25:11 UTC
I checked in a fix that ensures title is not null before checking length (git commit to master 6f71c2d). I think this fixes the problem in Reports>Tags.

This probably fixes the problem across the entire UI, but please double check this and make sure everything is OK with this and the original change. It appears this setAutoFit() is going to effect every LocatableIButton on every page, we need to make sure this auto-fitting doesn't break other pages in the UI that we are not aware of.

Comment 2 Jirka Kremser 2013-02-22 10:46:11 UTC
Seems working to me, I hope I've checked everything. When going through our various view pages, I've noticed we are not quite consistent in the width for buttons, so I did some unifying (if the button is in the tool strip and title.length is less than 16 then autoFit = false now)

http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=ad131fe3d

Comment 3 Heiko W. Rupp 2013-09-03 14:42:36 UTC
Bulk closing of issues in old RHQ releases that are in production for a while now.

Please open a new issue when running into an issue.


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