gitlab-org--gitlab-foss/spec/helpers
Dmitriy Zaporozhets 4666515538 Merge branch 'flatten-dirs' into 'master'
Flatten the directory hierarchy while there is only one directory descendant

In some languages, especially java, the directory structure reflects the package structure.This means that using the file tree browser to reach the directories that matter you have to click a lot of directories containing only another subdirectory.

This merge request tries to enhance this by showing and providing the link to the first directory that doesn't contain only one directory.

See also [this feature request](http://feedback.gitlab.com/forums/176466-general/suggestions/6236769-jump-forward-to-the-first-folder-that-has-more-tha)

This is very similar to what [GitHub does](https://github.com/blog/1877-folder-jumping), but I don't think graying out the empty directories is really necessary.

Screenshots: [Before](https://gitlab.com/uploads/marmis85/gitlab-ce/b683a0000f/before.png) - [After](https://gitlab.com/uploads/marmis85/gitlab-ce/a23725a1c1/after.png)

I'm actually very new at ruby, rails, haml, and almost everything involved in Gitlab's development...
From what I could understand, when we render each directory item in the list we only have the data structure representing the item but not his descendants.
To iterate through the hierarchy I call Gitlab::Git:Tree.where() but I'm not sure if this is the most efficient way.

I also considered making every directory a clickable link, but I tried that and in the end it wasn't very useful and reduced the click target for the most useful directory.

See merge request !275
2015-01-11 04:42:28 +00:00
..
application_helper_spec.rb Fix feature and tests 2015-01-08 13:21:00 -08:00
broadcast_messages_helper_spec.rb Customization and previewing of broadcast messages 2013-12-18 17:43:45 -05:00
diff_helper_spec.rb Fix diff_helper spec. 2014-09-12 21:02:50 +02:00
events_helper_spec.rb Improve dashboard note view and add tests 2014-10-12 23:56:56 -05:00
gitlab_markdown_helper_spec.rb Use actual GitLab URL for test assertion 2014-10-18 00:04:21 -05:00
issues_helper_spec.rb Fallback to internal issue tracker if config is invalid. 2013-10-17 10:42:39 +02:00
labels_helper_spec.rb Fix old api compatibility and tests 2014-07-30 17:17:29 +03:00
merge_requests_helper.rb Add a test for issue sentence generation 2014-06-13 18:10:28 +02:00
notifications_helper_spec.rb Upgrade to Font Awesome v4.2 2014-10-03 12:19:24 +02:00
oauth_helper_spec.rb fix specs 2014-12-04 15:53:26 +02:00
projects_helper_spec.rb Remove some deprecations and fir project helper specs 2013-12-10 12:11:29 +02:00
search_helper_spec.rb Make changes to tests 2014-01-22 21:03:52 +02:00
submodule_helper_spec.rb Fix failing submodule test. 2014-06-03 11:37:23 +02:00
tab_helper_spec.rb fix most of warnings 2013-12-15 00:05:10 +04:00
tree_helper_spec.rb point to a specific branch in the test repo to avoid conflicts 2015-01-11 05:07:34 +01:00