miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.65k stars 706 forks source link

Automatically mark item as read on moving to it #1269

Open fenuks opened 2 years ago

fenuks commented 2 years ago

I've been using TT-RSS for long time, but decided to migrate to miniflux because I want run it on OpenWRT. It's really great, but one thing that is lacking in miniflux is option to enable automatic marking of items as read on move to them with n or p. One thing that miniflux does differently is hiding item on marking it as read, though. Automatic marking as read would also require that item is not automatically hidden until page is refreshed, but visually distinguished e.g. by greying it out a bit. I think such behaviour makes sense because you can easily undo action if one mispressed m.

Arteneko commented 2 years ago

is option to enable automatic marking of items as read on move to them with n or p.

I don't know how ttrss works, but I fail to understand this description... How exactly does it work in terms of behaviour ?

fenuks commented 2 years ago

TT-RSS marks item as read when you select it with n/p, but such entry isn't automatically hidden from the unread list (it's greyed out a bit, so you know it has been marked as read). If you refresh your unread list, you won't see these articles anymore, but as long you stay on the page, you can go back to any of them, and e.g. open them, or mark them as a favourite.

This has this advantage I can browse unread list with just typing n, close page in the middle of the process, and have all items seen so far marked as read. I can return to browsing later, and carry on from the place I ended previously.

I hope now it's a bit clearer. ;)

Arteneko commented 2 years ago

It is, I'm gonna think about this for a few days if no one picks it up before me

jloh commented 2 years ago

This would be a big change from the current workflow IMO. It isn't to much of a hassle to mark an item as read through the keyboard controls as you go, especially if you're already using them to navigate items. If this does get added I hope it'd be an option you can toggle vs one thats always enabled.

fenuks commented 2 years ago

It isn't to much of a hassle to mark an item as read through the keyboard controls as you go, especially if you're already using them to navigate items.

I can't agree here, imagine you have 100 items, and you must type n and then m for each. It is much of a hassle.

If this does get added I hope it'd be an option you can toggle vs one thats always enabled.

I think it should be definitely configurable with checkbox to opt in to this behaviour. Before posting this request, I've browsed related issues, and judging by number of proposals related to when and how items should be marked as read, people are highly opinionated about that. Even seemingly innocent changes like automatically marking item as read on v makes some people unhappy.

jloh commented 2 years ago

I can't agree here, imagine you have 100 items, and you must type n and then m for each. It is much of a hassle.

Just to confirm, you are aware that hitting m to mark an item as read automatically progresses to the next item? It does for me at least. So you can just press m continually to mark item after item read.

fenuks commented 2 years ago

Huh, thank you, it somehow escaped my attention, as I've been testing how to reproduce my current flow. That changes a lot, I can start using miniflux on daily basis now, although I would still like option to disable hiding items that were marked as read.

jloh commented 2 years ago

Yeah, that would be a good option. In the mean time there is a CSS snippet you can use:

/* Don't remove links marked as read instantly */
.hide-read-items .item-status-read:not(.current-item) {
    display: inherit;
}
fenuks commented 2 years ago

Thank you very much, that is exactly what I have wanted to achieve!

There is one more option that I like to have, but it's not possible to do in plain javascript: opening URL in new background tab.

I use this snippet with violentmonkey in case anybody is interested:

// ==UserScript==
// @name        (miniflux) open in the background
// @namespace   Violentmonkey Scripts
// @match       http://localhost:8080/*
// @grant       GM_openInTab
// @inject-into content
// @version     1.0
// @description Opens link in the new background tab with "i"
// ==/UserScript==

function openUrlsInBackground() {
  for (let activeArticle of document.querySelectorAll(
    'article.current-item a[data-original-link="true"]'
  )) {
    console.log("Opening ", activeArticle.href);
    GM_openInTab(activeArticle.href, { active: false });
  }
}

function onKeyDownEvent(event) {
  if (event.key === "i") {
    openUrlsInBackground();
    return false;
  }
  return true;
}
document.addEventListener("keydown", onKeyDownEvent);
wojtek1171 commented 1 year ago

Can't this feature be optional? For my workflow it's better to keep article as unread unless I do it manually.