Workarea 3.0.13

Removes Deleted Products from Recommendations


Workarea 3.0.13 adds the Workarea::CleanProductRecommendations worker. The worker enqueues on Catalog::Product => :destroy and removes the deleted product from the product predictor.

The PR also adds the following tests.

Fixes Re-Indexing of Products after Category Change


Workarea 3.0.13 modifies the Core worker Workarea::IndexCategoryChanges to fix the logic used to determine which products require re-indexing. This fixes featured product order in the Storefront when only the order of featured products is changed in the Admin. The PR changes perform and adds require_index_ids.

The PR also adds the Core worker test Workarea::IndexCategoryChangesTest#test_require_index_ids.

Adds Expiration for Render Content Blocks Cache


Workarea 3.0.13 modifies the Storefront helper Workarea::Storefront::ContentHelper, adding an expiration to the render_content_blocks cache, which was unintentionally omitted in the previous implementation.

The change also adds the Core config Workarea.config.cache_expirations.content_blocks to configure the length of the cache.

Improves Quality of Search Reporting in Admin


Workarea 3.0.13 applies the following improvements/fixes to search reporting in the Admin.

The changes are as follows.

Changes Storefront Logo to PNG for Compatibility with Open Graph


Workarea 3.0.13 replaces the Storefront image file workarea/storefront/logo.svg with workarea/storefront/logo.png to provide a valid image file for use with Open Graph. The PR also modifies core/config/initializers/02_assets.rb to include the new file as a pre-compiled asset. Furthermore, within the Storefront stylesheet workarea/storefront/components/_page_header.scss, the value of $page-header-logo-height changes to reflect a change in logo height.

The following Storefront views are modified to change the path to the image file.

Fixes Taxonomy Content Block When Starting Taxon is Deleted


Workarea 3.0.13 changes the Storefront view model module Workarea::Storefront::TaxonLookup, modifying starting_taxon and taxons to avoid raising an exception when the starting taxon of a taxonomy content block cannot be found (was deleted).

The change adds the Storefront test case Workarea::Storefront::ContentBlocks::TaxonomyViewModelTest with tests test_starting_taxon and test_taxons to confirm the fix.

The PR also modifies the Admin partial workarea/admin/navigation_taxons/_select.html.haml to output a "not found" message rather than a taxon selector UI when the selected taxon is not found. A translation for this message is added as to the Admin locale file admin/config/locales/en.yml.

Changes Behavior of Menu Deletion in Admin


Workarea 3.0.13 modifies the destroy action on the Admin controller Workarea::Admin::NavigationMenusController to de-activate, rather than destroy, the menu when a current release is present. This change fixes the unexpected behavior of deleting the menu from the live site.

The change also adds the test Workarea::Admin::MenusIntegrationTest#test_deactivates_menu_when_deleting_on_a_release.

Fixes Display of Search Customizations Activity


Workarea 3.0.13 modifies the Admin partial workarea/admin/activities/_search_customization_destroy.html.haml to use the correct translation and avoid raising an exception in some cases.

Ensures Invalid Shipping Options When No Shipping Service


Workarea 3.0.13 changes Core model method Workarea::Checkout::Shipping::Options#valid? to return false when the current checkout's shipping service is blank. This change avoids an undesirable state exposed when using the Storefront REST API.

The PR also adds the Core model test case Workarea::Checkout::ShippingOptionsTest, which was converted from RSpec and includes the following instance methods.

Ignores 404s When Deleting Documents from Elasticsearch


Workarea 3.0.13 modifies the Core library method Workarea::Elasticsearch::Index#delete to not raise an exception when the document to be deleted is not found.

Fixes Non-Human-Readable Content Block Names in Admin

#2733, #2741

Workarea 3.0.13 modifies Core model method Workarea::Content::BlockName#to_s to avoid displaying non-human-readable content block names in the Admin.

The change also adds the Core model test Workarea::Content::BlockNameTest#test_name_is_human_readable.

Improves Product Primary Image Alt Text


Workarea 3.0.13 modifies the Storefront partial workarea/storefront/products/templates/_generic.html.haml to improve the primary image alt text. The change also internationalizes the value, which was a static string. The PR modifies storefront/config/locales/en.yml, adding the translation workarea.storefront.products.image_alt_attribute.

Improves VCR Error Messages


Workarea 3.0.13 modifies the Testing library module Workarea::Testing::CassettePersister, implementing absolute_path_to_file, which allows VCR to provide improved error messages when a found cassette does not match the URL being testing. The change also modifies [] on the same module.

Now on GitHub