Closed gbomacfly closed 10 years ago
@jancborchardt what do you think?
I don't see any use case with showing the oldest items first. Neither I see an use case with other kind of order except the one we have now.
@cosenal i think he means: oldest item at the top. But i have to agree. Waiting for jan
@Raydiation I understood what the OP means, I just don't see a use case.
Yeah, newest-first sort order just makes more sense – it’s the way websites themselves show articles too – and we’re not going to make it configurable. @gbomacfly sorry, but we want to keep it simple. If you want, you can just revert the sort order in your ownCloud instance by modifying the code.
Closing this hence. The app is called »News«, not »Old shit«. ;)
I agree with closing this.
@gbomacfly thanks for the feedback and let us know if you had a particular use case in mind.
I do know that this app is called News, but it's practically an RSS reader. People do use these for other purposes, such as reading comics. Saying that it isn't supposed to be used for "Old shit" is fair, but most people (guessing here), would activate "Show only unread", to get the oldest unread post, which wouldn't make it "Old shit", but relevant posts that should be read before newer stuff. Just my 2-cents.
@GnaXi that "old shit" post was not meant as an insult, just a funny remark ;)
ATM we dont consider to implement this, but that may change in the future if we find a nice way to do it.
Not taken as an insult, don't worry :P But it would definitely be a usable feature for a lot of people! :)
Yes, we talked about this but still want to ponder if and how to best implement it. The problem is when there’s a feature request which doesn’t describe the underlying problem or need. Thank you @GnaXi for doing that.
One possible implementation might be to show newest up top, but to have the viewport scrolled to the oldest unread. This is similar to how the Twitter mobile clients work, and we could extend it to preserving the scroll position for each feed.
Technically, this seems to conflict with autopaging because there might be a lot of new entries there, but that could be solved by virtual scrolling: http://sergimansilla.com/blog/virtual-scrolling/
Reopening this for thinking aloud, also because it’s concerned with state preservation.
I moved very rencently from google reader to have owncloud and news app. I like to go through all my unread news in oldest first order and work my way towards the latest news. I think having oldest in top order showing for unread items would be really appreciated feature.
I agree with the problems of having oldest first order for all items view, but I think this would work well for unread items view.
i aggree with mikonieminen - i'd like to sort for oldest news, too. thats because i mostly only show unread, so would even the "old shit" be new for me ;)
otherwise i sometimes don't get the content if there is a following news-article to something that happend 3 minutes before.
+1 for sorting by date
+1 for sorting by date I imagine many like me and mikonieminen are moving here after Reader's discontinuation. Great app by the way, makes it a hell of a lot easier than other rss servers which require knowledge of SQL.
Anyways, I use RSS to make sure that when I have the time I won't miss any updates on several sources (comics, actual news, deal offers, friends' blog/twitter posts) many of these make sense in chronological order only and it is also better to be able to try and keep up whenever I have the time to go to the reader. Again, doing this "newest first" would a residue of older until I have time to read it all.
Hm ok i think especially in terms of comics and stories that are continued over multiple articles this makes a lot of sense. It will take some time though since its a bigger change (autopaging is a bit complicated with different sorrting) so dont expect this to be implemented soon.
@jancborchardt where would you put the sort button? Id put it in the upper right corner with fixed position
BTW: should this be remembered per feed? since only a few feeds are comics or continued stories
Any hints where I could start looking? I could try to help with this one.
@mikonieminen cool, lets first start with the backend:
All those methods need another parameter to tell it to basically do
AND `items`.`id` > ?
instead of
AND `items`.`id` < ?
and the ORDER BY needs to be ASC
At the moment we autopage by id because if we order by offset it fucks up the ordering when marking items as read.
Then the different layers need to be adjusted:
The controller should remember the order state with $api->setUserValue('key', 'value')
You also need a route for the frontend to get the sorting with $api->getUserValue('key')
Dont forget to adjust the tests. If the backend is done the hard stuff starts on the frontend, I'll post further details on that if the backend is ready.
@mikonieminen cc @Raydiation Don't forget you also have to update the orderBy clause in templates/part.items.php
What about rather some small overlay on the bottom with a down arrow which says »show oldest unread article«? It would autoscroll you down to the first unread item. And it would only be there for feeds when the oldest unread article is below the viewport and when you didn’t scroll down yet so that it doesn’t keep sticking around.
Will be very slow since you need to load everything and basically make auto paging useless. Apart from that every previous article will be marked read.
Reversing is way faster, requires less code and will fill more natural
@jancborchardt That would be a nice solution, not disturbing current flow for other users, and not requiring any configuration. I really like it. I only see 2 minor issues there:
The use case for this issue is also reading comic feeds. You don't want to read from bottom to top
@Raydiation
You implemented autopaging (lazy loading, right?)..so what determines which elements are fetched first and which elements are loaded in next page?
Well, I am asking, because I also would like to have the possiblity to switch the date sorting between latest and oldest (which is possible in android client, I guess).
EDIT: Sorry, just noticed now: https://github.com/owncloud/news/issues/161#issuecomment-20387338 [...] At the moment we autopage by id [...]
Mobile surfing isnt always successful :)
The android app downloads all the articles for offline usage so ordering is not a problem. As for the web app I decided against that approach because most of the articles are only read once if at all so we optimised for bandwidth.
Are you interceded in fixing that issue? It's quite a lot to list what's to do and it's the next feature on my to-do list (next summer). I'll of course support you if you want to tackle it ;)
Interested*
@Raydiation I would like to help. Unfortunately I can only program in Java. Did you make any progress on that? As I like to read the oldest first on phone, I avoid the web view due to different sort order...
Well, concerning the implementation problem. I guess you periodically fire a SQL which sorts the data right away. Isnt there any publish date in those feed entries? I ask myself, if the feeds are always fetched and stored to DB from remote server in correct order. Is this the case, you could use the DB create-date to autopage the entries.
What is that offset you spoke earlier about?
see #115
Until this is cleanly implemented, these are the 2 lines I change to sort the items oldest first. Disclaimer: This works only for me: Reading all new articles, in the order they come, eventually folder by folder, not showing read articles and not using pagination (If I reach the bottom, I just reopen the folder).
diff --git a/db/itemmapper.php b/db/itemmapper.php
index 1ec2838..2cbee34 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -63,7 +63,7 @@ class ItemMapper extends Mapper implements IMapper {
'ON `folders`.`id` = `feeds`.`folder_id` ' .
'WHERE `feeds`.`folder_id` = 0 ' .
'OR `folders`.`deleted_at` = 0 ' .
- 'ORDER BY `items`.`id` DESC';
+ 'ORDER BY `items`.`id` ASC';
}
private function makeSelectQueryStatus($prependTo, $status) {
diff --git a/templates/part.items.php b/templates/part.items.php
index 671d53c..46849d3 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -3,7 +3,7 @@
<ul>
<li class="feed_item"
- ng-repeat="item in itemBusinessLayer.getAll() | orderBy:['-id'] "
+ ng-repeat="item in itemBusinessLayer.getAll() | orderBy:['+id'] "
ng-class="{ read: item.isRead(), compact: isCompactView(), open: item.active}"
data-id="{{ item.id }}"
ng-click="itemBusinessLayer.setRead(item.id)">
well that breaks autopaging xD
@Raydiation Yep, as stated by the disclaimer. It just "works for me" until a clean implementation is available. I am not claiming that it fixes the issue, but it has enabled me to use my newsreading workflow (reading comics, video series, news, in the correct order) for the past 5 months.
Implemented
I wish to have an option to change the sort-order globally. I would like to have the oldest items first