Bug 423884 - Type-ahead in details view mode should scroll the current result to the center of the list
Summary: Type-ahead in details view mode should scroll the current result to the cente...
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 20.04.2
Platform: Debian testing Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Depends on:
Reported: 2020-07-04 20:50 UTC by jbn
Modified: 2023-10-25 22:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.02


Note You need to log in before you can comment on or make changes to this bug.
Description jbn 2020-07-04 20:50:44 UTC
When using type-ahead to search for a filesystem object in Dolphin in details view mode, the found object is selected and shown at the bottom of the list. Instead I think Dolphin should put the found object in the middle of the list whenever possible.

1. Enter a folder with a lot of files or folders in it (well over 200) and set the Dolphin window to use details mode and make the Dolphin window tall enough to use but not show more than, say, 20 of the items in the folder.
2. Type characters quickly enough to make Dolphin locate an item midway down the list. The item you match should have lots of items below it so the scrollbar is not hitting the bottom of the scrollable range.
3. Dolphin scrolls the view down to show that it has selected the first match for whatever you typed.

This, now selected, item is positioned at the bottom of the visible portion of the list.

This, now selected, item should be positioned at the middle of the visible portion of the list because it is possible to do so and shows the user some items on either side of the selected item.

Operating System: Debian GNU/Linux 
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.7.0-1-amd64
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8150 Eight-Core Processor
Memory: 31.3 GiB of RAM

I think the selection should be in the middle because:
1. I find it easier to notice what is selected when that item is in the middle of the list (whenever possible, obviously selecting something on the last page of the list will render this impossible to do).
2. I might want to select a directory and uncollapse that directory. It would be nicer to give me room to see what's in the directory while (again, to the extent possible) show me the directory too.
Comment 1 Bug Janitor Service 2023-10-14 02:46:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/627
Comment 2 Méven Car 2023-10-17 15:53:18 UTC
Git commit a59d9f85fa770a00d10e66025e102c736e18fa70 by Méven Car, on behalf of Amol Godbole.
Committed on 17/10/2023 at 17:47.
Pushed by meven into branch 'master'.

KItemListView: add view position in scrollToItem()

An item, on being scrolled to, is always located at the nearest edge of
the view. This is not always convenient. Allow specifying where the item
should be positioned with respect to the view in scrollToItem().

M  +1    -1    src/kitemviews/kitemlistcontroller.cpp
M  +48   -12   src/kitemviews/kitemlistview.cpp
M  +6    -2    src/kitemviews/kitemlistview.h
M  +1    -1    src/views/dolphinview.cpp