#102 Empty feed title tweak for themes

Closed
Gravemind wants to merge 0 commits from deleted into fox/master

I'm trying to fix a small issue on my feedlish theme (also affects feedly), and I couldn't find a css-theme-only solution...

(At first I tried to get back something like the pre-18.12 behavior: but it seems overkill.)

This PR, is a simple and more "flexible" solution: it just adds a CSS class single_feed when tt-rss displays a single feed source (when hl.feed_title is empty), so themes can act on it.

But it's not perfect:

1) The class would be better placed "globally" instead of on each row (ex. on the headlines frame?).

2) Semantically, an empty hl.feed_title does not mean it's a single feed source, it just happens to be how the php side works currently...

But I don't see how to fix those imperfection without adding a lot more code, making the "feature" not worth it anymore (I think).

EDIT: fix pre-18.12 behavior link

I'm trying to fix [a small issue on my feedlish theme](https://github.com/Gravemind/tt-rss-feedlish-theme/issues/4) (also affects [feedly](https://github.com/levito/tt-rss-feedly-theme)), and I couldn't find a css-theme-only solution... ([At first I tried to get back](https://git.tt-rss.org/Gravemind/tt-rss/commit/85d864a8a636d33c2c2e5becffe1a35fed494e9f) something like the [pre-18.12 behavior](https://git.tt-rss.org/fox/tt-rss/src/18.8/classes/feeds.php#L552): but it seems overkill.) This PR, is a simple and more "flexible" solution: it just **adds a CSS class `single_feed`** when tt-rss displays a single feed source (when `hl.feed_title` is empty), **so themes can act on it**. **But it's not perfect**: 1) The class would be better placed "globally" instead of on each row (ex. on the headlines frame?). 2) Semantically, an empty `hl.feed_title` does not mean it's a single feed source, it just happens to be how the php side works currently... But I don't see how to fix those imperfection without adding a lot more code, making the "feature" not worth it anymore (I think). EDIT: fix [pre-18.12 behavior](https://git.tt-rss.org/fox/tt-rss/src/18.8/classes/feeds.php#L552) link
fox commented 8 months ago
Owner

i don't see anything wrong with adding this (i think internally i'm also using feed_title for the same thing although right now i'm not completely sure, i'll need to take a look)

i would however go the other way around and set row class when it's a virtual feed, i just don't like how single_feed sounds, idk

i'll think about this tomorrow and either merge your PR or an above alternative

i don't see anything wrong with adding this (i think internally i'm also using feed_title for the same thing although right now i'm not completely sure, i'll need to take a look) i would however go the other way around and set row class when it's a virtual feed, i just don't like how single_feed sounds, idk i'll think about this tomorrow and either merge your PR or an above alternative
Jordan Galby commented 8 months ago
Poster

A virtual feed class sounds better indeed, and avoids confusions (ex. a directory with a single feed would not have been 'single_feed')

A virtual feed class sounds better indeed, and avoids confusions (ex. a directory with a single feed would not have been 'single_feed')
fox commented 8 months ago
Owner

8b26b8629f

how about this instead?

https://git.tt-rss.org/fox/tt-rss/commit/8b26b8629f0c7c327cfbac76eb22f65341f31397 how about this instead?
Jordan Galby commented 8 months ago
Poster

Perfect! Thank You! Closing the PR.

Perfect! Thank You! Closing the PR.
Please reopen this pull request to perform merge operation.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.