Andrew Dolgov
9735ff83cc
use RETURNING syntax when creating base filter record
2025-05-06 05:01:23 +03:00
Andrew Dolgov
2d041f7d28
use server-side localized formatting for matching rule to display as a tooltip (for now)
2025-03-30 20:41:50 +03:00
Andrew Dolgov
b4962b670d
stop sending matched content twice for the tooltip, use smaller objects containing only regular expression and rule type
2025-03-30 20:21:06 +03:00
wn_
10c488e1d0
Strip '[\r\n\t]' from entry content during filter test.
...
This is to help get the content and regex match strings a bit closer.
2025-03-29 10:36:08 +00:00
Andrew Dolgov
043162b0eb
enforce maximum length on resulting rule regexp match, highlight based on strings with stripped tags
2025-03-28 18:36:11 +03:00
Andrew Dolgov
42ea2ebec0
* fix filter test not returning anything for filters set for specific
...
feed ID
* show content preview after first matched rule, not article beginning
* show meaningful preview for filters matching on article link, tags,
and author
2025-03-28 16:51:15 +03:00
Andrew Dolgov
8986a3e7ee
add limited highlighting of filter test results based on matched rules
2025-03-28 07:59:46 +03:00
Andrew Dolgov
49766ab01f
filter test dialog improvements:
...
- properly return results for filter rules matching specific feeds or
categories
- fix test results never returned for Uncategorized
- show tooltip with specific word match and matched rule on resulting
item hover
2025-03-27 22:22:34 +03:00
wn_
777c2b4c97
Move filter test results HTML building to the frontend.
2025-02-15 20:39:35 +00:00
wn_
e0d9ffcbc1
Only continue filter testing when there are likely more entries to check.
...
Prior to this, a filter test could needlessly result in up to 100 backend requests (limit 100, max_offset 10000) when the filter's associated feeds+categories have fewer than 10000 entries.
2025-02-15 16:51:25 +00:00
wn_
a34927d184
Clean up 'Pref_Filters::testFilterDo()'.
...
Use ORM, drop the '5 rule' limit, etc.
2025-02-08 16:53:12 +00:00
wn_
5a93056c1c
Fix setting a custom title when cloning a single filter.
2025-01-06 16:04:27 +00:00
wn_
e546e73914
Use 'clone' wording for filter duplication.
2025-01-06 15:49:40 +00:00
wn_
2eb3c150c2
Fix a return type warning in 'Pref_Filters'.
...
'Pref_Filters#get_details()' gets passed the ID of an existing filter, so we don't need to handle some edge case of it not existing.
2025-01-06 14:30:57 +00:00
wn_
0da9ef81bd
Prompt for the new filter name when only copying one.
...
This also reworks 'Pref_Filters' a bit so it's easier to retrieve filter titles.
2025-01-06 14:17:38 +00:00
wn_
91496a0d24
Add the ability to copy an existing filter.
2025-01-06 00:33:18 +00:00
Andrew Dolgov
e990a3c00f
Merge branch 'feature/php-misc' into 'master'
...
More native typing, use some new PHP stuff
See merge request tt-rss/tt-rss!88
2024-12-16 06:29:28 +00:00
wn_
f9b2291c28
Don't bother passing unused arguments to 'TimeHelper::make_local_datetime()'.
...
There's no point in passing '$long' unless '$no_smart_dt' is set to 'true'.
2024-12-15 18:39:03 +00:00
wn_
a1bd6cea1b
Use native typing in more places and clean up 'FeedEnclosure' a bit.
2024-12-14 12:26:59 +00:00
wn_
667528d5b9
Use PHP 8 'str_' functions.
...
A few more characters in some places, but helps with readability.
2024-11-24 13:59:29 +00:00
Andrew Dolgov
aad69b7ca6
make filter search properly case-insensitive
2024-11-24 09:24:20 +03:00
Andrew Dolgov
1ce1aee40f
simplify resulting tree root object
2024-11-23 18:15:18 +03:00
Andrew Dolgov
6bc9097b0f
getfiltertree: switch to ORM and simplify code
2024-11-23 18:13:09 +03:00
Andrew Dolgov
d4636716fb
collapse actions summary list in filter tree if 'toggle rule display' is disabled, remove label-specific icon display, simplify markup
2024-11-23 17:43:20 +03:00
Andrew Dolgov
4dc0e8cd29
fix text-muted being set to default text foreground color in light mode, adjust styling of filter actions list
2024-11-23 17:08:33 +03:00
Andrew Dolgov
417065b8f5
show cumulative score adjustment (if any) and up to 3 actions total in filter tree
2024-11-23 16:54:22 +03:00
Andrew Dolgov
7be6484fee
use select_many() without _expr
2024-11-23 15:49:50 +03:00
Andrew Dolgov
1fc19d6e50
adjust indent
2024-11-23 11:54:44 +03:00
Andrew Dolgov
64d9a77fde
switch filters _get_rules_list() to ORM
2024-11-23 11:54:24 +03:00
Andrew Dolgov
c23b76eb72
pass resulting action description through gettext
2024-11-23 11:21:18 +03:00
Andrew Dolgov
ce5a96cb30
set type hint for $action_descriptions
2024-11-23 11:14:39 +03:00
Andrew Dolgov
bbc28e626a
fix _get_name failing on filters without any rules because of wrong type of JOIN
2024-11-23 11:11:19 +03:00
Andrew Dolgov
31ca090c63
get filter action descriptions on pref_filters class init instead of doing it all the time, use ORM in _get_action_name
2024-11-23 11:07:50 +03:00
Andrew Dolgov
987936f57a
pref_filters - refactor _get_name to use ORM, show cumulative score in tree filter description
2024-11-23 10:26:12 +03:00
wn_
154abc61a0
Eliminate use of deprecated 'get_pref()' and 'set_pref()'.
2024-11-18 21:59:45 +00:00
wn_
dca2ae60a1
Remove some PHPStan ignores and make others rule-specific.
2024-11-12 03:38:45 +00:00
wn_
a784305cc7
Address PHPStan findings as of 2.0.1
2024-11-12 03:15:53 +00:00
wn_
9743f0efcd
Support doing a prefs page search via Enter.
2024-03-23 15:19:58 +00:00
Andrew Dolgov
865ecc8796
move to psr-4 autoloader
2023-10-25 12:55:09 +03:00