[patch] Make author and excerpt nowrap always

Development-related discussion, including bundled plugins
User avatar
duh
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 07 Feb 2016, 21:46

[patch] Make author and excerpt nowrap always

Postby duh » 07 Feb 2016, 22:24

In combined display mode with content previews (excerpts) enabled:

I noticed when collapsing an article via the toggle_expand hotkey (bound to "o" in googlereaderkeys, for instance), the excerpt is still set to normal wrap behavior, because the article is still active for keyboard navigation (class "active" on div id="RROW-nnnn"). While it actually makes some sense to show a longer excerpt when an article is active but unexpanded, it probably should still be capped at one line to prevent jagged-looking long excerpts.

As I was investigating, I noticed a corner case: if the window is set at just the right width, and the article headline is just the right length, the author's name can be split across lines in either expanded or unexpanded view. So I fixed that in the process; it makes sense that the author probably should be a nowrap element.

Diff is against master commitid 50bda3fe and is tested with a couple external themes as well. My gitlab userid is "tv" if you'd like to grant perms for pushing this to a branch for a merge request. Screenshots below diff.

Code: Select all

commit a95aae5f77f9a2085130dc8b1a824838a2a1f0bd
Author: Todd Vierling <[email protected]>
Date:   Sun Feb 7 13:04:50 2016 -0500

    Make sure author and excerpt spans don't wrap even if active.

diff --git a/css/cdm.css b/css/cdm.css
index c7d34c4..1ee4715 100644
--- a/css/cdm.css
+++ b/css/cdm.css
@@ -211,6 +211,7 @@ div.cdm.active div.cdmContent {
 }
 
 span.cdmExcerpt {
+   white-space : nowrap;
    font-size : 11px;
    color : #999;
    font-weight : normal;
@@ -275,6 +276,7 @@ div.cdmContentInner iframe {
 }
 
 div.cdmHeader span.author {
+   white-space : nowrap;
    color : #555;
    font-size : 11px;
    font-weight : normal;


Before and after - collapsed:

Image
===
Image

Before and after - expanded:

Image
===
Image

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [patch] Make author and excerpt nowrap always

Postby fox » 07 Feb 2016, 22:52

i guess this makes sense, even though i really don't like to mess with that part of code anymore than necessary

e: you should have dev privileges now

User avatar
duh
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 07 Feb 2016, 21:46

Re: [patch] Make author and excerpt nowrap always

Postby duh » 07 Feb 2016, 23:49

fox wrote:i guess this makes sense, even though i really don't like to mess with that part of code anymore than necessary

e: you should have dev privileges now


Thanks; merge request opened. I know these tiny tweaks are not particularly important, but we can do them for you so you don't have to bother. ;)


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest