Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

[Skip CI] Small admin UI improvements

Damian Legawieca56a2977cd67
diff --git a/admin/app/assets/stylesheets/spree/admin/components/_cards.scss b/admin/app/assets/stylesheets/spree/admin/components/_cards.scss
index 3be9f14013..2580f9303e 100644
--- a/admin/app/assets/stylesheets/spree/admin/components/_cards.scss
+++ b/admin/app/assets/stylesheets/spree/admin/components/_cards.scss
@@ -45,8 +45,9 @@
.card-header {
display: flex;
align-items: center;
- height: 50px;
+ height: 54px;
border-bottom: 1px solid $gray-50;
+ padding-right: 1rem;
.card-title {
margin-bottom: 0;
diff --git a/admin/app/assets/stylesheets/spree/admin/components/_main.scss b/admin/app/assets/stylesheets/spree/admin/components/_main.scss
index d8c0513d57..70573d65be 100644
--- a/admin/app/assets/stylesheets/spree/admin/components/_main.scss
+++ b/admin/app/assets/stylesheets/spree/admin/components/_main.scss
@@ -3,7 +3,7 @@
}
#page-header {
- height: 70px;
+ height: 80px;
display: flex;
align-items: center;
background-color: $body-bg;
diff --git a/admin/app/assets/stylesheets/spree/admin/components/_tables.scss b/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
index 2c7b6a012a..01cc964fa3 100644
--- a/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
+++ b/admin/app/assets/stylesheets/spree/admin/components/_tables.scss
@@ -79,7 +79,7 @@ table.table {
tr:hover:not(.active):not(.sortable-chosen) {
td {
- background-color: rgba($gray-25, 0.5);
+ background-color: rgba($gray-25, 0.75);
}
}
diff --git a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss b/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
index d79e5f904a..acd4d9e968 100644
--- a/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
+++ b/admin/app/assets/stylesheets/spree/admin/global/_variables.scss
@@ -73,7 +73,7 @@ $border-radius: 0.5rem !default;
$border-radius-sm: 0.4rem !default;
$border-radius-lg: 0.75rem !default;
$border-color: rgba($gray-100, 0.85) !default;
-$input-border-color: $border-color !default;
+$input-border-color: rgba($gray-200, 0.85) !default;
$list-group-border-color: $border-color !default;
$list-group-hover-bg: $gray-25 !default;
$list-group-active-bg: $action !default;
@@ -85,8 +85,8 @@ $table-border-color: $border-color !default;
$card-border-color: $border-color !default;
$input-btn-focus-width: 0.18rem !default;
-$card-spacer-y: .75rem !default;
-$card-spacer-x: 1rem !default;
+$card-spacer-y: 1rem !default;
+$card-spacer-x: 1.25rem !default;
$component-active-bg: $blue !default;
@@ -102,7 +102,7 @@ $link-color: $primary !default;
$link-hover-decoration: underline !default;
$btn-active-box-shadow: inset 0 3px 5px rgba($black, .025) !default;
-$btn-disabled-opacity: 0.3 !default;
+$btn-disabled-opacity: 0.7 !default;
$nav-link-padding-y: .5rem !default;
$nav-link-padding-x: .6rem !default;
@@ -219,8 +219,9 @@ $code-color: $body-color !default;
$code-bg: $gray-50 !default;
$list-group-bg: transparent !default;
-$list-group-item-padding-x: 1rem !default;
+$list-group-item-padding-x: 1.25rem !default;
+$list-group-item-padding-y: 0.75rem !default;
$header-bg: $body-bg !default;
$header-height: 54px !default;
$sidebar-width: 220px !default;
diff --git a/admin/app/assets/stylesheets/spree/admin/shared/_base.scss b/admin/app/assets/stylesheets/spree/admin/shared/_base.scss
index d19e1307fc..5f74c44f9a 100644
--- a/admin/app/assets/stylesheets/spree/admin/shared/_base.scss
+++ b/admin/app/assets/stylesheets/spree/admin/shared/_base.scss
@@ -10,6 +10,12 @@ body {
overflow-y:scroll;
}
+body * {
+ &:focus {
+ outline-color: theme-color('blue') !important;
+ }
+}
+
html, body {
overscroll-behavior: none;
}
diff --git a/admin/app/views/spree/admin/promotion_actions/new.html.erb b/admin/app/views/spree/admin/promotion_actions/new.html.erb
index e368a9a396..644eec3f65 100644
--- a/admin/app/views/spree/admin/promotion_actions/new.html.erb
+++ b/admin/app/views/spree/admin/promotion_actions/new.html.erb
@@ -9,20 +9,16 @@
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion_action } %>
<% if @promotion_action.type.nil? %>
<%= render 'spree/admin/shared/spinner' %>
- <ul class="list-group">
- <% options_for_promotion_action_types(@promotion).each do |action_type| %>
- <% key = action_type.to_s.demodulize.underscore %>
- <li class="list-group-item p-0 overflow-hidden">
- <%= link_to spree.new_admin_promotion_action_path(@promotion, promotion_action: { type: action_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-light text-primary', data: { turbo_prefetch: false } do %>
- <%= radio_button_tag :type, action_type, checked: @promotion_action.type == action_type %>
- <div class="ml-3">
- <h6><%= Spree.t("promotion_action_types.#{key}.name") %></h6>
- <p class="text-muted mb-0"><%= Spree.t("promotion_action_types.#{key}.description") %></p>
- </div>
- <% end %>
- </li>
- <% end %>
- </ul>
+ <% options_for_promotion_action_types(@promotion).each do |action_type| %>
+ <% key = action_type.to_s.demodulize.underscore %>
+ <%= link_to spree.new_admin_promotion_action_path(@promotion, promotion_action: { type: action_type }), class: 'd-flex align-items-top w-100 py-2 px-3 hover-gray rounded-lg mb-2', data: { turbo_prefetch: false } do %>
+ <%= radio_button_tag :type, action_type, checked: @promotion_action.type == action_type %>
+ <div class="ml-3">
+ <h6><%= Spree.t("promotion_action_types.#{key}.name") %></h6>
+ <p class="text-muted mb-0"><%= Spree.t("promotion_action_types.#{key}.description") %></p>
+ </div>
+ <% end %>
+ <% end %>
<% else %>
<p class="text-muted">
<%= @promotion_action.human_description %>
diff --git a/admin/app/views/spree/admin/promotions/_actions.html.erb b/admin/app/views/spree/admin/promotions/_actions.html.erb
index 3934a156fb..b929831fd3 100644
--- a/admin/app/views/spree/admin/promotions/_actions.html.erb
+++ b/admin/app/views/spree/admin/promotions/_actions.html.erb
@@ -1,5 +1,5 @@
<div class="card mb-4">
- <div class="card-header d-flex justify-content-between border-0 px-2">
+ <div class="card-header d-flex justify-content-between px-3 border-0">
<h5 class="card-title">
<%= icon('bolt', class: 'mr-2') %>
<%= Spree.t(:promotion_actions) %>
diff --git a/admin/app/views/spree/admin/promotions/_rules.html.erb b/admin/app/views/spree/admin/promotions/_rules.html.erb
index f344b3997e..7cb5926db7 100644
--- a/admin/app/views/spree/admin/promotions/_rules.html.erb
+++ b/admin/app/views/spree/admin/promotions/_rules.html.erb
@@ -1,5 +1,5 @@
<div class="card mb-4">
- <div class="card-header d-flex justify-content-between px-2">
+ <div class="card-header d-flex justify-content-between px-3">
<h5 class="card-title">
<%= icon('checklist', class: 'mr-2') %>
<%= Spree.t(:rules) %>