Closed (fixed)
Project:
Diff
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2016 at 14:59 UTC
Updated:
10 Nov 2016 at 10:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pivica commentedFirst version of patch. Didn't want to change this much but step by step and yeah...
Some notes:
Comment #3
johnchqueWorks really nice! I was just wondering if we really a ellipsis effect for the log message, or maybe we can just cut it. Discussed with @pivica, if we gonna show the log message makes sense to show it all as the patch does (shown in the picture).
Or maybe we would use Js for showing the complete log message when users requires, like when hovering or so.
Comment #4
pivica commentedWanted to explore a bit more idea that we use JS code to show/hide revision messages that are bigger then 1 line. I could not find quickly this kind of pattern in Drupal core, so here is implementation with a tag .more-link.
Here is how it looks with new patch:
With more link active:

With less link active:

Note that if we would like to apply this approach then we don't need any more .diff-responsive-table-wrapper wrapper applied for comparing table because it is not overflowing horizontally any more in this case. So lets not forget to remove it if we agree to implement this approach.
Comment #6
miro_dietikerThe "more" link steals an extra line. If we want to go into that direction, it should be part of the first line to stay compact.
Mobile: Agree, the centering is strange and doesn't match anything else. We need a better solution there.
You are applying height calculation / detection, that needs an update on viewport change. Does this now need a reload if the viewport changes?
Comment #7
miro_dietikerAh, the user width seems very limited to me. Real usernames are not always that compact and i fear cutting off at ~10 chars is too low. Let's reserve a little more room.
Comment #8
pivica commented> The "more" link steals an extra line. If we want to go into that direction, it should be part of the first line to stay compact.
Okey will move more to be in line with first line.
> Mobile: Agree, the centering is strange and doesn't match anything else. We need a better solution there.
Hmmm the problem is that we have two type of layouts for navigation for big and small screens. Not easy stuff, at least i would not center nav links for small screens - usual pattern is that prev/next links are aligned left and right with the edge of parent in that case and not center aligned; we can try this and see how it looks. Later we can always try to make it better.
> You are applying height calculation / detection, that needs an update on viewport change. Does this now need a reload if the viewport changes?
Probably yes, didn't want to do more here before we figure will we add more or not. Will add now.
> Ah, the user width seems very limited to me. Real usernames are not always that compact and i fear cutting off at ~10 chars is too low. Let's reserve a little more room.
We are using display: table for this layout so cells will automatically adopt to bigger content. Speaking about this i got idea that for small screens we hide message fully and just leave more link - with this we will get even more room.
But i was not that hard on one line restriction so current CSS will allow date and name to break to multiple lines when there is not enough room, if we want to go with one line thingy for this also i can try couple of stuff with current approach.
Comment #9
johnchqueI also vote for moving the More to the first line.
Yes, sounds good to place the navigation links to be aligned right / left.
I think one line for smaller screens can be nice, since the screen is small we don't want to have a huge header shown by default.
I have also noticed that the Navigation links don't have the same padding as the links in the comparing element, this looks a bit odd. :)
Comment #10
johnchqueThe padding used for the navigation links is different from the links of the comparing element:
Comment #11
pivica commentedHere is a new patch, some notes about changes:
- Resize event is covered with debounce implementation so performance are not
affected too much.
- More link will work only for comparing items that have message. Line break
is allowed only for message it self, and not other columns.
- For very small screens we hide message fully and show only more link.
- More link is floating to the right so we are not adding one more line for it.
> The padding used for the navigation links is different from the links of the comparing element:
This is also fixed.
The stuff is becoming more and more complex, if we are going to go with this solution i think we should not make stuff more complex because probably we will use outside-in for diff as a better solution for future #2808623: Use outside-in for diff / revision navigation. So if possible lets just tweak stuff little bit more if needed but lets try to stop adding more complexity to current UI.
Comment #12
miro_dietikerHuh yeah, that's pretty complex to only show the more / less link for the message...
And most importantly, this wrapping only happens in rare cases as people usually enter short messages.
So really don't know if it is worth adding all this complexity...
Also BTW the key problem is that given the JS code complexity, this kind of functionality also should get (JS driver) test coverage, resulting in an even larger codebase to maintain.
So, the version without more/less link also isn't ready for commit above. What next? :-)
Comment #13
pivica commentedOkey had a discussion with Miro about 'more link' problem and we decided to drop the thing completely - its just adding too much stuff and it really try to solve very limited number of cases.
So we will try to keep table display layout for 'Comparing' component and we will not enforce 1 line rule - if revision message is long that probably means that it is important and we do want to show it to user.
So here is a new patch. Some notes about new patch:
And here are the screenshots:
iPhone 6 Plus
iPad
iPad Landscape
Laptop with HiDPI
Comment #14
miro_dietikerVery nice. Those screens look perfectly ready for release.
Let's challenge bot.
Comment #17
miro_dietikerCommittted. Fails are unrelated, see open issues.