-
Notifications
You must be signed in to change notification settings - Fork 190
Add feature to Group starred Items per Feed #3148
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Juri-w <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
Please take a look at the suggested changes and fix the linter errors that npm run lint
shows.
A changelog entry should also be added.
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see minor problems with the feature.
As I already mentioned, the feed counters are initially not correct and only show the starred items that have already been loaded. With a larger number of starred items, these counters are than counted up while you are going through these feeds.
For the existing routes, the counters are synchronised with the database and are therefore correct from the start, so I don't think this would actual possible for the starred feeds without changes to the backend.
Another problem is that the scroll position is currently not reset, when switching between starred feeds, which is due to the fact that it is not a real route and does not have its own fetchKey.
The open status also cannot be saved, because it is not a real folder.
I think we can live with the latter, I'm not sure whether it would be better to omit the counters, but the scroll reset would be necessary.
@Grotax @SMillerDev your opinions on this?
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
The number of starred items is loaded as soon as the view opens; once retrieved, they’re grouped by the starred‑item collection from the store, so they display correctly immediately. Feed icons and names load afterward, which means the starred list initially appears without icons or titles until the Feeds data is fully loaded. I’ve also fixed the scroll‑reset issue. |
Bildschirmaufnahme_20250422_160104.webmThis clip demonstrates the problem. As you can see, there are a total of 142 starred articles, if you now open the starred feeds, you will see three feeds which, according to the counters, contain exactly 40 articles together. These are the 40 articles that are initially retrieved from the database by default, sorted by date. When you open the first feed and select the only article loaded, 40 more articles are requested from the database, again sorted by date regardless of the feed. Now older articles from the Arch Linux feed also appear. However, since this feed only has a lot of older articles, nothing happens here despite forced triggering of the scroll event using the mouse wheel, because the next batch of articles 81-120 does not contain any of these articles. I think this clearly shows the problem with this feature. A ‘filter’ feature can actually only work if you make specific requests to the database/backend. Pure filtering in the frontend is not possible. |
I agree with @wofferl. |
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
I have changed it now on the backend, the starredFeed Counter is retrieved with the feeds and the stared items are fetched with the feed id, which returns only the starred items for the selected feed. Btw. Thank you for constructive the feedback. I clearly hadn't tested it in the full extend before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual not working:
- Starred feed routes don't fetch more items (see comment src/store/item.ts)
- Starred feed counter don't update on change.
- In some cases not all items are shown after reload app or press 'r' to refresh
So take al look at the suggestions and as I suggested I would prefer using the existing starred route to decrease complexity.
You also will take a closer look at the unit tests (frontend: make js-test
, backend: make unit-test
), it is always good idea to check changes with make test
and npm run lint
Keep in mind that the api is also used by other clients.
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
I've added the counter and the fetching works according to my tests properly as well. I couldn't recreate the problem with the refresh with 'r', but it could be that I solved it during solving the other problems. |
Signed-off-by: Juri <[email protected]>
Signed-off-by: Juri-w <[email protected]>
Signed-off-by: Juri-w <[email protected]>
You need the test folder from the nextcloud/server repository which contains the bootstrap.php. Now you have set :exact="true" you don't need the extra starredfeed route and all the checks when to use starred and when to use starredfeed. I have attached a patch how I would implement this, to have a consistent feedKey for starred through the app. Also the header in the item list for starred feeds don't show the feed name and the counter is not in sync. You should then also consider squashing the commits, so that we have a clean commit history. |
Summary
Add Ability to Group Starred Items per Feed. Grouped Feeds are visible under the collapse of starred items. Per Grouped Feed a count of Starred Items is listed.
Checklist