Page MenuHomePhabricator

Enable displaying folders before files in Diffusion's repository browser view
AbandonedPublic

Authored by oskall on May 31 2014, 5:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 9:57 PM
Unknown Object (File)
Sun, Nov 24, 7:54 AM
Unknown Object (File)
Fri, Nov 22, 6:33 PM
Unknown Object (File)
Mon, Nov 18, 5:32 AM
Unknown Object (File)
Thu, Nov 14, 7:42 AM
Unknown Object (File)
Thu, Nov 14, 5:33 AM
Unknown Object (File)
Sun, Nov 10, 5:39 AM
Unknown Object (File)
Wed, Nov 6, 12:54 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T4322: Diffusion show folders first
Test Plan

Manually tested it works with default, true, and false value.

Diff Detail

Repository
rP Phabricator
Branch
folder-first-plz
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 798
Build 798: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

oskall retitled this revision from to Enable displaying folders before files in Diffusion's repository browser view.
oskall updated this object.
oskall edited the test plan for this revision. (Show Details)
oskall added a reviewer: epriestley.

I had to skip lint and unit for the review to get sent out. Otherwise, I ran into the follow error:

[2014-05-31 05:41:50] EXCEPTION: (PhutilTypeExtraParametersException) Got unexpected parameters: exclude at [/Users/oskall/workspace/phabricator/libphutil/src/parser/PhutilTypeSpec.php:152]
  #0 PhutilTypeSpec::checkMap(Array of size 2 starting with: { exclude => Array of size 2 starting with: { 0 => (^externals/) } }, Array of size 2 starting with: { linters => map<string, map<string, wild>> }) called at [/Users/oskall/workspace/phabricator/arcanist/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php:32]
  #1 ArcanistConfigurationDrivenLintEngine::buildLinters() called at [/Users/oskall/workspace/phabricator/arcanist/src/lint/engine/ArcanistLintEngine.php:206]
  #2 ArcanistLintEngine::run() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistLintWorkflow.php:359]
  #3 ArcanistLintWorkflow::run() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1236]
  #4 ArcanistDiffWorkflow::runLint() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1197]
  #5 ArcanistDiffWorkflow::runLintUnit() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:484]
  #6 ArcanistDiffWorkflow::run() called at [/Users/oskall/workspace/phabricator/arcanist/scripts/arcanist.php:321]

Any idea why the error above?

In D9343#6, @oskall wrote:

I had to skip lint and unit for the review to get sent out. Otherwise, I ran into the follow error:

[2014-05-31 05:41:50] EXCEPTION: (PhutilTypeExtraParametersException) Got unexpected parameters: exclude at [/Users/oskall/workspace/phabricator/libphutil/src/parser/PhutilTypeSpec.php:152]
  #0 PhutilTypeSpec::checkMap(Array of size 2 starting with: { exclude => Array of size 2 starting with: { 0 => (^externals/) } }, Array of size 2 starting with: { linters => map<string, map<string, wild>> }) called at [/Users/oskall/workspace/phabricator/arcanist/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php:32]
  #1 ArcanistConfigurationDrivenLintEngine::buildLinters() called at [/Users/oskall/workspace/phabricator/arcanist/src/lint/engine/ArcanistLintEngine.php:206]
  #2 ArcanistLintEngine::run() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistLintWorkflow.php:359]
  #3 ArcanistLintWorkflow::run() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1236]
  #4 ArcanistDiffWorkflow::runLint() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:1197]
  #5 ArcanistDiffWorkflow::runLintUnit() called at [/Users/oskall/workspace/phabricator/arcanist/src/workflow/ArcanistDiffWorkflow.php:484]
  #6 ArcanistDiffWorkflow::run() called at [/Users/oskall/workspace/phabricator/arcanist/scripts/arcanist.php:321]

Any idea why the error above?

Your version of arc is not up-to-date and is not compatible with the .arclint file that is used for linting.

Thanks, I had arc binary in two places.. fixed it.

I'm very hesitant to add a config option for this. I'm also not really sure that it's particularly valuable. What sort of file layout makes this useful?

This approach makes T4366 (listing very large directories) more difficult to fix consistently, since limiting the query results to the first, say, 250 items will no longer select the first 250 display items. If we do pursue this, it should probably happen behind the diffusion.browsequery call (i.e., via a new "order" parameter).

I'm very hesitant to add a config option for this. I'm also not really sure that it's particularly valuable. What sort of file layout makes this useful?

This layout is most intuitive in my opinion, because it is consistent with other tools I use. Navigating without folders first personally throws me off -- I wouldn't be surprised if others feel the same way. Some examples are:

  • GitHub repository browser
    Screenshot_2014-06-02_17.17.39.png (586×800 px, 84 KB)
  • RubyMine/PhpStorm project explorer:
    Screenshot_2014-06-02_17.22.11.png (250×247 px, 12 KB)
  • Sublime text
    sublime.png (595×620 px, 121 KB)
  • Windows Explorer:
    windows.jpg (449×626 px, 96 KB)

That being said, Mac's finder seems to be a counter example. What do you think?

The OS X Finder, TextMate, and ls don't do this. Also, git ls-tree, hg manifest, and svn ls don't do it.

At least in projects I work in regularly, it doesn't seem like it's very useful to me on its own -- that is, it's not clear to me why any of those programs do it, except that the other programs do it. (Windows might do it because DOS 1.0 did it, because of some leaky implementation detail, but I can't find anything to this effect online.)

If the only reasoning for choosing one order over another is personal familiarity, that suggests this should be a per user option rather than a global option, which I'm even more hesitant about.

You're right, different developers use different tools that sort files and folders differently. From that perspective, a global setting wouldn't make sense. It would maybe make more sense as a user setting. I can look into that if you think it's worth it for more users - right now, it seems that only myself and the author of T4322 are interested in the feature.

I would love to have this feature too, although I agree it should be a user preference.
In my personal opinion folder first is a standard in non command line tools.