Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed May 31, 2024
1 parent 6d4bf11 commit 86dfb36
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 20 deletions.
13 changes: 2 additions & 11 deletions decidim-core/app/packs/stylesheets/decidim/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ header {
@apply mt-40 md:mt-0;
}

#menu-bar-container{
#menu-bar-container {
@apply mt-[140px] md:mt-0;
}
}
}

#sticky-header {
Expand Down Expand Up @@ -352,15 +352,6 @@ header {
&__top {
@apply flex flex-col md:flex-row justify-between p-4 md:p-8 gap-x-8;

&-left {
@apply w-full md:w-1/2;

/* Overwrite default size */
.card__highlight-text {
@apply text-md;
}
}

&-right {
@apply hidden md:block md:w-1/2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%= render partial: "layouts/decidim/logo", locals: { organization: current_organization } %>
</div>
<div class="main-bar__search">
<%= render partial: "layouts/decidim/header/main_search" %>
<%= render partial: "layouts/decidim/header/main_search", locals: {id: "search-mobile"} %>
</div>
<div class="main-bar__links-desktop">
<%= render partial: "layouts/decidim/header/main_links_desktop" %>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= form_tag(decidim.search_path, method: :get, id: "form-search-mobile", class: "filter-search") do %>
<%= form_tag(decidim.search_path, method: :get, id: "form-<%= id %>", class: "filter-search") do %>
<%= text_field_tag(
:term,
nil,
id: "input-search-mobile",
id: "input-<%= id %>",
class: "reset-defaults outline-none",
value: params[:term] || params.dig(:filter, :term),
placeholder: t("decidim.search.term_input_placeholder"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if available_locales.length > 1 %>
<div>
<button id="trigger-dropdown-language-chooser-mobile" data-component="dropdown" data-target="dropdown-menu-language-chooser" class="mt-8 border border-black rounded-lg py-0 bg-gray-5">
<button id="trigger-dropdown-language-chooser-mobile" data-component="dropdown" data-target="dropdown-menu-language-chooser-mobile" class="mt-8 border border-black rounded-lg py-0 bg-gray-5">
<span><%= t("name", scope: "locale" ) %></span>
<%= icon "arrow-down-s-line" %>
<%= icon "arrow-up-s-line" %>
Expand All @@ -12,7 +12,7 @@
<% end %>
</span>
</button>
<div id="dropdown-menu-language-chooser" class="bg-gray-7 relative" aria-hidden="true">
<div id="dropdown-menu-language-chooser-mobile" class="bg-gray-7 relative" aria-hidden="true">
<ul class="menu-bar__language-chooser" role="menu">
<% (available_locales - [I18n.locale.to_s]).each do |locale| %>
<li class="text-black text-xs hover:bg-secondary hover:text-white transition" role="presentation">
Expand Down
5 changes: 3 additions & 2 deletions decidim-core/spec/system/mobile_header_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
let(:organization) { create(:organization) }
let!(:user) { create(:user, :admin, :confirmed, organization:) }

context "when user visit a desktop browser" do
context "when user visits with a desktop browser" do
before do
switch_to_host(organization.host)
visit decidim.root_path
Expand Down Expand Up @@ -60,7 +60,7 @@
end
end

context "when user login is confirmed" do
context "when user is logged in" do
before do
switch_to_host(organization.host)
login_as user, scope: :user
Expand All @@ -69,6 +69,7 @@

it "displays an avatar on the header" do
expect(page).to have_css(".main-bar__avatar")
expect(page).to have_css("#admin-bar")
end
end
end
Expand Down

0 comments on commit 86dfb36

Please sign in to comment.