Bug 431568 - GridView scrolls up when I open/close a "Get hot new <thing>" window
Summary: GridView scrolls up when I open/close a "Get hot new <thing>" window
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
Depends on:
Reported: 2021-01-13 21:46 UTC by Patrick Silva
Modified: 2021-04-09 06:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.80

screen recording (2.03 MB, video/webm)
2021-01-13 21:46 UTC, Patrick Silva

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-01-13 21:46:01 UTC
Created attachment 134821 [details]
screen recording

Watch the attached screenshot recording please.
GridView scrolls up when I open "Get new wallpapers" or "Get new color schemes" windows and when I close "Get new window decorations" window.

GridView should not scroll when we open/close a "Get hot new <thing" window.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Comment 1 Dan Leinir Turthra Jensen 2021-01-14 09:16:31 UTC
This is an artefact of how the KCM is implemented (they reload everything rather than change the model in-place). Basically this is a bug in each of the KCMs, not in KNewStuff... which also means i'm not entirely sure where to point this, because this is all in widely different products...
Comment 2 Nate Graham 2021-01-14 22:39:21 UTC
Well that's weird. Can confirm.
Comment 3 Dan Leinir Turthra Jensen 2021-01-15 10:23:06 UTC
(In reply to Nate Graham from comment #2)
> Well that's weird. Can confirm.

Not really weird - i explained above why it happens (and also why it, somewhat annoyingly, is both not a knewstuff bug, and also not at all easy to reassign, because it'd have to be assigned to a whole pile of products which all have the problem, because they all just reload their data when the kns dialog is closed rather than changing the model in-place)
Comment 4 Nate Graham 2021-01-15 17:20:46 UTC
So every implementation will need to be changed?
Comment 5 Dan Leinir Turthra Jensen 2021-01-15 17:31:28 UTC
i'm afraid so... Basically, KNS sends out entry changed notifications for each changed entry, but the way most of these places handles that is to just reload their entire model, rather than identify what changed and only change that item in their model... Because, i guess, it's just easier and nobody posted a bug like this before ;)
Comment 6 Nate Graham 2021-01-15 19:56:16 UTC
Could you follow up on that and submit MRs to fix them?
Comment 7 Dan Leinir Turthra Jensen 2021-01-26 14:30:20 UTC
(In reply to Nate Graham from comment #6)
> Could you follow up on that and submit MRs to fix them?

Hmm... This feels like something which might just be a good JJ type opportunity... There's a bunch of places it needs doing, but they're all self-contained, so... maybe a chance to grab some people who aren't super involved? :)
Comment 8 Bug Janitor Service 2021-02-25 13:44:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/105
Comment 9 Alexander Lohnau 2021-02-25 15:29:50 UTC
Git commit 1ae7749e7fdb4c981436ae7d142700ac93ef3238 by Alexander Lohnau.
Committed on 25/02/2021 at 15:14.
Pushed by alex into branch 'master'.

qtquickengine: Do not emit entriesChanged signal when we clear an empty list

This is called whenever we open the dialog, but we do not want to emit the signal unless
we actually clear this list. Otherwise the KCMs would reload their data and scroll back to the top.

Also we do not want the changed signal to be emitted for intermediate states,
this will only lead to noise on the KCM side and we still emit the signal when we
have the entry updated/installed.
FIXED-IN: 5.80

If we never want to scroll to the top we have to implement this on the
side of the individual KCMs.

M  +10   -2    src/qtquick/quickengine.cpp

Comment 10 Alexander Lohnau 2021-04-09 06:16:59 UTC
Git commit 6359240eace78eb593968421829fbdea4148a6a4 by Alexander Lohnau.
Committed on 09/04/2021 at 06:16.
Pushed by alex into branch 'master'.

ksplash kcm: Only update necessary parts on KNewStuff events

M  +1    -0    kcms/ksplash/CMakeLists.txt
M  +38   -14   kcms/ksplash/kcm.cpp
M  +5    -3    kcms/ksplash/kcm.h
M  +7    -2    kcms/ksplash/package/contents/ui/main.qml