[17.00.0101] Sorted column reverts to sort by name

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

[17.00.0101] Sorted column reverts to sort by name

Post by sheeeple »

I use a scripted custom column to sort my manga(comics) collection so that series that have unread chapters appear at the top.
The sorting is lost however everytime I use the commands Back (#527) or Forward (#528) to go into the folder(D:\Manga) containing the scripted column.
Up(#523) works fine though, the sorted column is NOT set to Name.

Custom column script is set to trigger on browse.
FVS settings:
D:\Manga. (subfolders not incl.) -> details view, sort by :d-15 (primary), sort by: Date Modified (secondary), all boxes checked for applied settings
D:\Manga\* -> details view, sort by name desc, all boxes check for applied settings
D:\Manga\*\* -> Thumbs view, sort by name asc, all boxes check for applied settings

What it should look like:
before.jpg
But after using back or forward it looks like this:
after.jpg
This is what the subfolder looks like:
subfolder sample.jpg
^ From here if I use Up(#523) I get before.jpg.
If I use Back(#527) I get after.jpg

my script:

Code: Select all

$items = listfolder(<cc_item>);
    $limit = 3; // Last 3 items only
    foreach ($item, $items, "|", "r") { 
		
        // Labelled == read; Unlabelled == unread
	    $prop = property("#Label", $item); 
            if ($prop == "") {
                return "✱"; 
	    }

	    $limit--;
	    if ($limit == 0) {
	        break; 
 	    }
    }
    return;
So I have to add this bit which I think adds to execution time:

Code: Select all

if (compare(get("Sort"), "Name,d") == 0) { 
     sortby ":d-17", "d", 0;
     sortby "Modified", "d", 1;
}
To see the attached files, you need to log into the forum.
Last edited by sheeeple on 12 Aug 2016 09:11, edited 2 times in total.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by bdeshi »

Why not apply an FVS?

0. open the folder and sort by custom column.
1. view > folder view settings > save.
2. view > folder view settings > edit > [X] sort order. (and include subfolders if preferred.)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: [17.00.0101] Sorted column reverts to sort by name

Post by sheeeple »

SammaySarkar wrote:Why not apply an FVS?

0. open the folder and sort by custom column.
1. view > folder view settings > save.
2. view > folder view settings > edit > [X] sort order. (and include subfolders if preferred.)
I already have FVS set up. I've also mess around with it (auto-save/no auto-save, w/ sort order, w/o sort order) but it doesn't help :( . It's almost like the list is sorted before the custom column is loaded so it default to sort by name.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by bdeshi »

Hmm, try setting the custom column's Trigger to Browse.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: [17.00.0101] Sorted column reverts to sort by name

Post by sheeeple »

SammaySarkar wrote:Hmm, try setting the custom column's Trigger to Browse.
:veryconfused: Sorry I left out too much detail but It's already set to trigger at 'Browse'. 'List' trigger doesn't work because I need to evaluate all the folders at once to sort them properly.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by admin »

I think it's related to this feature:

Code: Select all

v8.80.0013 - 2010-01-08 22:33
    + History: Now the sort order is stored with History. If you return-
      by-history to a location you have visited during the current 
      session, the location's previous sort order is restored.
      This history-bound sort order is NOT remembered between sessions.
I don't think this has been much discussed here. Maybe now is a good time. So, is this a good feature? I could easily reproduce the issue of the OP and I have to admit I could as easily feel the same confusion. I tend to remove the feature, or at least make it optional. OTOH, File Explorer seem to work like this as well (Win 8.1). Hmmm...

Filehero
Posts: 2734
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: [17.00.0101] Sorted column reverts to sort by name

Post by Filehero »

admin wrote:I tend to remove the feature, or at least make it optional.
+1
For me sort order is part of the view not the data (aka location).

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by admin »

For me too. That history feature is history now. :)

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: [17.00.0101] Sorted column reverts to sort by name

Post by sheeeple »

Fixed in .0104. Thank you very much Mr. admin :biggrin:

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: [17.00.0101] Sorted column reverts to sort by name

Post by LittleBiG »

admin wrote:I think it's related to this feature:

Code: Select all

v8.80.0013 - 2010-01-08 22:33
    + History: Now the sort order is stored with History. If you return-
      by-history to a location you have visited during the current 
      session, the location's previous sort order is restored.
      This history-bound sort order is NOT remembered between sessions.
I don't think this has been much discussed here. Maybe now is a good time. So, is this a good feature? I could easily reproduce the issue of the OP and I have to admit I could as easily feel the same confusion. I tend to remove the feature, or at least make it optional. OTOH, File Explorer seem to work like this as well (Win 8.1). Hmmm...
Actually, there was a certain logic in it. However, it caused me to have to follow a rule: if I changed the sort order in a subfolder, I had to use "go back" if i wanted the original order of the parent folder, and "go up" if I wanted to keep the new sort order.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by admin »

Yep, I'm aware it could be useful. I decided against it anyway.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: [17.00.0101] Sorted column reverts to sort by name

Post by TheQwerty »

I was wary of this change at the time but thought I'd give it a chance - well today I discovered a case where this change is very frustrating.

I have FVS configured to show my Downloads folder sorted by Date because I generally want to access the most recent items. Occasionally I clean out this folder and when I do that I prefer sorting by Name.

Previously, I was able enter sub-folders if need be, and go back to my Name sorted downloads with relative ease and this created a nice flow. 8)

Now the FVS gets applied when I go back completely destroying that zen. :evil:

I think my only workaround now is to temporarily disable FVS - but this kind of sucks because:
1) It adds to my cognitive load the fact that I must remember to re-enable it.
2) It means a feature that I never had a need to disable previously now needs more frequently changed.
3) To relieve both I have to relinquish precious toolbar space to the FVS button.


Can we please restore the functionality that had been working with few complaints for the last 6 years as a tweak or new option (Configuration | Refresh, Icons, History | History | History retains sort order)?

sheeeple
Posts: 13
Joined: 08 Aug 2016 17:31

Re: [17.00.0101] Sorted column reverts to sort by name

Post by sheeeple »

TheQwerty wrote:I was wary of this change at the time but thought I'd give it a chance - well today I discovered a case where this change is very frustrating.

I have FVS configured to show my Downloads folder sorted by Date because I generally want to access the most recent items. Occasionally I clean out this folder and when I do that I prefer sorting by Name.

Previously, I was able enter sub-folders if need be, and go back to my Name sorted downloads with relative ease and this created a nice flow. 8)

Now the FVS gets applied when I go back completely destroying that zen. :evil:

I think my only workaround now is to temporarily disable FVS - but this kind of sucks because:
1) It adds to my cognitive load the fact that I must remember to re-enable it.
2) It means a feature that I never had a need to disable previously now needs more frequently changed.
3) To relieve both I have to relinquish precious toolbar space to the FVS button.


Can we please restore the functionality that had been working with few complaints for the last 6 years as a tweak or new option (Configuration | Refresh, Icons, History | History | History retains sort order)?
I do that for my downloads folder too. What I did is I separated the FVS for the Downloads folder from its subfolders and then have both set to auto-save.
In my case I have fvs for:
D:\Downloads (auto-save)
and
D:\Downloads\* (auto-save, incl. sub-folders)
Works for me most of the time.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [17.00.0101] Sorted column reverts to sort by name

Post by admin »

TheQwerty wrote:Now the FVS gets applied when I go back completely destroying that zen. :evil:
Ok, ok. I'm not going to be the one who destroyed zen.

Gonna add a setting... :)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: [17.00.0101] Sorted column reverts to sort by name

Post by TheQwerty »

admin wrote:
TheQwerty wrote:Now the FVS gets applied when I go back completely destroying that zen. :evil:
Ok, ok. I'm not going to be the one who destroyed zen.

Gonna add a setting... :)
Zen restored - thank you, Don!

Post Reply