Folder Collapsing / Jumping / Diving

Features wanted...
Post Reply
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Folder Collapsing / Jumping / Diving

Post by TheQwerty »

Anyone who has done any Java programming will appreciate this one...

Sometimes it is necessary to create really stupid directory structures where there are multiple folders that each contain only a single folder and the useful files are nested deep down inside this insanity.

For example, take this flat view of a folder:
screenshot.14.png
screenshot.14.png (11.99 KiB) Viewed 2502 times
When we browse to that folder normally we see:
screenshot.15.png
screenshot.15.png (3.84 KiB) Viewed 2502 times
And if we want to get to the actual source file Turtles.java we need to go get scuba gear and a diving partner.

It would be great if XY could collapse that src item to src/com/example/application, and then teleport us straight to the goods!

Those familiar with GitHub may know they just recently added this feature.


Not a terribly complex idea on the surface but there's always details...
1) To limit the performance hit I suggest it not follow junctions and has a limit to how deep it goes. This could eventually become a tweak but I think 10 or maybe even 5 levels could be sufficient.

2) Phase 1 should be limited to the list - mostly because I don't use the tree enough to know if this makes any sense there. :oops:

3) The history would not include the intermediate folders, so back/fore will jump from root to ocean floor. Up would still go to parent unless the up is back tweak is enabled.

4) One question that arises is how to navigate to the intermediate folders and I feel we have sufficient means via the tree, address bar, breadcrumbs, and Up.


Finally, I know there are alternatives to make this possible today...

Using a script to do the diving is possible, but requires training to always use the script to navigate to a folder - if we could create PFAs for folders, instead of just POMs, it might be a different story. ;) Further it doesn't provide the visual clue to the user that they should prepare to dive.

It's also possible to use a Custom Column script for the scanning and a location Extra Tag column can display the new "name" and trigger a goto script so it is all in the list, but this pollutes tags.dat, is very hacky, and ends up being a bit slow.

So yes, it can be done today but if done by XY I think it could be so much better!
:mrgreen:

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Folder Collapsing / Jumping / Diving

Post by Marco »

Basically a CEA triggered only in the List that:
-when opening a folder, checks if there's only a subfolder as content, and if so it opens it, repeating if possible
-when going up from a folder, checks if there's only the folder we were visiting, and if so it keeps going up, repeating if possible
Am I formalizing it correctly?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

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

Re: Folder Collapsing / Jumping / Diving

Post by TheQwerty »

Sort of.

1) I want to bypass the repeating part so it becomes a single goto.
2) I think it's important to have the visual indication in the list.

For example go here: https://github.com/Netflix/SimianArmy/t ... r/src/main
Look at the entry for java/com/netflix/simianarmy.
The intermediate folders are gray and the target is blue so when you click that entry it takes you to simianarmy instead of to java.

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

Re: Folder Collapsing / Jumping / Diving

Post by admin »

Sounds like a compressed branch view. (?)

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

Re: Folder Collapsing / Jumping / Diving

Post by TheQwerty »

admin wrote:Sounds like a compressed branch view. (?)
Kind of... but I don't want a new view or to show all items.

I'd rather it be an option that changes how the list displays and handles folders which contain only a single folder. Plus the intelligence to handle more than just a single level.

When enabled the src item from above would be shown in the list as src/com/example/application and "opening" it would take the user to application not src. The other items would all be left alone. Like the 'Collapsed Name' column here:
screenshot.16.png
screenshot.16.png (5.29 KiB) Viewed 2482 times

Really instead of an option it could be done as just a new column that is a duplicate of Name with the exception of including this collapsing behavior.

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

Re: Folder Collapsing / Jumping / Diving

Post by admin »

I have a lot of less extreme things on my list...

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

Re: Folder Collapsing / Jumping / Diving

Post by TheQwerty »

That's a real shame.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Folder Collapsing / Jumping / Diving

Post by nerdweed »

PFA for folders might just do the trick and many other wonders. It would allow using the scripting approach instead of resorting to CustomColumns.

autocart
Posts: 1248
Joined: 26 Sep 2013 15:22

Re: Folder Collapsing / Jumping / Diving

Post by autocart »

It might be a little bit of an overkill/overhead-workaround but...

You could put an extra ahk-"layer" over XY that catches all mouse clicks. Then...

... using the new function itematpos() you could verify much easier than before if the mouse is on a folder (now this works both on list panes and tree) and in case of a dbl-click (ahk-approaches to catching a dbl-click on the net) on a folder trigger that script of yours instead of permitting it to pass through to XY.

All other clicks would simply be passed through to XY.

eil
Posts: 1620
Joined: 13 Jan 2011 19:44

Re: Folder Collapsing / Jumping / Diving

Post by eil »

nerdweed wrote:PFA for folders might just do the trick and many other wonders. It would allow using the scripting approach instead of resorting to CustomColumns.
i'd wish to see an example/realisation of this idea, as i understand it's possible, and if specific folder name to be used becomes CEA-powerful.!
Win 7 SP1 x64 100% 1366x768

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

Re: Folder Collapsing / Jumping / Diving

Post by LittleBiG »

I would also need this function, but a simpler implementation could be enough. Regarding the example above, if I doubleclick on the "src" folder in the list, I would hyper-jump into the "application" folder. Technically entering a folder XY could check if there is only one folder in it without files, so it could enter that subfolder immediately, without a stop in the empty folder. Doing the same repeatedly one can get to the first meaningful folder in a heartbeat. I think it can be viable only as a tweak, because it would be for geeks and programmers (novice users couldn't know why they got deeper into the folder tree).

EDIT: By the way, this kind of folder structure can be created when I extract compressed file and I choose the "extract into a new folder named by the file" option. Assume extracting XReader.zip into the Downloads folder. The result easily could be C:\Downloads\XReader\XSOFT\XReader30\". After extracting I am in the C:\Downloads and clicking on the XReader folder would hyperjump me into the XReader30. Would be cool.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Folder Collapsing / Jumping / Diving

Post by SkyFrontier »

For reference, now it's possible:
CFA - script for folders only?

You may set this tweak (available on +v15.70.0119)
PFADefaultOpenFolders=1
in order to make it work, depending on your XY version being upgraded or fresh installed after v15.70.0119.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply