Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 167645

Summary: Bugzilla task viewer improperly wraps long strings
Product: z_Archived Reporter: Ian Whalley <inw-eclipse>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: trivial    
Priority: P3 CC: eclipse, robert.elves, steffen.pingel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
mylyn/context/zip none

Description Ian Whalley CLA 2006-12-12 10:01:20 EST
Mylar version 1.0.0 (congratulations!)

Our bugzilla (per bug 167351) has commit messages
from SVN automatically appended to it.  Along within these commit messages are the full
paths (in the repository) of the changed files.  Here is an expurgated example:

Affected
files:
---------------
11501 --> 11615
directory1/directory2/directory3/directory4/directory5/directory6/directory7/directory8/com/corp/prod/comp/package1/package2/SourceFileName.java

Because
the repository contains the source for a large, multi-component, java product, those paths
tend to be quite long.  I notice that in the task viewer, the filenames in those comments
wrap much earlier than they need to, frequently breaking the path when no break is necessary.
  I have verified that in the page from Bugzilla the path is unbroken.

I'm hoping that
the same problem occurs in the description section (as opposed to the comments), in which
this case this will be sufficient to demonstrate the problem.  I will comment accordingly.
Comment 1 Ian Whalley CLA 2006-12-12 10:02:43 EST
Indeed, the premature wrapping occurs in the description above.
Comment 2 Robert Elves CLA 2006-12-12 13:25:28 EST
Yes, this is a known problem. My last attempt to resolve this resulted in excess space below each comment (reducing density, counter to our goal). It was a tricky reflow problem stemming from the use of text viewers I believe.  It has since been relatively low priority. You could vote for bug#142084. 

*** This bug has been marked as a duplicate of bug 142084 ***
Comment 3 Ian Whalley CLA 2006-12-12 13:35:04 EST
Didn't notice the duplicate, sorry.

Have voted, although it's not a huge thing.
Comment 4 Robert Elves CLA 2006-12-12 13:48:52 EST
No worries Ian. If after more use it is still bothering you, please feel free to comment/vote on it. Some times the squeaky wheel gets the grease. ;)
Comment 5 Ian Whalley CLA 2008-01-02 11:12:06 EST
bug 142084 is resolved now, but this behaviour remains in Mylyn 2.2.  Reopening.
Comment 6 Frank Becker CLA 2008-05-24 09:55:39 EDT
(In reply to comment #5)
> bug 142084 is resolved now, but this behaviour remains in Mylyn 2.2. 
> Reopening.
> 

What version of Bugzilla did you use?

I  suppose that you use a version <= 2.18.6 ant then I think that this is related to bug#197539 comment#12.

If so that should be fixed.
Comment 7 Ian Whalley CLA 2008-06-08 14:50:18 EDT
(In reply to comment #6)
>>bug 142084 is resolved now, but this behaviour remains in Mylyn 2.2. 
>>Reopening.
>What version of Bugzilla did you use?

2.20.1, so if I understand bug #197539 correctly, it is not relevant.
Comment 8 Frank Becker CLA 2008-06-09 15:44:02 EDT
(In reply to comment #7)
> (In reply to comment #6)
> >>bug 142084 is resolved now, but this behaviour remains in Mylyn 2.2.
> >>Reopening.
> >What version of Bugzilla did you use?
> 
> 2.20.1, so if I understand bug #197539 correctly, it is not relevant.

This has an other reason. It looks like the problem in TaskEditorCommentPart.

But I don't know where exactly. It can be an text warping problem or that an control has the wrong size.

Do we handle this in this bug or should we create a new one?
Comment 9 Steffen Pingel CLA 2008-06-09 16:38:01 EDT
Frank, is there a sample bug report that I open in Mylyn to reproduce the problem?
Comment 10 Frank Becker CLA 2008-06-09 17:36:30 EDT
(In reply to comment #9)
> Frank, is there a sample bug report that I open in Mylyn to reproduce the
> problem?
> 

I think create a Task for 
product: Mylyn 
Component: Task
and your description is OK.

Comment 11 Steffen Pingel CLA 2008-06-10 03:57:18 EDT
Does this mean the bug is fixed in cvs and can be marked resolved?
Comment 12 Frank Becker CLA 2008-06-11 16:48:31 EDT
Created attachment 104549 [details]
patch

I think that his small pach fix the problem.
Comment 13 Frank Becker CLA 2008-06-11 16:48:34 EDT
Created attachment 104551 [details]
mylyn/context/zip
Comment 14 Steffen Pingel CLA 2008-06-11 17:27:33 EDT
When I look at the description of this bug I can not see the error. Frank, your patch will not work well if the editor is resized (made less wide) after the comment widget is created.

Test: directory1/directory2/directory3/directory4/directory5/directory6/directory7/directory8/com/corp/prod/comp/package1/package2/SourceFileName.java
Comment 15 Steffen Pingel CLA 2008-06-11 17:28:51 EDT
I think I am still missing the problem here? The rendering of comment 14 and the description looks good to me on the latest Mylyn.
Comment 16 Frank Becker CLA 2008-06-11 18:18:04 EDT
(In reply to comment #14)
> When I look at the description of this bug I can not see the error. Frank, your
> patch will not work well if the editor is resized (made less wide) after the
> comment widget is created.
> 

Sorry but I think my patch is OK because if you resize the editor all components keep there size. This means that you have a bigger part to scroll.
Comment 17 Frank Becker CLA 2008-06-11 18:21:27 EDT
(In reply to comment #16)
> 
> Sorry but I think my patch is OK because if you resize the editor all
> components keep there size. This means that you have a bigger part to scroll.
> 

If you do an manual refresh of the editor after an resize you get all the controls build new and the you have the expected size.

Comment 18 Steffen Pingel CLA 2008-06-11 18:49:41 EDT
Mik explained the problem which I now see if I look at the last few lines of the description: Bugzilla adds extra line breaks. In a sense this is not related to having long filenames in the comment (although that might trigger it). 

This bug needs to be fixed in the Bugzilla SAX parser. It needs to correctly strip out white spaces and new from description and comments (bug 235462).

Frank: The fact that comments and descriptions are restricted to a fixed with is intentional and I would like to keep the current behavior.
Comment 19 Steffen Pingel CLA 2011-09-27 17:12:06 EDT
Stale. Text in the task editor task editor now fills the available horizontal width.