! 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 !
Focus of tree view selection should return to visible folder when ejecting drive
Status:
RESOLVED: MOVED

Comments

Description Yousuf 'Jay' Philips 2020-05-04 15:32:51 CEST
Steps:
1. open thunar in tree view to the Desktop (focus is on the Desktop folder in the tree and file panes)
2. insert a flash drive and await for it to mount
3. right-click on the flash drive in the tree pane (focus then on flash drive) and select eject
4. flash drive ejected and focus moves to the next the entry below it, which is Network

Expected: Focus would move to the Desktop entry in the tree view
Comment 1 Theo Linkspfeifer editbugs 2020-05-04 19:26:20 CEST
I checked some other cases and the keyboard focus usually jumps to the next or previous element. Interestingly, a right-click in Caja's tree view does not change the keyboard focus, but that may be confusing also.
Comment 2 Theo Linkspfeifer editbugs 2020-05-06 22:22:41 CEST
Any opinion on the Caja approach? Otherwise, I would vote for closing this report as won't fix.
Comment 3 Yousuf 'Jay' Philips 2020-05-06 22:34:56 CEST
I checked Caja and it does what I'd expect of the focus returning back to the folder found in the file/folders view.
Comment 4 alexxcons editbugs 2020-05-06 23:05:04 CEST
I would agree with Yousuf here.

If we lost our current focus element, I think it is a sane behavior to focus the folder which currently is shown on the right pane as a fallback.

A patch would be very welcome !
Comment 5 Theo Linkspfeifer editbugs 2020-05-07 11:29:00 CEST
Created attachment 9842 
quick diff

The attached diff extends the existing code so that the selection returns after closing the context menu.
Comment 6 alexxcons editbugs 2020-05-07 23:32:48 CEST
(In reply to Theo Linkspfeifer from comment #5)
> Created attachment 9842 
> quick diff
> 
> The attached diff extends the existing code so that the selection returns
> after closing the context menu.

Only 12 hours, Theo that really is Impressive :)

Though I would not always use that fallback on right-click .. that somehow feels wrong to me.
 I would rather search for the piece of code which does the "focus next item" after eject and replace it with "obtain current folder and focus it".
Possibly via  "thunar_navigator_get_current_directory", or ideally via some internal fallback, to even get the same tree-node than before.
Comment 7 Theo Linkspfeifer editbugs 2020-05-08 11:06:26 CEST
> Though I would not always use that fallback on right-click .. that somehow feels wrong to me.
It does. However, it should either always keep the tree view selection and main pane content in sync, or just not care.

Nemo: same as Thunar
Caja: no selection on right-click
Comment 8 Theo Linkspfeifer editbugs 2020-05-21 10:34:47 CEST
Opinions?
Comment 9 alexxcons editbugs 2020-05-21 14:49:17 CEST
(In reply to Theo Linkspfeifer from comment #8)
> Otherwise, I would vote for closing this report as won't fix.
After another testing session, I would agree on that . .sorry to be shilly-shally.

(In reply to Yousuf 'Jay' Philips from comment #3)
> I checked Caja and it does what I'd expect of the focus returning back to
> the folder found in the file/folders view.
The point is, that the focus is not "returning back" .. it just never was there in caja.

A proper fix, keeping a history of many/all previous locations in order to get the latest valid location would add to much complexity for such a small gain, so I'll just close the bug as wontfix.

Thanks for your patience !
Comment 10 Yousuf 'Jay' Philips 2020-05-21 14:53:30 CEST
I would be in favor of it always keeping the two in sync. Right now we multiple cases where the sync isn't kept, like when you right-click in the folder pane in either view and then press Esc.

Caja [Tree]: No selection on right-click
Nemo [Tree]: Same as Thunar
Dolphin [Tree]: Focus synced

Caja [Shortcut]: Focus synced
Nemo [Shortcut]: Focus synced
Thunar [Shortcut]: Similar to tree view, but focus disappears when its the last entry in the devices group
Nautilus [Shortcut]: Focus synced
PCManFM [Shortcut]: Similar to Thunar (shortcut view)
Comment 11 Yousuf 'Jay' Philips 2020-05-21 14:54:53 CEST
Tested Windows Explorer and it also has focus synced.
Comment 12 alexxcons editbugs 2020-05-22 19:29:46 CEST
(In reply to Yousuf 'Jay' Philips from comment #10)
> I would be in favor of it always keeping the two in sync. Right now we
> multiple cases where the sync isn't kept, like when you right-click in the
> folder pane in either view and then press Esc.

Please list these multiple cases .. otherwise I have no idea what exactly I should test.

I tried exactly the use-case above, and I came to a different result for dolphin tree-view:
Dolphin [Tree]: Same as Thunar

All other use-cases are about shortcut view .. though this issue is about tree-view .. so not clear to me why you tested them.
Or is your proposal now to sync the focus on both views ? A new bug would make sense in that case.

- It feels correct and good to me to have some visual effect on right-click.
- It feels wrong to me to directly jump into the folder on right click,
- IMO both views should behave the same
Comment 13 Yousuf 'Jay' Philips 2020-05-22 21:41:42 CEST
Created attachment 9893 
dolphin ejecting in tree view

(In reply to alexxcons from comment #12)
> Please list these multiple cases .. otherwise I have no idea what exactly I
> should test.
1. example mentioned in description
2. right-click in the folder pane and then press Esc

There will likely be others cases, if i searched for more.

> I tried exactly the use-case above, and I came to a different result for
> dolphin tree-view:
> Dolphin [Tree]: Same as Thunar
So to confirm, in Dolphin tree view, when you eject a flash drive, it jumps to the entry after it, like Thunar. I've taken a screencast and attached it.

> All other use-cases are about shortcut view .. though this issue is about
> tree-view .. so not clear to me why you tested them.
> Or is your proposal now to sync the focus on both views ? A new bug would
> make sense in that case.
I hadn't tested shortcut view when I reported the bug but did test it now and if we agree that it should always sync, then it should also be fixed in shortcut view. Another bug can be opened if you prefer it.

> - It feels correct and good to me to have some visual effect on right-click.
Agree.

> - It feels wrong to me to directly jump into the folder on right click,
Thunar doesn't do this and don't think any file manager does this, so totally agree.

> - IMO both views should behave the same
Agree.
Comment 14 Git Bot editbugs 2020-05-26 23:51:33 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/thunar/-/issues/301.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16799

Reported by:
Yousuf 'Jay' Philips
Reported on: 2020-05-04
Last modified on: 2020-05-26

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Attachments

quick diff (1.41 KB, patch)
2020-05-07 11:29 CEST , Theo Linkspfeifer
no flags
dolphin ejecting in tree view (97.76 KB, video/mp4)
2020-05-22 21:41 CEST , Yousuf 'Jay' Philips
no flags

Additional information