Newsflash 3.2

Another small feature update just in time for gnome 46.

Subscribe via CLI

Lets start with something that already went into version 3.1.4: you can subscribe to feeds via CLI now. The idea is that this is a building block for seamlessly subscribing to websites from within a browser or something similar. Lets see how this develops further.

Scrap all new Articles of a Feed

If Gitlab upvotes is a valid metric, this feature was the most requested one so far. Feed settings gained a new toggle to scrap the content of new articles. The sync will complete normally and in a second operation Newsflash tries to download the full content of all new articles in the background.

This is especially useful when there is no permanent internet connection. Now you can let Newsflash sync & download content while on WiFi and read the complete articles later even without an internet connection.

Update Feed URL

The local RSS backend gained the ability to update the URL where the feed is located (see the screenshot above). Sadly none of the other services support this via their APIs as far as I know.

Clean Database

The preferences dialog gained the ability to drop all old article and “vacuum” the database right away. Depending on the size of the database file this can take a few seconds, that’s why it is not done in the background during normal operations yet.

(btw: I’m not sure if I should keep the button as “destructive-action”)

Internal Refactoring

Just a heads up that a lot of code managing the loading of the article list and keeping track of the displayed article and its state was refactored. If there are any regressions, please let me know.

Profiling

Christian Hergerts constant stream of profiling blog posts finally got to me. So I fired up sysprof. Fully expecting to not be knowledgeable enough to draw any meaningful conclusions from the data. After all, the app is pretty snappy on my machine ™, so any improvements must be hard to find and even harder to solve. But much to my surprise about 30 minutes later two absolutely noticeable low hanging fruit performance problems were discovered and fixed.

So I encourage everyone to just try profiling your code. You may be surprised what you find.

Adwaita Dialogs & Removing Configurable Shortcuts

Of course this release makes use of the new Adwaita Dialogs. For all the dialogs but one:

Configuring custom keybindings still spawns a new modal window. Multiple overlapping dialogs isn’t the greatest thing in the world. This and another annoying issue made me think about removing the feature from Newsflash completely.

The problem is that all shortcuts need to be disabled whenever the user is about to enter text. Otherwise the keybindings with a single letter cannot be entered as text.

All major feed readers (feedly, innoreader, etc) have a fixed set of cohesive keyboard shortcuts. I’ve been thinking about either having 2-3 shortcut configurations to choose from or just hard-coding keybindings all together.

I’d like to hear your thoughts. Do you use custom shortcuts? Would you be fine with a well thought out but hard-coded set of shortcuts? Would you prefer to choose from a few pre-defined shorcut configurations? Let me know, and help me find the best keybindings for all the actions that can be triggered via keyboard.

Newsflash 3.1

(yes, you read that right: the ‘f’ is not capitalized anymore)

This release doesn’t introduce groundbreaking new functionality. But there are quite a few quality of life improvements worth checking out.

Marking all articles as read is now more predictable and can be undone. It takes into account if the article list is filtered by a search term or viewing only starred articles. Only those will get marked as read. If you still accidentally mark more articles as read than intended there is a grace period that allows you to undo your action.

Subscribing to a new feed used to add it to the sidebar. But no articles were fetched until the next sync. No longer: Newsflash will now fetch articles of that particular feed right after it was added.

Speaking of fetching articles for feeds: if a feed fails to download or parse for some reason it will now display an icon in the sidebar. This works for local RSS and all services that propagate their errors via their API.

My personal highlight in this release is the miniflux implementation supporting enclosures. This means more thumbnails and attachments for users if they run a recent version of miniflux (>= 2.0.49).

Other than that a few more smaller changes and bug fixes can be found in Newsflash 3.1

Get it on flathub

NewsFlash 3.0

The next version of NewsFlash is ready. And it comes packed with so much new features and speed improvements + a new look, that the jump to version 3 is more than justified.

Visual comparison to version 2.3

The most obvious difference is the use of the libadwaita 1.4 split views and toolbar views. The result are 3 columns slightly different in color. Each with boarder-less headerbars.

An awesome perk of using these widgets is nicer sizing behavior of the sidebar and the article list. With NewsFlash 2.3 these two columns stayed the exact same size at all times. All extra space was given to the article. Now additional space is distributed evenly

old fullscreen layout
new fullscreen layout

The article list features the new listview sections added in Gtk 4.12. Articles are grouped by day and the corresponding date is displayed as the section header.

Drag & Drop is back

And better than ever before.

The feature didn’t survive the transition from Gtk3 to Gtk4. Back in the NewsFlash 1.x.x days drag & drop was only usable to move a feed from one category to another. The position of elements in the sidebar would seemingly change at random after the drop happened.

A lot of work went into improving the experience of drag & drop. NewsFlash doesn’t try to keep the positions of items in sync with the backed service. But instead focuses on keeping things consistent locally. Items now move to the exact spot they were dragged to.

Subscribing to feeds works better on mobile

Clicking the plus icon used to spawn a popover that guided you through the process of adding either feeds, categories or tags.

Unfortunately this didn’t really work on mobile. Interacting with the on-screen-keyboard would close the popover making it impossible to complete the process.

So instead the popover now lets you spawn one of 3 dialogs.

Not only does this change make it possible to add feeds on mobile & other touch devices. But I would argue it is an improvement for desktop as well. No longer can the popover accidentally be closed by switching to another window.

The wizard guiding you through the process also got a facelift.

Speed

NewsFlash 3.0 should be a lot faster.

I went all-in on the tokio runtime and its ecosystem. No more spawning threads manually for a single operation. No more blocking locks. Everything is async and runs on a single tokio runtime which is way smarter about task managing than I ever could be.

At the same time the reqwest client is now reused as much as possible and only rebuild once relevant settings change.

Together these changes mean operations like syncing, marking articles as read and scraping full article content should feel more responsive.

The favicon cache is now based on moka which eliminates the case of starting multiple downloads of the same icon at the same time. Large favicons get scaled down to a reasonable size to improve loading times.

Remember the window state

One of the more often requested features: remember the window state when NewsFlash quits and restore everything on the next launch.

This can mean different things to different people: Some want the app to remember the window size, others if it displays all or only unread articles.

Here is a list of the things that are saved and restored:

  • window size (and maximized)
  • sidebar selection
  • article list mode (all, unread, starred)
  • search term
  • selected article
  • if original or scraped content is shown
  • article view zoom

Other things like exact scroll positions of lists are not saved.

View large images

Large images in the article can be clicked and open the image up in a new window. No fancy gestures or anything. But still a welcome feature.

The same dialog is used to display image attachments of articles.

More Thumbnails

Articles get more visual appealing with NewsFlash 3.0!

Thumbnails were supported before. But only if the article had an image attachment. And then only if the back-end supported attachments via their API (e.g. miniflux did not).

Going forward there is a heuristic to gather a “relevant” image from the article HTML and used that as a thumbnail.

Edit dialogs

The simple “rename” dialogs of old evolved into “edit” dialogs. The biggest change is the dialog for feeds. The feed can still be renamed, the feed URL is at least visible now (changing is not possible just yet) and it can be moved to another category from here as well (alternative to drag & drop).

Some math focused blogs use “$” as start and end marker for formulas. Always rendering text between “$” with mathjax lead to malformed articles that contained multiple dollar signs in their regular text. This can now be controlled on a feed-by-feed basis.

An idea for the future is to allow a feed-by-feed setting if an attempt to download the full article content right after a sync should be made.

Commafeed

Commafeed  is the newest addition to the list of supported services. Its an open source web based feed reader.

The implementation is not as battle tested as the others. So if you hit a roadblock with it please let me know.

More

Above only the more significant features and changes were listed. There are a lot of smaller features and bug fixes. So if you previously had trouble with anything it may be worth to try NewsFlash again.

Features that did not make it: Video player

You can not view video attachments or youtube videos in a new embedded player. Video streaming is hard. GStreamer does a lot of the work for you. But there are still a lot of gaps that an application has to fill to make a nice streaming player.

I was encountering image freezes, stuck videos and outright gstreamer crashes from time to time. Not to mention missing features like switching video streams on the fly, which I left out since it added even more problems to the table.

So its back to the drawing board. But here is how it could have landed in NewsFlash 3.0:

NewsFlash

tl;dr: NewsFlash is a complete rewrite of the FeedReader application in rust.

The idea of a larger overhaul of the code base was already formed quite some time ago as this Wiki page documents. Around the same time I started to look into rust. As a first learning exercise I ported the integrated content grabber of FeedReader to rust as a separate crate. With the first crate turning out half decent I started the mammoth task of rewriting all of FeedReader.

Obligatory Screenshot Comparison

As you can see the visual differences are minimal. I would argue however that NewsFlash does have some nice minor visual
and functional improvements over FeedReader.

So what IS actually different about the rewrite compared to the old vala application?

A Different Project Structure

API Crates

The supported feed services were realized as plugins in FeedReader.

This turned out to be a bad move since every new service would be developed in the main repository anyway. There was no reason to not have all of the plugins installed. But problems with plugins not loading at runtime for whatever were plenty.

So for NewsFlash I’m making use of the excellent crate system that rust provides to develop a generic as possible implementation of a service API
in a separate repository. But then have the integration into NewsFlash’s abstraction layer in the main repository. The idea here is that the API crates will be useful to other people as well.

So far there are:

Application Base Crate

Similarly NewsFlash itself is split up in 2 parts:

A base application crate called news_flash that contains all the syncing functionality, database code and other utilities. This crate is neither relying on gnome technology (libxml2 doesn’t count) nor is there platform specific code. It relies on pure rust crates where ever possible.

On top of the base crate sits news_flash_gtk which is one of hopefully many graphical user interfaces that make use of the `news_flash` code base. Maybe we will see a Qt GUI, a windows or mac application or maybe even another Gtk GUI with a different interaction concept.

In the end this should result in more contributors to a modern core for RSS clients and especially better tested and maintained feed service integrations for everyone.

A Clear Vision From the Start

NewsFlash will be an opinionated project right from the start. With FeedReader I gave in to too many feature requests and added too many settings and dconf tweaks over time. This made maintaining and testing a lot harder than necessary.

Bugs often happened only with a certain combination of settings. Every user feels his combination of settings are the only reasonable way to use the application. They therefore forget to mention anything about the non-default settings in their reports. There were more than one revelations in trying to reproduce a bug that went like “Ah, you’re using these two settings. Now I can reproduce the bug no problem”.

So this time around I want to be way more strict about accepting new features and configuration knobs.

I myself am also guilty of overcomplicating some behaviors in the FeedReader GUI for the sake of appearing automatic and cool, while in reality often leading to more problems than making things easier. A prominent example would be the behavior of the unread list in FeedReader that automatically removes read articles upon deselection. It made the code more complex, caused bugs and even caused unexpected user interactions for some.

With NewsFlash I want to be more straight foreward with these things.

A Few New Features

Despite the focus on a leaner application a few improvements and features already snuck into the code base.

Search the feedly Cloud for New Feeds

Discovering new content with RSS is not as simple as with big social media sites that most people use to get their news. Interesting feeds are all over the world wide web. Finding new feeds you want to subscribe to mostly happens by accident.

NewsFlash makes use of the large database of feedly to lessen the pain.

New Add Dialog

It’s now easier than ever to manually add a new feed. Just type the website and NewsFlash automatically looks for all feeds available. No longer you have to type or paste the exact RSS/Atom URL, although that still works just fine.

Adaptive User Interface

Of course NewsFlash also makes use of libhandy to shrink the UI down as much as possible. This hasn’t been tested on a phone so far. And I expect that some work is still needed until it’s completely usable on a phone. But even on a traditional desktop it is a “nice-to-have” feature. Just shrink the window down and get it out of the way.

Dark Mode

Until there are desktop wide dark preference settings you can switch to a dark variant of the Gtk theme in NewsFlash.

Edit Keybindings

No need to open up d-conf and edit strings to change the default keybindings any more.

Misc

  • OPML export
  • configurable proxy
  • download full content for specific articles on demand
  • Export articles as html with embedded images
  • better error handling and communicating them to the user
  • manual but also more reliable offline mode

Looking for Service Maintainers

I’m ending this post with the announcement that I am looking for people that are actively using a specific service backend of NewsFlash or want to add a completely new one and are willing to maintain it.

The size of the code for each service is quite manageable. But keeping an eye on and testing every service can be challenging.
So this time around I’m hoping to find at least one person per service that knows the basics of rust and uses the service on a (almost) daily basis.

Services & Maintainers:

FeedReader Is Dead

Now that I got your attention, let me explain what I mean by that.

FeedReader is hopefully still a useful application to many people. And it won’t go away thanks to the awesome technology called flatpak.

State of the project

But, FeedReader hasn’t gotten much love from me or fellow former contributors in quite some time. Bug reports have only been responded to sporadically.
Merge requests have not been reviewed as quickly as you would expect. And new releases have been sparse.

I am thankful for all the people who helped maintain this project and sent in pull requests over the last few years.
I am thankful for all the things I learned and all the people who were patient with me and took the time to teach me a new trick or two.
I am even thankful for most of the bug reports, feature ideas and design improvements I received.
Although I have to admit that this was easily the most stressful part of maintaining a whole project, as I often got overwhelmed and was a bit defensive when facing too many requests at once.
But looking back, most of the community was respectful, supportive and helpful.

So thank you for the awesome ride!

What comes next?

A complete rewrite and re-imagination of the FeedReader project that has been in the works for about 2 years now.