What
Mark article as read automatically after X seconds after entering it.
Delay would prevent marking as a read missclicked article.
This could have a flag in settings page to turn on/off as some users might don't want this feature. Further more there could be an option to set after how much seconds article is considered read.
Why
It would make experience smoother.
(Optional) How
It could be done fairly easy with onMount svelte lifecycle hook inside article component with setTimeout and AbortController for canceling request (pseudo code)
onMount(() => {
const controller = new AbortController()
const signal = controller.signal;
const timerID = setTimeout(() => markArticleAsRead(articleID, signal), 5000); // after 5 seconds
return () => { clearTimeout(timerID); controller.abort() };
});
What
Mark article as read automatically after X seconds after entering it.
Delay would prevent marking as a read missclicked article.
This could have a flag in settings page to turn on/off as some users might don't want this feature. Further more there could be an option to set after how much seconds article is considered read.
Why
It would make experience smoother.
(Optional) How
It could be done fairly easy with onMount svelte lifecycle hook inside article component with setTimeout and AbortController for canceling request (pseudo code)
onMount(() => { const controller = new AbortController() const signal = controller.signal; const timerID = setTimeout(() => markArticleAsRead(articleID, signal), 5000); // after 5 seconds return () => { clearTimeout(timerID); controller.abort() }; });