diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-10-27 08:10:18 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-10-27 08:10:18 +0000 |
commit | 2c1fd83a4ad742c2b2a9165ef4decc9305fe635a (patch) | |
tree | 7fc834cd3988f88b0e94f80654163ec9743ee092 | |
parent | 7abcb29d161651418b8ee9041712c31c9d0add06 (diff) | |
parent | 3812f0dc6de190b57e8e0437e0d2d5c4beb02ce4 (diff) | |
download | gitlab-ce-2c1fd83a4ad742c2b2a9165ef4decc9305fe635a.tar.gz |
Merge branch 'delete-branch-remove-tooltip' into 'master'
Removed delete branch tooltip
## What does this MR do?
Removed the tooltip on the delete branch button & add `aria-label`
## What are the relevant issue numbers?
Closes #23253
See merge request !6954
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 7 | ||||
-rw-r--r-- | spec/features/projects/branches/delete_spec.rb | 24 |
3 files changed, 7 insertions, 25 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 876ab0d695b..ea186b43a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Please view this file on the master branch, on stable branches it's out of date. - Fix HipChat notifications rendering (airatshigapov, eisnerd) - Add hover to trash icon in notes !7008 (blackst0ne) - Fix sidekiq stats in admin area (blackst0ne) + - Removed delete branch tooltip !6954 - Escape ref and path for relative links !6050 (winniehell) - Fixed link typo on /help/ui to Alerts section. !6915 (Sam Rose) - Fix filtering of milestones with quotes in title (airatshigapov) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 4480b2f22c3..99f3e1167d1 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -31,7 +31,12 @@ = render 'projects/buttons/download', project: @project, ref: branch.name - if can?(current_user, :push_code, @project) - = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: "btn btn-remove remove-row has-tooltip #{can_remove_branch?(@project, branch.name) ? '' : 'disabled'}", title: "Delete branch", method: :delete, data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?", container: 'body' }, remote: true do + = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), + class: "btn btn-remove remove-row #{can_remove_branch?(@project, branch.name) ? '' : 'disabled'}", + method: :delete, + data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?" }, + remote: true, + "aria-label" => "Delete branch" do = icon("trash-o") - if branch.name != @repository.root_ref diff --git a/spec/features/projects/branches/delete_spec.rb b/spec/features/projects/branches/delete_spec.rb deleted file mode 100644 index 63878c55421..00000000000 --- a/spec/features/projects/branches/delete_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper' - -feature 'Delete branch', feature: true, js: true do - include WaitForAjax - - let(:project) { create(:project) } - let(:user) { create(:user) } - - before do - project.team << [user, :master] - login_as user - visit namespace_project_branches_path(project.namespace, project) - end - - it 'destroys tooltip' do - first('.remove-row').hover - expect(page).to have_selector('.tooltip') - - first('.remove-row').click - wait_for_ajax - - expect(page).not_to have_selector('.tooltip') - end -end |