summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/framework/header.scss10
-rw-r--r--app/helpers/tab_helper.rb10
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml2
-rw-r--r--changelogs/unreleased/30189-remove-active-dropdown.yml4
-rw-r--r--spec/features/dashboard/active_tab_spec.rb47
5 files changed, 5 insertions, 68 deletions
diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss
index 65b5f4af037..112a245ad81 100644
--- a/app/assets/stylesheets/framework/header.scss
+++ b/app/assets/stylesheets/framework/header.scss
@@ -107,10 +107,6 @@ header {
&:hover {
background-color: $white-normal;
}
-
- &.active {
- color: $gl-text-color-secondary;
- }
}
}
}
@@ -132,12 +128,6 @@ header {
.badge {
font-size: 11px;
}
-
- li {
- &.active a {
- font-weight: bold;
- }
- }
}
.global-dropdown-toggle {
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index 1a55ee05996..406bcc7b44a 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -94,16 +94,6 @@ module TabHelper
current_controller?(c) && current_action?(a)
end
- def project_tab_class
- if controller.controller_path.start_with?('projects')
- return 'active'
- end
-
- if %w(services hooks deploy_keys protected_branches).include? controller.controller_name
- "active"
- end
- end
-
def branches_tab_class
if current_controller?(:protected_branches) ||
current_controller?(:branches) ||
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index ac222ad8c82..5b6f1164a18 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -1,5 +1,5 @@
%ul
- = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: {class: "#{project_tab_class} home"}) do
+ = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index']) do
= link_to dashboard_projects_path, title: 'Projects', class: 'dashboard-shortcuts-projects' do
.shortcut-mappings
.key
diff --git a/changelogs/unreleased/30189-remove-active-dropdown.yml b/changelogs/unreleased/30189-remove-active-dropdown.yml
new file mode 100644
index 00000000000..aac52a6a5ad
--- /dev/null
+++ b/changelogs/unreleased/30189-remove-active-dropdown.yml
@@ -0,0 +1,4 @@
+---
+title: Remove active style on global dropdown menu items
+merge_request:
+author:
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb
deleted file mode 100644
index ae750be4d4a..00000000000
--- a/spec/features/dashboard/active_tab_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require 'spec_helper'
-
-RSpec.describe 'Dashboard Active Tab', js: true, feature: true do
- before do
- login_as :user
- end
-
- shared_examples 'page has active tab' do |title|
- it "#{title} tab" do
- find('.global-dropdown-toggle').trigger('click')
- expect(page).to have_selector('.global-dropdown-menu li.active', count: 1)
- expect(find('.global-dropdown-menu li.active')).to have_content(title)
- end
- end
-
- context 'on dashboard projects' do
- before do
- visit dashboard_projects_path
- end
-
- it_behaves_like 'page has active tab', 'Projects'
- end
-
- context 'on dashboard issues' do
- before do
- visit issues_dashboard_path
- end
-
- it_behaves_like 'page has active tab', 'Issues'
- end
-
- context 'on dashboard merge requests' do
- before do
- visit merge_requests_dashboard_path
- end
-
- it_behaves_like 'page has active tab', 'Merge Requests'
- end
-
- context 'on dashboard groups' do
- before do
- visit dashboard_groups_path
- end
-
- it_behaves_like 'page has active tab', 'Groups'
- end
-end