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.

Admin: small UX improvements

Damian Legawieccd8a524ff37c
diff --git a/admin/app/views/spree/admin/classifications/_classification.html.erb b/admin/app/views/spree/admin/classifications/_classification.html.erb
index a1f4f9b7e2..14bebd1790 100644
--- a/admin/app/views/spree/admin/classifications/_classification.html.erb
+++ b/admin/app/views/spree/admin/classifications/_classification.html.erb
@@ -1,4 +1,4 @@
-<div class="row mx-0 hover-light" id="<%= spree_dom_id(classification) %>" data-sortable-update-url="<%= spree.admin_taxon_classification_path(classification.taxon_id, classification, format: :turbo_stream) %>">
+<div class="row mx-0 hover-light rounded" id="<%= spree_dom_id(classification) %>" data-sortable-update-url="<%= spree.admin_taxon_classification_path(classification.taxon_id, classification, format: :turbo_stream) %>">
<% if classification.taxon.manual_sort_order? %>
<div class="col-1 text-center align-self-center">
<span class="rounded p-2 hover-gray with-tip move-handle cursor-grab">
@@ -8,7 +8,7 @@
<% end %>
<div class="<%= classification.taxon.manual_sort_order? ? 'col-6' : 'col-7' %>">
- <%= link_to spree.edit_admin_product_path(classification.product), data: { 'turbo-frame': '_top' }, class: "d-flex align-items-center text-dark #{classification.taxon.manual_sort_order? ? 'py-3' : 'p-3'}" do %>
+ <%= link_to spree.edit_admin_product_path(classification.product), data: { 'turbo-frame': '_top' }, class: "d-flex align-items-center text-dark hover-none #{classification.taxon.manual_sort_order? ? 'py-3' : 'p-3'}" do %>
<%= render 'spree/admin/shared/product_image', object: classification.product %>
<span class="ml-3">
<%= classification.product.name %>
diff --git a/admin/app/views/spree/admin/products/_filters.html.erb b/admin/app/views/spree/admin/products/_filters.html.erb
index da238c11f8..f6bb97697d 100644
--- a/admin/app/views/spree/admin/products/_filters.html.erb
+++ b/admin/app/views/spree/admin/products/_filters.html.erb
@@ -3,7 +3,7 @@
<%= form_tag request.fullpath, id: "quick-search", class: 'flex-grow-1 mr-lg-2 mb-3 mb-lg-0', method: :get do %>
<div class="form-control d-flex align-items-center py-0 focus-shadow-blue focus-border-blue">
<%= icon 'search', class: 'mr-3 text-muted' %>
- <%= text_field_tag :quick_search, nil, class: "form-control-plaintext js-quick-search px-0", placeholder: Spree.t(:search_by) %>
+ <%= search_field_tag :quick_search, nil, class: "form-control-plaintext js-quick-search px-0", placeholder: Spree.t(:search_by) %>
</div>
<% end %>
diff --git a/admin/app/views/spree/admin/products/form/_status.html.erb b/admin/app/views/spree/admin/products/form/_status.html.erb
index c850cf4bff..c7eb1556a6 100644
--- a/admin/app/views/spree/admin/products/form/_status.html.erb
+++ b/admin/app/views/spree/admin/products/form/_status.html.erb
@@ -8,11 +8,13 @@
<div class="form-group">
<%= f.label :status, Spree.t(:status) %>
<%= help_bubble(Spree.t('admin.products.status_form.status')) if show_product_status_help_bubble? %>
- <% select_html = { class: 'custom-select',
+ <% select_html = {
data: {
- action: 'change->product-form#switchAvailabilityDatesFields',
- 'product-form-target': 'status'
- } } %>
+ controller: 'autocomplete-select',
+ action: 'change->product-form#switchAvailabilityDatesFields',
+ 'product-form-target': 'status'
+ }
+ } %>
<%= f.select(:status, available_status_options(@product), { selected: @product.status }, select_html) %>
<%= f.error_message_on :status %>
</div>
diff --git a/admin/app/views/spree/admin/stock_transfers/index.html.erb b/admin/app/views/spree/admin/stock_transfers/index.html.erb
index 02f7b8d73d..e8d6c8fb53 100644
--- a/admin/app/views/spree/admin/stock_transfers/index.html.erb
+++ b/admin/app/views/spree/admin/stock_transfers/index.html.erb
@@ -1,5 +1,5 @@
<% content_for :page_title do %>
- <%= Spree.t(:stock_transfers) %>
+ <%= Spree.t(:stock) %>
<% end %>
<% content_for :page_tabs do %>
<%= render 'spree/admin/shared/stock_nav' %>
diff --git a/admin/app/views/spree/admin/taxons/_form.html.erb b/admin/app/views/spree/admin/taxons/_form.html.erb
index 5917731e33..bcd3c9c67d 100644
--- a/admin/app/views/spree/admin/taxons/_form.html.erb
+++ b/admin/app/views/spree/admin/taxons/_form.html.erb
@@ -78,13 +78,13 @@
</div>
<div class="card-body border-bottom">
- <div class="form-inline">
- <%= f.label :sort_order %>
- <%= f.select :sort_order, taxon_sort_options_for_select, {}, { class: 'custom-select custom-select-sm ml-lg-3', data: { action: 'change->auto-submit#submitForm' } } %>
+ <div class="d-flex align-items-center">
+ <%= f.label :sort_order, class: 'text-nowrap mr-2 mb-0' %>
+ <%= f.select :sort_order, taxon_sort_options_for_select, {}, { class: 'custom-select custom-select-sm w-auto', data: { action: 'change->auto-submit#submitForm' } } %>
</div>
</div>
- <div class="card-body p-0" style="min-height: 300px">
+ <div class="card-body p-2" style="min-height: 300px">
<div class="d-block overflow-y-auto overflow-x-hidden" style="max-height: 300px">
<%= turbo_frame_tag :classifications, src: spree.admin_taxon_classifications_path(@taxon.id), loading: :lazy do %>
<%= render 'shared/spinner' %>