-
Notifications
You must be signed in to change notification settings - Fork 38
Bug 1151225 - Wrap first line of commit message #501
Conversation
deathping1994
commented
May 1, 2015
Thank you for taking a look at this - some comments below :-) webapp/app/css/treeherder.css, line 384 [r1] (raw file): webapp/app/index.html, line 127 [r1] (raw file): Comments from the review on Reviewable.io |
Reviewed files:
Comments from the review on Reviewable.io |
That's better thank you :-) @tojonmz, any thoughts on whether the |
@edmorley white-space: normal; will collapse Sequences of whitespace into a single whitespace. Text will wrap when necessary. This is default anyway but it has been specified in other classes as well so I also added it. |
@edmorley I think only in cases where we are trying to override a 'non-default' bootstrap value, do we add a default css property to a selector. I had done this once or twice the past year, but not frequently. I'll have a look and see if I observe any difference with a local branch. |
@deathping1994 cool, a couple things I've noticed so far, if you do a blink-test (flip quickly between the same resultset on production vs. the PR). Eg.
If Thank you for looking into this @deathping1994! |
Thanks @tojonmz , I'll get rid of the 5px padding. |
@deathping1994 we'd like to preserve the 15px empty/white boundary between the commit messages and the job table at all times, and have the commit text that hits the edge of its container, not disappear underneath that boundary - and instead wrap down to the next line if it doesn't fit. It looks like there might be a bit of playing needed to figure out the solution. |
color: #777; | ||
} | ||
display: inline-block; | ||
max-width: 80%; |
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.
I think I see what this is doing by inducing an earlier wrap, but I am not sure if it will be needed after solving the boundary behavior problem.
If I remove a couple of the properties included in this change:
And then override the default 15px right hand bootstrap padding on the And it will trigger a wrap exactly when the job table boundary (the empty space to its right), hits that blue container. No part of the string is obscured, and it wraps correctly. However we also want the wrapped line contained within the commit message 'region', not all the way to the left. So that would still need to be sorted. But hope this helps. |
I've tried almost everything I could , but I've not yet been able to understand why the text gets hidden under table. But I've found some tricks like indenting the second line on wards in .commit-msg-wrap using css ::first-line pseudo element, or setting max-width to 80% for .commit-msg-wrap |
Hey Mike, Jonathan and I had a quick look at this. I think getting this working properly using the current approach might be hard -- I tried for about 20 minutes to find some combination of things that would work, with no luck. I suspect this might be the sort of case that flexbox could handle well -- fixed width for commit sha + author, then use the rest of the space for the message. For more information on how to use it, see: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_flexbox_to_lay_out_web_applications |
@deathping1994 Hi Mike, just a heads' up, the treeherder and treeherder-ui repos were unified today (per Ed's closure above, of all -ui PR's). This means that this -ui PR would need to continue as a new PR in https://github.com/mozilla/treeherder. |