! 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 !
Filer reverses the behavior of the forward and back buttons
Status:
RESOLVED: FIXED

Comments

Description Forest 2008-11-29 21:09:40 CET
After navigating into a subfolder, and then to the parent folder, Thunar swaps the meaning of the forward and back commands. Keying in the "back" command does nothing, while keying in the "forward" command takes me back to the previously visited folder.

To reproduce:
- Open the XFCE Filer to a folder that has some subfolders.
- Enter a subfolder.
- Press the "up" button (or type its keyboard equivalent).
- Try pressing the "back" button (or its keyboard equivalent) to navigate back to the subfolder.
- Notice that it doesn't work.

I think Thunar is attempting to be smart here, by recognizing the parent folder as the previously visited folder, and effectively replacing my "up" command with a "back" command. Sadly, this well-intended misfeature only ends up breaking UI consistency and throwing a wrench in my mental stack of visited folders.

When I press alt+left (or the back button) I expect it to "go to the previous visited folder", always, just like the help text says it will. In practice, it might go to the previously visited folder, or it might not, depending on what the previously visited folder happened to be.

One situation where this comes up a lot:

I navigate to a subfolder in Thunar, do some file management, and leave the window open while doing something else for a while. When I return to the Thunar window, perhaps minutes or hours later, I see what folder it's displaying and decide to take a look in its parent folder. When I'm done there, and want to go back where I just was, I press the back button, only to find that it does nothing.  Adding to the confusion, I see that the back button is disabled, while the forward button is now (surprisingly) enabled. I press the forward button, and it takes me back to my previously visited folder! This inconsistency is even more mystifying when the toolbar is hidden, as is often the case for people who prefer keyboard shortcuts to reaching for the mouse.

Alternatively, if I remembered which folder I had come from, I could get there by aiming with the mouse or fiddling with the arrow and enter keys. What a hassle.

Every time this happens, I spend a few seconds wondering why Thunar failed to follow my command, and when I remember this special case behavior, I feel like Thunar has tricked me.

Lessons that I'm still re-learning after over a year of using Thunar:

1. The back button doesn't always go back in history.
2. The forward button sometimes goes back in history.
3. The back and forward buttons do not behave like those in my web browser or
any other app I use.
4. The only way to predict when the back & forward buttons will work as expected is to memorize the commands I happened to use to reach the current folder. Even if that was hours ago.

system details:
xubuntu hardy
xfdesktop 4.4.2-5ubuntu1
thunar 0.9.0-4ubuntu2
Comment 1 Forest 2008-11-29 21:11:46 CET
Created attachment 2007 
patch to remove overly-clever behavior

Here's a patch to thunar-history.c which removes the offending code.  Most of the changed lines simply remove one level of indentation.
Comment 2 Jannis Pohlmann editbugs 2008-11-30 12:53:27 CET
I agree that the up button behaviour is a little odd. It should not remove items from the backwards part of the history. Instead it should add the current folder to the backwards part of the history and switch to the parent folder.

The forward part is a different story though. Let's assume you have a large backwards and forward history and you're exactly in the middle of it with the parent folder of the active folder being the first item in the forward list.
What do you think would be the better behaviour when clicking on the up button?

There are two options:

1. Clear the entire forward history and go to the parent folder.
2. Move one step forward in the history but keep the rest of the forward history.

IMHO the second option results in a better user experience than the first. And it doesn't break the history at all like the backwards thing does.
Comment 3 Nick Schermer editbugs 2008-11-30 13:19:10 CET
yeah when you have pressed the back button a couple of times and then click the up button, the current location should be added to the back history, forward cleared and then go to the parent.
Comment 4 Jannis Pohlmann editbugs 2008-11-30 14:29:30 CET
Created attachment 2008 
Patch to never go back in history if the directory is set

I don't think forward should be cleared if the parent folder is the first item in the forward history. The attached patch removes the backwards stuff but keeps the forward feature.
Comment 5 Jannis Pohlmann editbugs 2008-11-30 16:50:17 CET
(In reply to comment #4)
> Created an attachment (id=2008) [details]
> Patch to never go back in history if the directory is set
> 
> I don't think forward should be cleared if the parent folder is the first item
> in the forward history. The attached patch removes the backwards stuff but
> keeps the forward feature.

I decided to commit this now (revision 28956):

	* thunar/thunar-history.c (thunar_history_set_current_directory): If
	  the new directory is the first one in the forward list, we just go
	  one step forward instead of clearing the whole forward history.
	  Don't try to be intelligent anymore if the new directory is the 
	  first one in the backward history (bug #4660).

@Forest: If you can, please give it some testing. I'm marking this one as resolved though since from my point of view it is fixed.
Comment 6 Forest 2008-12-01 00:55:33 CET
(In reply to comment #5)
> @Forest: If you can, please give it some testing. I'm marking this one as
> resolved though since from my point of view it is fixed.

I compiled with your patch, and it seems to take care of my main gripe.  Thanks for the quick fix!

(In reply to comment #4)
> I don't think forward should be cleared if the parent folder is the first item
> in the forward history. The attached patch removes the backwards stuff but
> keeps the forward feature.

I think it would be better to clear the forward history every time the user navigates to a specific folder without using the forward/back commands.  A history-preserving special case for parent folders is of little value, since users can only take advantage of it if they remember/recognize that the parent folder is next in their forward list, and even then it is just as easy to use the forward command instead.  (Arguably easier, since users are already trained to use the forward command if they intend to traverse their forward history.)  Moreover, this prevents the user from deliberately clearing the forward history when entering a parent folder.

In short, the special case makes the UI behavior inconsistent and reduces functionality, without adding any significant value.
Comment 7 Jannis Pohlmann editbugs 2008-12-01 23:03:04 CET
(In reply to comment #6)
> (In reply to comment #5)
> > @Forest: If you can, please give it some testing. I'm marking this one as
> > resolved though since from my point of view it is fixed.
> 
> I compiled with your patch, and it seems to take care of my main gripe.  Thanks
> for the quick fix!
> 
> (In reply to comment #4)
> > I don't think forward should be cleared if the parent folder is the first item
> > in the forward history. The attached patch removes the backwards stuff but
> > keeps the forward feature.
> 
> I think it would be better to clear the forward history every time the user
> navigates to a specific folder without using the forward/back commands.  A
> history-preserving special case for parent folders is of little value, since
> users can only take advantage of it if they remember/recognize that the parent
> folder is next in their forward list, and even then it is just as easy to use
> the forward command instead.  (Arguably easier, since users are already trained
> to use the forward command if they intend to traverse their forward history.) 
> Moreover, this prevents the user from deliberately clearing the forward history
> when entering a parent folder.

It's not only about the parent folder. It's also about subfolders that are first in the forward list. Why clearing the forward list if you switch to the first folder in it? 

> In short, the special case makes the UI behavior inconsistent and reduces
> functionality, without adding any significant value.

In case of the forward button it doesn't cause any weird behaviour and basically behaves the same as if the forward button was cleared all the time. I think I'll leave it as it is.
Comment 8 Forest 2008-12-02 04:05:22 CET
(In reply to comment #7)
> Why clearing the forward list if you switch to the first folder in it? 

I sometimes use the end of my forward list as a placeholder when I'm switching between two folders, such as when moving files around, without opening a new Thunar window.  If I clear my forward list before I begin, I don't have to count how many steps Folder-A is from Folder-B.  I can simply hit the forward key until it stops moving forward, and then I know I'm at my destination.

When using the keyboard, this is a very fast and convenient way to perform file management.

Bug #4660

Reported by:
Forest
Reported on: 2008-11-29
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information