Workarea 3.3.3

Load Mailer Previews in All Environments Except Production

Use config.action_mailer.show_previews to determine whether to cycle through all mailer previews provided by the platform and load them into the environment. This setting has the default value !Rails.env.production?, meaning it will be true as long as we're not in the production environment. This change also removes some "over-configuration" in core's config/routes.rb , as we were replicating the routes that Rails already gives us out-of-box.

Issues

Pull Requests

Commits

Fix Aria-label Text in Region Select

The original aria-label value for this element was the i18n text at workarea.storefront.addresses.country. It's changed to the correct key workarea.storefront.addresses.region , so that screen readers and other accessbility devices can know what the element is.

Issues

Pull Requests

Commits

Automatically Configure Dragonfly With Blank Region

We were automatically configuring Dragonfly to use S3 if one specified the :region field in the configuration. This caused an issue when attempting to set that field using the $WORKAREA_S3_REGION environment variable. We are now checking for the :bucket_name to be available in configuration somewhere, since that differs on a per-project basis, in order to apply this configuration. This should allow setting any of the $WORKAREA_S3_* environment variables used by Kubernetes to configure the app containers.

Issues

Pull Requests

Commits

Check For Positive Sellable Count Before Using It to Determine Inventory Availability

When upgrading applications to v3.3.0, the Inventory::Sku#sellable field is typically unset in the DB, causing inventory capture to fail. We altered the logic of Inventory::Capture to consider the sellable field if the attribute is actually set in the database, otherwise, it will behave as it did in v3.2 and below.

Issues

Pull Requests

Commits

Add Dragonfly-s3_datastore As a Dependency

We have default configuration that relies on the dragonfly-s3_datastore gem's availability in certain environments, so adding this as a dependency of the platform ensures version compatability and testability for the future.

Issues

Pull Requests

Commits

Omit Current Sku From Product Cache Key When Not Selected

Originally, we defaulted the value of Storefront::ProductViewModel#current_sku to that of the first SKU in the product's list of variants. This was not accurately representing the state in which there was no selection made, thus causing problems with the template showing incorrect prices with caching enabled. We're now omitting this data point from the cache key if no SKU selection was made, which prevents overwriting the cache entries with incorrect data.

Issues

Pull Requests

Commits

Use Elasticsearch Client to Determine Health of Cluster

In deployed environments, we use [Easymon][] to determine the health of the application and its dependent services, such as Elasticsearch and MongoDB. For Elasticsearch, we're now using the client's transport to query the server for availability and general health, rather than making a raw JSON HTTP call to the server's endpoint.

Issues

Pull Requests

Commits

Remove Memoization of User.console

The console user was typically found and memoized at Workarea::User.console, but in a multi-site environment that record may be different depending on the site database. We've removed this memoization from the method, and User.console will now query the DB every time it's called.

Issues

Pull Requests

Commits

Hide Non-purchasable Products In Recommendations

If a product is not purchasable, we are no longer including it in product recommendations. This is so we don't recommend a product that a customer cannot put into their cart.

Issues

Pull Requests

Commits

Now on GitHub