Feature #25999

View repository content by default (instead of the history)

Added by Jan from Planio www.plan.io 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.4.0
Resolution:Fixed

Description

In line with the changes proposed in #25988, I'd like to propose to change the default behaviour for clicking on entries in the repository to showing the entry's contents, rather than it's history. The research we did at Planio showed that viewing is the more common action. GitHub and Bitbucket use the same behaviour, by the way.

This patch series also introduces the existing 2nd level tab style for the "View", "History", and "Annotate" links on repo entries and adds the download icon introduced in #25988 to the download links to make them a little more prominent.

Here's a screenshot:

repo_entries_tabs.png (122 KB) Jan from Planio www.plan.io, 2017-05-18 12:27

0002-Add-download-icon-to-download-links-on-file-and-repo.patch Magnifier (1.79 KB) Jan from Planio www.plan.io, 2017-05-18 12:30

0003-Make-common-_tabs-partial-usable-without-JS-partial-.patch Magnifier (1.55 KB) Jan from Planio www.plan.io, 2017-05-18 12:30

0004-Style-links-on-repository-entries-as-2nd-level-tabs-.patch Magnifier (2.95 KB) Jan from Planio www.plan.io, 2017-05-18 12:30

repo-browser-breadcrumbs@2x.png - [proposal] change link destination of breadcrumbs (30.7 KB) Go MAEDA, 2017-05-19 04:14

0001-Make-View-the-default-action-for-repository-entries-.patch Magnifier (3.43 KB) Jan from Planio www.plan.io, 2017-05-24 17:27


Related issues

Related to Redmine - Feature #25357: "Raw view" of a file in repository New
Related to Redmine - Feature #14332: [Repository] Make "view file" the default New
Blocks Redmine - Feature #26035: More visually consistent download links Closed

Associated revisions

Revision 16646
Added by Jean-Philippe Lang about 1 month ago

View content of repository files by default, instead of its history (#25999).

Patch by Jan Schulz-Hofen.

Revision 16647
Added by Jean-Philippe Lang about 1 month ago

Add download icon to download links on file and repo entry preview (#25999).

Patch by Jan Schulz-Hofen.

Revision 16648
Added by Jean-Philippe Lang about 1 month ago

Make common/_tabs partial usable without JS partial switching (#25999).

Patch by Jan Schulz-Hofen.

Revision 16649
Added by Jean-Philippe Lang about 1 month ago

Style links on repository entries as 2nd level tabs (like in settings) (#25999).

Patch by Jan Schulz-Hofen.

Revision 16650
Added by Jean-Philippe Lang about 1 month ago

Adds missing .icon-download CSS class (#25999).

History

#1 Updated by Jan from Planio www.plan.io 2 months ago

  • Blocked by Feature #25988: Preview files by default instead of downloading them added

#2 Updated by Jan from Planio www.plan.io 2 months ago

  • Description updated (diff)

#3 Updated by Go MAEDA 2 months ago

Jan from Planio www.plan.io wrote:

I'd like to propose to change the default behaviour for clicking on entries in the repository to showing the entry's contents, rather than it's history. The research we did at Planio showed that viewing is the more common action.

Absolutely agree. To be honest, it was frustrating for me to click a lot to see source codes. I am sure that the patch can greatly improves UX of Redmine.

#4 Updated by Go MAEDA 2 months ago

I think it would be even better to change link destination of the breadcrumbs too.

diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb
index eb115f9ad..82f25d43a 100644
--- a/app/views/repositories/_breadcrumbs.html.erb
+++ b/app/views/repositories/_breadcrumbs.html.erb
@@ -18,7 +18,7 @@ dirs.each do |dir|
 <% end %>
 <% if filename %>
     / <%= link_to filename,
-                   :action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
+                   :action => 'entry', :id => @project, :repository_id => @repository.identifier_param,
                    :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
 <% end %>
 <%

[proposal] change link destination of breadcrumbs

#5 Updated by Marius BALTEANU 2 months ago

+1 Nice improvement.

#6 Updated by Go MAEDA 2 months ago

#7 Updated by Go MAEDA 2 months ago

  • Related to Feature #14332: [Repository] Make "view file" the default added

#8 Updated by Go MAEDA 2 months ago

  • Target version changed from Candidate for next minor release to 3.4.0

This is a great improvement. Setting target version to 3.4.0.

#9 Updated by Jan from Planio www.plan.io 2 months ago

Go MAEDA wrote:

I think it would be even better to change link destination of the breadcrumbs too.

Thank you for improving my patch! I totally agree.

#10 Updated by Jan from Planio www.plan.io 2 months ago

  • File deleted (0001-Make-View-the-default-action-for-repository-entries-.patch)

#11 Updated by Jan from Planio www.plan.io 2 months ago

Please find attached updated patch 0001. It now contains the changes suggested by Go.

#12 Updated by Jan from Planio www.plan.io 2 months ago

  • Blocks Feature #26035: More visually consistent download links added

#13 Updated by Mischa The Evil about 1 month ago

Jan from Planio www.plan.io wrote:

In line with the changes proposed in #25988, I'd like to propose to change the default behaviour for clicking on entries in the repository to showing the entry's contents, rather than it's history. The research we did at Planio showed that viewing is the more common action. GitHub and Bitbucket use the same behaviour, by the way.

I agree. This could really reduce the required number of clicks to get to the content (which is IMHO indeed a valid drawback of the current implementation).

#14 Updated by Jean-Philippe Lang about 1 month ago

  • Blocked by deleted (Feature #25988: Preview files by default instead of downloading them)

#15 Updated by Jean-Philippe Lang about 1 month ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Patches are committed, thanks.

Also available in: Atom PDF