Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Stories in FeedReader #1171

Merged
merged 2 commits into from
Jan 14, 2022
Merged

Tag Stories in FeedReader #1171

merged 2 commits into from
Jan 14, 2022

Conversation

igbanam
Copy link
Contributor

@igbanam igbanam commented Jan 13, 2022

With the FeedReader, it's possible to have multiple feeds. With multiple feeds, all stories are jumbled up in the same list. One cannot know the source of a story at first glance. The way this possible is the to use the t keyboard shortcut which cycles the showType through title, link, and content. It is better UX to have some tag showing the origin of a story.

This change introduces a tag on the story title. This tag is the same as the Feed.Title. This change is backward compatible. If a feed does not come with a title, this change yields itself to the previous implementation.

To test this, run tool with make run. Feeds which have titles in their schemas should show up with their titles in square brackets. Examples of such feeds I have in my config are Hacker News, Ruby Weekly, and avdi.codes

Fixes #1138

With the FeedReader, it's possible to have multiple feeds. With multiple feeds, all stories are jumbled up in the same
list. One cannot know the source of a story at first glance. The way this possible is the to use the `t` keyboard
shortcut which cycles the showType through title, link, and content. It is better UX to have some tag showing the origin
of a story.

This change introduces a tag on the story title. This tag is the same as the Feed.Title. This change is backward
compatible. If a feed does not come with a title, this change yields itself to the previous implementation.

Fixes wtfutil#1138
@igbanam
Copy link
Contributor Author

igbanam commented Jan 13, 2022

Before…

Screenshot 2022-01-13 at 18 13 19

After…

Screenshot 2022-01-13 at 18 03 27

@senorprogrammer
Copy link
Collaborator

I think your linter issues can be resolved by running gofmt on the /feedreader/* files.

❯ golangci-lint run gives this output:

File is not gofmt-ed with -s (gofmt)

@senorprogrammer
Copy link
Collaborator

This looks good to me. If you like, I can fix that linting issue and merge it in, or you can fix it. Let me know either way.

@senorprogrammer senorprogrammer merged commit 09f9820 into wtfutil:master Jan 14, 2022
@igbanam igbanam deleted the tag-feeds branch January 15, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Module feature (Feed Reader): Add a label to display, and perhaps also group by it
2 participants