! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar's side pane tree has bad usability with keyboard (auto-expanding direc...
Status:
RESOLVED: FIXED

Comments

Description Olli Helin 2019-07-25 01:28:52 CEST
For the steps I describe, you have to have subdirectories in your home directory, and some of those subdirectories should also contain subdirectories.

When I was using Xubuntu 18.04 with Thunar 1.6.15, the tree view inside the side pane worked like this:
1. Focus a directory on the side pane tree view (say, my home directory).
2. Press the right arrow key to expand it.
3. I can go through its subdirectories (move the focus down along the tree) using the down arrow.
4. I press the right arrow key to expand the subdirectory I want to dive into.

*Steps to reproduce this bug:*

Now, after upgrading to Xubuntu 19.04 with Thunar 1.8.4, it works like this:
1. Focus a directory on the side pane tree view (my home directory).
2. Press the right arrow to expand it.
3. When I press the down arrow, it automatically expands the focused subdirectory (if it has subdirectories). To actually go down the tree view using the down arrow, I first have to close the just expanded subdirectory using the left arrow. Expected result is as above in steps 3-4.

This makes navigating directories really cumbersome, as I cannot just blindly use "down, left" either to actually go down: if a subdirectory focused with the down arrow key does not have subdirectories of its own, pressing left arrow key moves the focus back to the parent directory.

Note: I can go through the "root" items in the tree view using the down arrow without them expanding automatically. By root items I mean: my home directory, Trash, Network, volumes, File System etc.

I *suspect* (I'm not sure) this has something to do with the following commit and file:
    git log -p 85a79 -- thunar/thunar-tree-view.c

and searching for gtk_tree_view_expand_to_path there are lines such as these:

    -                {
    -                  /* just expand everything up to the row and its children */
    -                  gtk_tree_view_expand_to_path (GTK_TREE_VIEW (view), ancestor);
    -                }
    -              else if (!gtk_tree_view_row_expanded (GTK_TREE_VIEW (view), ancestor))
    -                {
    -                  /* just expand everything up to the row, but not the children */
    -                  parent = gtk_tree_path_copy (ancestor);
    -                  if (gtk_tree_path_up (parent))
    -                    gtk_tree_view_expand_to_path (GTK_TREE_VIEW (view), parent);
    -                  gtk_tree_path_free (parent);
    -                }
    
    +              gtk_tree_view_expand_to_path (GTK_TREE_VIEW (view), path);
    +              gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, NULL, FALSE);
    +              gtk_tree_path_free (path);

So the gtk_tree_view_expand_to_path seemed to receive a different second argument at some point.

If this is the intended functionality, this bug might just as well be a feature request: a checkbox for the side pane tree options - "automatically expand focused directories". I'll create one if this is not a bug.
Comment 1 alexxcons editbugs 2019-07-26 14:30:54 CEST
Thanks for reporting !

Yes, parts of the tree-view auto-open were changed, due to some other tree-vie bugs, this seems to be a regression.

I agree that in the current implementation it is cumbersome to use arrows to navigate.

( Actually I currentl wonder in which cases thunar 1.6.15 expand the folder children at all)

So possibly it makes sense to just drop auto-expand of children ?

IIRC there was as well another related bug recently .. will sort it out, when I have time !
Comment 2 alexxcons editbugs 2019-07-28 00:07:37 CEST
Created attachment 8817 
patch to fix the bug

Please take a try for this patch. It should revover the old behavior.
Comment 3 alexxcons editbugs 2019-07-28 00:16:34 CEST
Add John to CC, since he requested to dont expand the folder already in Bug #15174  (I am sorry,  I totally forgot about the auto-expand aspect)

I would be happy if you could take a try for the patch (when it comes to tree-view fixes, I got a bit fearful to break something else :X )

Since auto-expand for subfolders will make cursor navigation cumbersome, I decided to dont provide a xconf setting to toggle it.
Comment 4 John 2019-07-28 14:20:13 CEST
Hi Alex i hope you meant to say you've decided you *will* provide an xconf setting to toggle autoexpand? 

The more i use thunar with autoexpand on, the more i dislike it... i would love to be able to just turn it off.
Comment 5 alexxcons editbugs 2019-07-28 22:10:23 CEST
Hi John,

> i hope you meant to say you've decided you *will* provide an xconf setting to toggle autoexpand?

I plan to dont provide a xconf setting .. I plan to just dont autoexpand :) (please take a try for the patch)
Comment 6 John 2019-07-30 15:04:54 CEST
that sounds great to me :-)
Sorry i dont have time to try the patch directly but i will eagerly wait for it to filter through to f30 thunar :-)
Comment 7 Git Bot editbugs 2019-08-09 21:32:52 CEST
Alexander Schwinn referenced this bugreport in commit f3ec4b29738c1421c0c507e089121c74e11b65bf

Remove 'auto-expand folders' from tree-view since it causes bad usability with keyboard (Bug #15743)

https://git.xfce.org/xfce/thunar/commit?id=f3ec4b29738c1421c0c507e089121c74e11b65bf
Comment 8 Git Bot editbugs 2019-08-09 21:36:40 CEST
Alexander Schwinn referenced this bugreport in commit 0fefaa8862b0f36b02781a4c52ae9799a8901e13

Remove 'auto-expand folders' from tree-view since it causes bad usability with keyboard (Bug #15743)

https://git.xfce.org/xfce/thunar/commit?id=0fefaa8862b0f36b02781a4c52ae9799a8901e13
Comment 9 Git Bot editbugs 2019-08-09 21:39:45 CEST
Alexander Schwinn referenced this bugreport in commit a1e894f7b072aa9b81f9c3ae538cb7e3ba1e440c

Remove 'auto-expand folders' from tree-view since it causes bad usability with keyboard (Bug #15743)

https://git.xfce.org/xfce/thunar/commit?id=a1e894f7b072aa9b81f9c3ae538cb7e3ba1e440c
Comment 10 alexxcons editbugs 2019-08-09 21:42:09 CEST
ok, I gave it some more testing and  I did not find a negative side-effect.

Pushed it to master, 4.12 and 4.14 branch, to be released soon.

Bug #15743

Reported by:
Olli Helin
Reported on: 2019-07-25
Last modified on: 2019-08-09

People

Assignee:
alexxcons
CC List:
2 users

Version

Attachments

patch to fix the bug (2.65 KB, patch)
2019-07-28 00:07 CEST , alexxcons
no flags

Additional information