Bug 488267 - BusyIndicator on ApplicationsListPage is screwed up during the first search
Summary: BusyIndicator on ApplicationsListPage is screwed up during the first search
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 6.0.5
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 488198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-09 20:40 UTC by ratijas
Modified: 2024-06-21 15:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2024-06-09 20:40:15 UTC
SUMMARY

On the ApplicationsListPage (which is responsible for most lists of applications, such as "All Applications", application categories, Search page etc.) there is a loading / busy indicator with a label "Still looking…" implemented as a footer of a ListView.

It has a number of problems with sizing and visibility. It is declaratively bound to become visible on ListView::atYEnd, which might create a layout / binding loop since toggling a ListView footer might change scroll position and subsequently affect the atYEnd state. 

In any case,
- fetching more items is not a declarative state bound to scrolling;
- ListView would reserve height regardless of visibility, which means zero-height tricks are necessary;
- if there are not enough items (or no items at all) in the ListView, footer positioning won't be at the bottom of the page.

How do we even want this to work?

SOFTWARE/OS VERSIONS
Arch Linux, latest git packages of KDE/Plasma and Frameworks
Qt Version: 6.7.1

ADDITIONAL INFORMATION

Existing attempt to fix it: https://invent.kde.org/plasma/discover/-/merge_requests/862 (insufficient / wrong for the reasons described in the comments).
Comment 1 Nate Graham 2024-06-10 18:18:24 UTC
In principle I think we want it to work like this:
- When the page content is empty, center the indicator both vertically and horizontally on the page
- When the page content has stuff and the user scrolls down to the bottom and it needs to load mode, center the indicator horizontally right under the empty space below the final item
Comment 2 Nate Graham 2024-06-10 19:14:24 UTC
*** Bug 488198 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2024-06-14 00:29:07 UTC
Likely related to Bug 488199.
Comment 4 Bug Janitor Service 2024-06-17 09:19:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/867
Comment 5 Akseli Lahtinen 2024-06-21 14:44:52 UTC
Git commit 8a60b0a63ba7bf20fd88955392f567071e3e06e7 by Akseli Lahtinen.
Committed on 21/06/2024 at 14:41.
Pushed by akselmo into branch 'master'.

ApplicationsListPage: move busyIndicator inside container, center it

Currently the busyIndicator looks a bit weird when loading items, and
it's not centered.

This centers it and moves it to footer if there are applications loaded.

M  +23   -21   discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/8a60b0a63ba7bf20fd88955392f567071e3e06e7
Comment 6 Akseli Lahtinen 2024-06-21 15:02:41 UTC
Git commit ab4e6629877e18420795213abebae3eabf9d9284 by Akseli Lahtinen.
Committed on 21/06/2024 at 14:58.
Pushed by akselmo into branch 'Plasma/6.1'.

ApplicationsListPage: move busyIndicator inside container, center it

Currently the busyIndicator looks a bit weird when loading items, and
it's not centered.

This centers it and moves it to footer if there are applications loaded.

Use anchors to position the animation instead of footer

Use listView footerItem

M  +29   -21   discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/-/commit/ab4e6629877e18420795213abebae3eabf9d9284