Workarea 3.0.31

Fix validation error when region select is auto-filled

When the region select on an addresses form is auto-selected, due to the selection of a country, the addresses form will not be submittable because the actual value of the region select is no longer available. This is due to the way we hide the option tags inside our region select that don't pertain to the current country. We're now removing all option tags in the region select that don't pertain to the current country, which prevents the validation error from displaying unnecessarily in checkout.

Solved by Darielle Davis on the LimeCrime project. We ported her code into v3.x so all future projects can benefit. Thanks Dari!

Issues

Pull Requests

Commits

When loading featured products, we were running the same query each time we looped over the collection of featured products to return them in the same order of insertion. By converting to an array before sorting each featured product and wrapping the models in view models, we're preventing execution of the query unnecessarily.

Issues

Pull Requests

Commits

Fix error in auto-expiring Redis client for Geocoder

Since we cache Geocoder responses in Redis, a recent change to the underlying Redis ruby client forced us to implement our own #[] and #[]= methods on the cache store we're using for Geocoder. Due to an issue with the order of arguments in the Redis#setex method, errors began occurring after geocoded data was added to the application. The order of arguments has been fixed, and newly cached Geocoder responses should be properly formatted and evicted at the right time.

Discovered by John Varady. Thanks John!

Issues

Pull Requests

Commits

Editing large sets of featured products caused request timeouts due to inlined Sidekiq::Callbacks, which could initiate the Workarea::IndexCategoryChanges many different times. We're now ensuring that all indexing jobs occur in the background so that this doesn't happen.

Issues

Pull Requests

Commits

Fix PingHomeBaseTest adding extra plugins

Testing Workarea::PingHomeBase causes extra plugins to appear in the Workarea::Plugin.installed list. Exclude these test plugins from the list so we're not making additional passes for things like decorators, assets, Ruby code, and other hot-loaded items.

Issues

Pull Requests

Commits

When URLs with params like ?color=Red come through and additional filters are "shoveled" into the URL query param, the new URL would look like ?color=RedBlue because the new selection was just shoveled onto the param if it already existed. We're now ensuring that the param is an Array before generating the URL, so filter params will always come in like e.g. ?color[]=Red&color[]=Blue.

Discovered by Jordan Stewart. Thanks Jordan!

Issues

Pull Requests

Commits

Make return values of WORKAREA.currentUser more consistent

Developers interchangeably use the refresh() and gettingUserData strategies for getting user data from the system, but these two methods differ in their return value. Make the WORKAREA.currentUser.refresh() method also return the WORKAREA.currentUser.gettingUserData promise that it defines, or is already defined.

Issues

Pull Requests

Commits

Now on GitHub