Page MenuHomePhabricator

Diffusion should list directories/folders before files
Closed, DeclinedPublic

Description

Upstream task: https://secure.phabricator.com/T4322

Steps to reproduce

Actual results

  • The folders are all over the place.

Expected results

  • They should be put to the top and alphatised by folder instead of files and folders please.
  • The folders should be at top instead of mixing with the listing orders with files.

Revisions and Commits

Event Timeline

Peachey88 subscribed.

This is a upstream issue more than likely.

They are currently sorted alphabetically.

Aklapper renamed this task from Re organise diffusion folders to Diffusion should list folders before files.May 21 2016, 4:28 PM

Please provide a use case for this request.

@Aklapper the use case is we will be able to find folders quicker since they will be at the top. GitBlit did it and GitHub did it. It makes everything easy to find since folders will be ontop files underneath.

Why exactly would you like to "find folders" in general, instead of wanting to find a certain folder or file in an alphabetical list, with a name that you probably already know? "It makes everything easy to find" is subjective and can also be used as an "argument" for having everything in an alphabetical list.

@Aklapper It should stay alphabetical but all the folder should stay at the top. Just makes clicking on a folder quicker instead of scrolling to get to a folder.

Paladox added a revision: Restricted Differential Revision.Jun 13 2016, 4:49 PM
Danny_B renamed this task from Diffusion should list folders before files to Diffusion should list directories/folders before files.Aug 13 2016, 8:05 PM

Upstream has some patch as well. Working, but abandoned though because it hardcodes instead of adding preference.

Hi I tested https://secure.phabricator.com/D9343 but it isent accurate since it does some folders at the top then it puts the second load on the second page.

Because of the way phabricator does pagination, this isn't really feasible for long directory listings.

@mmodell As I don't have the relevant access, I can't verify the foundation for my idea, but before you close it forever:
I had the idea of taking the trailing / in directories into account in relevant query/ies.
Something like (pseudocode): SELECT name, ( IF LastChar( name ) == "/" THEN 0 ELSE 1 ) AS isDir ... ORDER BY isDir, name.

I think he means because it is done accross pages so it will need the pages being cutting into one page.

I don't think it's an sql query - I believe it queries the git repo directly

OK, I just wanted to ensure we didn't overlook any possibility.