From 70161720a042d57074eecefe6044ece3ae13eb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 27 Jan 2023 21:57:51 +0100 Subject: [PATCH] Remove usages of the top-bar-right class This is one of Foundation's classes that only applies when its parent element is a flex container, which isn't the case here since commit dcec003d0. --- app/assets/stylesheets/layout.scss | 8 -------- app/assets/stylesheets/layout/admin_header.scss | 16 +++++++++------- .../layout/admin_header_component.html.erb | 4 +--- app/views/layouts/_header.html.erb | 12 +++++------- spec/support/common_actions/users.rb | 4 ++-- 5 files changed, 17 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 1f91d2f5b..255485668 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -669,14 +669,6 @@ body > header, } } -.top-bar-right { - - .is-active { - font-weight: bold; - text-decoration: underline; - } -} - .submenu { border-bottom: 1px solid $border; clear: both; diff --git a/app/assets/stylesheets/layout/admin_header.scss b/app/assets/stylesheets/layout/admin_header.scss index 58d6e9e9b..4c13eb895 100644 --- a/app/assets/stylesheets/layout/admin_header.scss +++ b/app/assets/stylesheets/layout/admin_header.scss @@ -25,13 +25,10 @@ display: inline-block; } - .top-bar-right { - - > ul { - border-bottom: 0; - padding-bottom: 0; - margin-bottom: 0; - } + .account-menu { + border-bottom: 0; + padding-bottom: 0; + margin-bottom: 0; .submenu { position: initial; @@ -40,6 +37,11 @@ a { font-weight: normal; } + + .is-active { + font-weight: bold; + text-decoration: underline; + } } [class^="icon-"] { diff --git a/app/components/layout/admin_header_component.html.erb b/app/components/layout/admin_header_component.html.erb index f1be1d2f6..9e523aa04 100644 --- a/app/components/layout/admin_header_component.html.erb +++ b/app/components/layout/admin_header_component.html.erb @@ -29,9 +29,7 @@ <% if show_account_menu? %>
-
- <%= render Layout::AccountMenuComponent.new(user) %> -
+ <%= render Layout::AccountMenuComponent.new(user) %>
<% end %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 8e35ce79c..c07948801 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -25,14 +25,12 @@
-
- <%= render Layout::AccountMenuComponent.new(current_user) %> + <%= render Layout::AccountMenuComponent.new(current_user) %> -
- +
+
diff --git a/spec/support/common_actions/users.rb b/spec/support/common_actions/users.rb index 918688428..624b3854f 100644 --- a/spec/support/common_actions/users.rb +++ b/spec/support/common_actions/users.rb @@ -75,11 +75,11 @@ module Users end def expect_to_be_signed_in - expect(find(".top-bar-right")).to have_content "My account" + expect(find("#responsive-menu")).to have_content "My account" end def expect_not_to_be_signed_in - expect(find(".top-bar-right")).not_to have_content "My account" + expect(find("#responsive-menu")).not_to have_content "My account" end def do_login_for(user, management:)