From 3801dc0e6e245929ba7140cc8e69154f64f1a669 Mon Sep 17 00:00:00 2001 From: Ilya Vassilevsky Date: Fri, 31 Mar 2017 15:40:49 +0400 Subject: [PATCH] Promote blameless culture by using "annotate" instead User-facing changes (fast & easy win) --- app/assets/stylesheets/framework/files.scss | 2 +- app/views/projects/blame/show.html.haml | 2 +- app/views/projects/blob/_breadcrumb.html.haml | 2 +- changelogs/unreleased/10378-promote-blameless-culture.yml | 4 ++++ features/steps/project/source/browse_files.rb | 1 + .../projects/blobs/blob_line_permalink_updater_spec.rb | 2 +- spec/features/projects/files/browse_files_spec.rb | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 changelogs/unreleased/10378-promote-blameless-culture.yml diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index 78f425057eb..d08df05fd6c 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -85,7 +85,7 @@ } /** - * Blame file + * Annotate file */ &.blame { table { diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index a2ec3d44185..a6ee2b2f7b8 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Blame", @blob.path, @ref +- page_title "Annotate", @blob.path, @ref = render "projects/commits/head" %div{ class: container_class } diff --git a/app/views/projects/blob/_breadcrumb.html.haml b/app/views/projects/blob/_breadcrumb.html.haml index 3f58e8d232f..0ad9f258e48 100644 --- a/app/views/projects/blob/_breadcrumb.html.haml +++ b/app/views/projects/blob/_breadcrumb.html.haml @@ -10,7 +10,7 @@ = link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id), class: 'btn' - else - = link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id), + = link_to 'Annotate', namespace_project_blame_path(@project.namespace, @project, @id), class: 'btn js-blob-blame-link' unless blob.empty? = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), diff --git a/changelogs/unreleased/10378-promote-blameless-culture.yml b/changelogs/unreleased/10378-promote-blameless-culture.yml new file mode 100644 index 00000000000..8cf64dfd793 --- /dev/null +++ b/changelogs/unreleased/10378-promote-blameless-culture.yml @@ -0,0 +1,4 @@ +--- +title: Changed Blame to Annotate in the UI to promote blameless culture +merge_request: 10378 +author: Ilya Vassilevsky diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 6efd4374b32..d099d7af167 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -372,6 +372,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps expect(page).to have_content 'Permalink' expect(page).not_to have_content 'Edit' expect(page).not_to have_content 'Blame' + expect(page).not_to have_content 'Annotate' expect(page).to have_content 'Delete' expect(page).to have_content 'Replace' end diff --git a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb index d94204230f6..53c5a52ce3a 100644 --- a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb +++ b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb @@ -55,7 +55,7 @@ feature 'Blob button line permalinks (BlobLinePermalinkUpdater)', feature: true, end end - describe 'Click "Blame" button' do + describe 'Click "Annotate" button' do it 'works with no initial line number fragment hash' do visit_blob diff --git a/spec/features/projects/files/browse_files_spec.rb b/spec/features/projects/files/browse_files_spec.rb index c0a9327249c..30a1eedbb48 100644 --- a/spec/features/projects/files/browse_files_spec.rb +++ b/spec/features/projects/files/browse_files_spec.rb @@ -12,7 +12,7 @@ feature 'user browses project', feature: true, js: true do scenario "can see blame of '.gitignore'" do click_link ".gitignore" - click_link 'Blame' + click_link 'Annotate' expect(page).to have_content "*.rb" expect(page).to have_content "Dmitriy Zaporozhets" -- GitLab