Skip to content

Commit

Permalink
fix: align dropdown and reduce vertical spacing for improved UX
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdeus committed Jan 22, 2025
1 parent 8937ff7 commit 11cf9f3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion decidim-budgets/app/packs/stylesheets/budgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
}
}

&__projects {
@apply -mt-12 sm:mt-0;
}



&__card__list-project {
@apply ml-auto rounded py-3 px-4 bg-background w-[30%] min-w-[120px] flex flex-col justify-center items-center lg:flex-row lg:justify-around lg:place-items-center;
}
Expand Down Expand Up @@ -130,7 +136,7 @@
}

&__list--header {
@apply flex items-center justify-between;
@apply flex items-center -ml-2 sm:ml-0;
}

&-list {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= order_selector available_orders, i18n_scope: "decidim.budgets.projects.orders" %>
<%= order_selector available_orders, i18n_scope: "decidim.budgets.projects.orders", class_css: "items-start pl-[18px]" %>
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</section>
<% end %>

<section id="projects" class="layout-main__section layout-main__heading">
<section id="projects" class="layout-main__section layout-main__heading budget__projects">
<%= render partial: "projects" %>
</section>
<% else %>
Expand Down
3 changes: 2 additions & 1 deletion decidim-core/app/helpers/decidim/orders_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module OrdersHelper
def order_selector(orders, options = {})
render partial: "decidim/shared/orders", locals: {
orders:,
i18n_scope: options[:i18n_scope]
i18n_scope: options[:i18n_scope],
class_css: options[:class_css]
}
end

Expand Down
2 changes: 1 addition & 1 deletion decidim-core/app/views/decidim/shared/_orders.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= icon "arrow-up-s-line" %>
<span><%= t("#{i18n_scope}.label") %></span>
</button>
<div id="dropdown-menu-order" class="order-by">
<div id="dropdown-menu-order" class="order-by <%= class_css %>">
<% orders.each do |order_name| %>
<%= order_link order_name,
i18n_scope:,
Expand Down

0 comments on commit 11cf9f3

Please sign in to comment.