Skip to content

Commit

Permalink
Remove taxon icons
Browse files Browse the repository at this point in the history
These icons are inconsistently used across instances and have already been removed in a few places in the app in the mobile UX redesign.
  • Loading branch information
Matt-Yorkley committed Jul 1, 2020
1 parent e69d3e5 commit 301b2a7
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 27 deletions.
3 changes: 0 additions & 3 deletions app/models/spree/taxon_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Spree::Taxon.class_eval do
has_many :classifications, dependent: :destroy

attachment_definitions[:icon][:path] = 'public/images/spree/taxons/:id/:style/:basename.:extension'
attachment_definitions[:icon][:url] = '/images/spree/taxons/:id/:style/:basename.:extension'

# Indicate which filters should be used for this taxon
def applicable_filters
fs = []
Expand Down
11 changes: 0 additions & 11 deletions app/serializers/api/taxon_image_serializer.rb

This file was deleted.

6 changes: 1 addition & 5 deletions app/serializers/api/taxon_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@ class Api::TaxonSerializer < ActiveModel::Serializer
cached
delegate :cache_key, to: :object

attributes :id, :name, :permalink, :icon, :pretty_name, :position, :parent_id, :taxonomy_id

def icon
object.icon(:original)
end
attributes :id, :name, :permalink, :pretty_name, :position, :parent_id, :taxonomy_id
end
1 change: 0 additions & 1 deletion app/views/producers/_fat.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
%p.trans-sentence
%div
%span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"}
%render-svg{path: "{{taxon.icon}}"}
%span{"ng-bind" => "::taxon.name"}
%div
%span.fat-properties{"ng-repeat" => "property in producer.supplied_properties"}
Expand Down
1 change: 0 additions & 1 deletion app/views/shop/products/_summary.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
%span{"ng-bind" => "::enterprise.name"}
.small-2.medium-2.large-1.columns.text-center
.taxon-flag
%render-svg{path: "{{::product.primary_taxon.icon}}"}
1 change: 0 additions & 1 deletion app/views/shops/_fat.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
.trans-sentence
%div
%span.fat-taxons{"ng-repeat" => "taxon in hub.taxons"}
%render-svg{path: "{{taxon.icon}}"}
%span{"ng-bind" => "::taxon.name"}
%div
%span.fat-properties{"ng-repeat" => "property in hub.distributed_properties"}
Expand Down
5 changes: 0 additions & 5 deletions app/views/spree/admin/taxons/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
%br/
= @taxon.permalink.split("/")[0...-1].join("/") + "/"
= text_field_tag :permalink_part, @permalink_part
= f.field_container :icon do
= f.label :icon, t(:icon)
%br/
= f.file_field :icon
%img{src: @taxon.icon(:original)}
= f.field_container :meta_title do
= f.label :meta_title, t(:meta_title)
%br/
Expand Down

0 comments on commit 301b2a7

Please sign in to comment.