Bug 391191 - Number of reviews differs between Discover and store.kde.org
Summary: Number of reviews differs between Discover and store.kde.org
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: KNewStuff Backend (show other bugs)
Version: unspecified
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 23:29 UTC by Nate Graham
Modified: 2019-12-11 15:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.0


Attachments
Comparison between Discover and store.kde.org: different number of reviews (711.12 KB, image/png)
2018-02-27 23:29 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-02-27 23:29:47 UTC
Created attachment 111073 [details]
Comparison between Discover and store.kde.org: different number of reviews

See attached screenshot. store.kde.org always seems to display a few extra reviews compared to Discover.
Comment 1 Aleix Pol 2018-04-10 11:22:22 UTC
For future reference, the resource discussed here is:
kns://plasmoids.knsrc/api.kde-look.org/1169537

https://store.kde.org/p/1169537
Comment 2 Aleix Pol 2018-04-10 11:23:10 UTC
I'm not sure what's going on here, because on the web UI I don't really see the comments we see in Discover either. :S
Comment 3 Dan Leinir Turthra Jensen 2019-12-11 15:35:19 UTC
Git commit a4b6d2d5c25e3b9faf6b6bd24edd503302175510 by Dan Leinir Turthra Jensen.
Committed on 11/12/2019 at 15:35.
Pushed by leinir into branch 'master'.

Add support for sub-comments to the Reviews backend

Summary:
Using a similar style to the comments delegate in KNewStuffQuick, this
adds the functionality for having subcomments in the Reviews model.
The end result is that we no longer have incorrect numbers showing in
Discover, as it now shows all the items returned by the server.

* Adds a role for the depth of reviews (used for comments on reviews)
* Adds sub-comments (and set their depth) in the KNS backend's reviews
* Adapts the ReviewDelegate to have indentation marks (styled like KNSQuick)
FIXED-IN: 5.17.0

Test Plan:
Without the patch, incorrect numbers of reviews are shown (as no children are shown). With this patch, children are shown (using the same indentation style as used by KNewStuffQuick):
{F7812653}

Reviewers: #discover_software_store, #plasma, apol, ngraham

Reviewed By: #discover_software_store, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25886

M  +62   -42   discover/qml/ReviewDelegate.qml
M  +3    -0    libdiscover/ReviewsBackend/ReviewsModel.cpp
M  +2    -1    libdiscover/ReviewsBackend/ReviewsModel.h
M  +15   -7    libdiscover/backends/KNSBackend/KNSReviews.cpp

https://commits.kde.org/discover/a4b6d2d5c25e3b9faf6b6bd24edd503302175510