mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Name and Producer columns grow to fill and other tweaks
If neither are visible, the first column on the left (eg image) will grow. But that's not a likely scenario. Min-widths help manage sizes on smaller screens in Chrome. The title for Inherits Properties gets cut off, but I think it's better than cutting off content. Oh look, it fixed a spec too!
This commit is contained in:
@@ -15,19 +15,19 @@
|
||||
|
||||
%table.products{ 'data-column-preferences-target': "table" }
|
||||
%colgroup
|
||||
-# The `min-width` property works in Chrome but not Firefox.
|
||||
-# The `min-width` property works in Chrome but not Firefox so is considered progressive enhancement.
|
||||
%col{ 'data-column-preferences-name': :image, width:"56px" }= # (image size + padding)
|
||||
%col{ 'data-column-preferences-name': :name, width:"15%", style:"min-width: 6em" }= # (grow to fill)
|
||||
%col{ 'data-column-preferences-name': :sku, width:"10%", style:"min-width: 6em" }
|
||||
%col{ 'data-column-preferences-name': :name, style:"min-width: 6em" }= # (grow to fill)
|
||||
%col{ 'data-column-preferences-name': :sku, width:"8%", style:"min-width: 6em" }
|
||||
%col{ 'data-column-preferences-name': :unit_scale, width:"8%" }
|
||||
%col{ 'data-column-preferences-name': :unit, width:"8%" }
|
||||
%col{ 'data-column-preferences-name': :price, width:"5%", style:"min-width: 5em" }
|
||||
%col{ 'data-column-preferences-name': :on_hand, width:"10%"}
|
||||
%col{ 'data-column-preferences-name': :producer, width:"15%"}
|
||||
%col{ 'data-column-preferences-name': :producer, style:"min-width: 6em" }= # (grow to fill)
|
||||
%col{ 'data-column-preferences-name': :category, width:"8%" }
|
||||
%col{ 'data-column-preferences-name': :tax_category, width:"8%" }
|
||||
%col{ 'data-column-preferences-name': :inherits_properties, width:"8%" }
|
||||
%col{ width:"1%", style:"min-width: 5em"}= # Actions
|
||||
%col{ 'data-column-preferences-name': :inherits_properties, width:"5%" }
|
||||
%col{ width:"5%", style:"min-width: 3em"}= # Actions
|
||||
%thead
|
||||
%tr
|
||||
%td.form-actions-wrapper{ colspan: 12 }
|
||||
|
||||
@@ -1038,7 +1038,6 @@ RSpec.describe 'As an enterprise user, I can manage my products', feature: :admi
|
||||
tomselect_search_and_select(category_to_select, from: "Category")
|
||||
|
||||
sleep(0.1)
|
||||
pending "unable to select tax_category dropdown, possibly because category is still open and too big, covering the tax_cat." # rubocop:disable Layout/LineLength
|
||||
validate_tomselect_with_search!(
|
||||
page, "Tax Category",
|
||||
tax_categories_search_selector
|
||||
|
||||
Reference in New Issue
Block a user