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

[feature request] filter preview #266

Closed
manprost opened this issue Aug 10, 2020 · 13 comments
Closed

[feature request] filter preview #266

manprost opened this issue Aug 10, 2020 · 13 comments
Assignees
Labels
Component-Core Component-GUI Component-Message-Filters Status-Accepted I will eventually implement this. Status-Fixed Ticket is resolved. Type-Enhancement This is request for brand new feature.
Milestone

Comments

@manprost
Copy link

It would be great to have the ability to see which messages a particular filter is gonna catch right from the "Message filters" dialog. So pressing a button would apply the filter on the existing messages in the database and show the ones the filter would catch ("catch" meaning accept/reject).

So if I'm writing a simple filter as this one:

function filterMessage() {
if (msg.title.startsWith("XYZ")) {
msg.isRead = true;
msg.isImportant = true;
return 1;
}
else {
return 1;
}
}

I could easily debug it turning it into:

function filterMessage() {
if (msg.title.startsWith("XYZ")) {
msg.isRead = true;
msg.isImportant = true;
return 2;
}
else {
return 1;
}
}

and then pressing the "Test rejected" button, it would go to my selected feeds and then it would show me the messages it has found that would be rejected. "Test accepted" would do something similar. For performance reasons, the buttons could only show the first 10, 20, 50... messages in the database that match the condition.

This may be related to #261.

Thank you very much.

@martinrotter
Copy link
Owner

I am thinking, @mpr0st, about adding read-only list of messages directly to "Message filters" dialog, and the testing would work like this.

  1. User selects filter.
  2. User selects some feed from the checking feed tree, just selects it, does not have to check the checkbox.
  3. User hits "Preview" button (which will be implemented there).
  4. List of message will display somewhere on the right of the dialog (which will be resized to accomodate the list).
  5. You will see basic properties of each message (title, author, read, important, perhaps contents) and result code 1,2,....

What you think?

@martinrotter martinrotter self-assigned this Aug 28, 2020
@martinrotter martinrotter added Component-Core Component-GUI Component-Message-Filters Status-Accepted I will eventually implement this. Type-Enhancement This is request for brand new feature. labels Aug 28, 2020
@manprost
Copy link
Author

I think it would be great. Maybe you could add an option to only show messages with result code 1 or 2 and I think that would cover all the use cases. And maybe add the ability to select multiple feeds.

Thank you!

@martinrotter
Copy link
Owner

Working on this, will also fix other related tickets #278, #261.

martinrotter pushed a commit that referenced this issue Dec 10, 2020
@martinrotter
Copy link
Owner

@mpr0st OK, I implemented this, test with dev. build ac8fdf6 when it gets compiled https://github.com/martinrotter/rssguard/releases/tag/devbuild

@martinrotter martinrotter added the Status-Fixed Ticket is resolved. label Dec 10, 2020
@martinrotter
Copy link
Owner

Some usage: https://imgur.com/a/RbHtBqE

Message filter window now displays list of messages if you select account/category/feed and when you hit "Test" it also tests selected filter against that list of messages - green messages are accepted, red ignored and also if your filter tweaks message, then it should be visible in the list too, for example if you change title etc.

@pcause
Copy link

pcause commented Dec 10, 2020

nice and thanks

@martinrotter
Copy link
Owner

@pcause Can you test and let me know If i can close this ticket?

@pcause
Copy link

pcause commented Dec 11, 2020

will test tomorrow. saw you are using activities so is binary in the old place or somewhere new

@martinrotter
Copy link
Owner

@pcause Yes I dumped Bintray because their usage quotes for free tier are way too low for rssguard. Now all binaries are hosted on github and there is special periodically updated repository for development builds where you will always find latest dev. build binaries. https://github.com/martinrotter/rssguard/releases/tag/devbuild

@manprost
Copy link
Author

Is build ac8fdf6 already up for testing? I see c440b7d as the latest dev build (dated 3 days ago)...

Thank you.

@martinrotter
Copy link
Owner

martinrotter commented Dec 11, 2020

I migrated all develompment building to Github Actions. All dev. builds are now compiled much faster than before.

https://github.com/martinrotter/rssguard/releases/tag/devbuild

Don't pay attention to the date of the release, pay attention to commit HASH shown in the files. Those files are compiled within 10 minutes from the moment I push the code, in other words, binaries listed in this "devbuild" release are now always the latest development build binaries and are safe for testing.

EDIT: When testing, only use "Test" button in filter message dialog, do not use "Process checked feeds" yet - this is unfinished implementation of #261.

@manprost
Copy link
Author

Wow, this is incredibly useful, great work, thank you very much.

I have an idea you could maybe consider, which is using a third color (blue?) for messages that have been modified by the filter (for example, marking them read). So if the message is accepted as is it will be marked green, if it's rejected as is it will be marked red but if any modification is made to the message, regardless of whether it's been accepted or ignored, it'll be marked blue (I'm assuming that if somebody is modifying a message it's because that message is gonna be accepted, so there won't usually be a 4th case/color to take into account (modification + rejection) and, if that's the case, you can leave that up to the filter author).

As an alternative, you could also consider marking in blue the particular attribute that has been modified by the filter, and use red/green for the rest, but this may be overkill:

image
Or:
image

Thank you.

@martinrotter
Copy link
Owner

@mpr0st Your suggestion sounds good, please create separate ticket for it. I will close this one, since the base feature is now completed. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component-Core Component-GUI Component-Message-Filters Status-Accepted I will eventually implement this. Status-Fixed Ticket is resolved. Type-Enhancement This is request for brand new feature.
Projects
None yet
Development

No branches or pull requests

3 participants