Bug 448800 - OverlaySheet to select a file is non-scrollable when very long
Summary: OverlaySheet to select a file is non-scrollable when very long
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.90.0
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
: 455397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-19 22:58 UTC by Nicolas Fella
Modified: 2023-02-26 12:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.104
Sentry Crash Report:


Attachments
screen recording (1000.59 KB, video/x-matroska)
2022-01-19 23:03 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2022-01-19 22:58:56 UTC
STEPS TO REPRODUCE
1. Open Window Decoration in systemsettings
2. Get new window decoration
3. Select e.g. "Active Accent"
4. Click Install

OBSERVED 
An overlaysheet "Pick Your Installation Options" appears. It has a vertical scrollbar but does not react to touchpad scrolling. Dragging the scrollbar kind of works, but also not really


EXPECTED RESULT
Scrolling works

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Comment 1 Nicolas Fella 2022-01-19 23:03:52 UTC
Created attachment 145655 [details]
screen recording
Comment 2 Nate Graham 2022-01-20 22:40:32 UTC
Yeah can confirm. Seems like an implementation issue in the dialog.
Comment 3 ratijas 2023-02-22 20:08:41 UTC
This does not look like an upstream Kirigami issue, as the equivalent OverlaySheets do scroll fine with long list of reviews in Discover.
Comment 4 ratijas 2023-02-22 20:19:14 UTC
Dragging the scrollbar was a separate issue, and has been fixed last year: https://invent.kde.org/frameworks/kirigami/-/merge_requests/738

Some observations:

Scrolling directly over the scrollbar works. It does not differentiate between discrete mouse and smoother touchpad input (at least on X11).

I suspect Kirigami WheelHandler just got attached to a wrong flickable here, so it kinda forward event to something invisible, and blocks them from propagating normally.
Comment 5 ratijas 2023-02-22 20:54:48 UTC
I think I found the cause.

OverlaySheet documentation clearly states:

>  It needs a single element declared inseide, do *not* override its contentItem

…and KNewStuff DownloadItemsSheet.qml happily does just that:

> Kirigami.OverlaySheet {
>     id: component
> 
>     //...
> 
>     contentItem: QtLayouts.ColumnLayout {
>         QtControls.ScrollView {
>             // ...

Second part of the problem is that docs suggest using either a ColumnLayout or a ListView as that single element. But not combining them one inside another, and especially a ListView wrapped in an extra ScrollView inside a ColumnLayout. Moving extra top items into a ListView's inline header, on the other hand, works great, and fully fixes this bug.
Comment 6 Bug Janitor Service 2023-02-22 21:06:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/229
Comment 7 Bug Janitor Service 2023-02-22 21:07:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/230
Comment 8 ratijas 2023-02-23 15:29:45 UTC
Git commit 853c603e1bfcd19c5ab8a21dcbec3821802a1faa by ivan tkachenko.
Committed on 22/02/2023 at 21:27.
Pushed by ratijas into branch 'master'.

DownloadItemsSheet: Fix scrolling

OverlaySheet documentation clearly states:

>  It needs a single element declared inside, do *not* override its contentItem

…and KNewStuff DownloadItemsSheet.qml happily does just that:

> Kirigami.OverlaySheet {
>     id: component
>
>     //...
>
>     contentItem: QtLayouts.ColumnLayout {
>         QtControls.ScrollView {
>             // ...

Second part of the problem is that the docs suggests using either a
ColumnLayout or a ListView as that single element. But not combining
them one inside another, and especially not a ListView wrapped in an
extra ScrollView inside a ColumnLayout. Moving extra top items into a
ListView's inline header, on the other hand, works great, and fully
fixes this scrolling issue.

Note: In order to backport to kf5 branch, replace `icon.name:` in
Kirigami.BasicListItem delegate with older `icon:` counterpart.
FIXED-IN: 5.104

M  +30   -39   src/qtquick/qml/DownloadItemsSheet.qml

https://invent.kde.org/frameworks/knewstuff/commit/853c603e1bfcd19c5ab8a21dcbec3821802a1faa
Comment 9 ratijas 2023-02-23 15:31:36 UTC
Git commit 81321e5251348b02cbf20c021ce5c4dbb069e99a by ivan tkachenko.
Committed on 22/02/2023 at 21:27.
Pushed by ratijas into branch 'kf5'.

DownloadItemsSheet: Fix scrolling

OverlaySheet documentation clearly states:

>  It needs a single element declared inside, do *not* override its contentItem

…and KNewStuff DownloadItemsSheet.qml happily does just that:

> Kirigami.OverlaySheet {
>     id: component
>
>     //...
>
>     contentItem: QtLayouts.ColumnLayout {
>         QtControls.ScrollView {
>             // ...

Second part of the problem is that the docs suggests using either a
ColumnLayout or a ListView as that single element. But not combining
them one inside another, and especially not a ListView wrapped in an
extra ScrollView inside a ColumnLayout. Moving extra top items into a
ListView's inline header, on the other hand, works great, and fully
fixes this scrolling issue.

Note: In order to backport to kf5 branch, replace `icon.name:` in
Kirigami.BasicListItem delegate with older `icon:` counterpart.
FIXED-IN: 5.104
(cherry picked from commit 853c603e1bfcd19c5ab8a21dcbec3821802a1faa)

M  +30   -39   src/qtquick/qml/DownloadItemsSheet.qml

https://invent.kde.org/frameworks/knewstuff/commit/81321e5251348b02cbf20c021ce5c4dbb069e99a
Comment 10 Patrick Silva 2023-02-26 12:28:45 UTC
*** Bug 455397 has been marked as a duplicate of this bug. ***