Workarea 3.2.9

Move Impersonation to Base Controller to Prevent Unexpected Behavior

In the megabuild, a Rails application that depends on every plugin in our ecosystem and tested against before every release, impersonation was causing some unexpected test failures related to the order of firing before_action callbacks. To remedy this issue, we've moved impersonation to Workarea::ApplicationController and configure it based on the session with prepend_before_action. This ensures that impersonation is configured before any other callbacks on the controller or action, and prevents random errors in your build.

Issues

Pull Requests

Commits

Fix Duplication of Release Names in Primary Nav

When on a current release and viewing the primary navigation in admin, release names are no longer duplicated as a result of the current release and query for all releases not checking for uniqueness before rendering to the page. We're now ensuring releases are unique by ID before showing them onto the page.

Issues

Pull Requests

Commits

Fix Error When Finding Region by Geolocation on Localhost

Because localhost and 127.0.0.1 don't provide geolocation features, and the Workarea::Geolocation#region method wasn't set up to handle if a geocoder query turned up no results, some developers experienced errors when attempting to work with geolocation locally. To remedy this, we're now checking whether the Geocoder request didn't turn up with any results, and falling back to nil if that's the case, since Geocoder is the fallback for geolocation HTTP headers.

Issues

Pull Requests

Commits

Fix Duplicate Product IDs When Editing Products in Admin

In category featured products or product/variant details editing, it's possible to receive a duplicate ID warning when the WORKAREA.cloneableRows JS module activates and clones an existing row to enable editing embedded resources. As part of our larger quest to rid the admin of duplicate IDs, and much like other changes in this release, we're explicitly setting id: nil when using Rails form helpers in order to disable ID generation for those elements.

Issues

Pull Requests

Commits

Describe the Locale Icon in Admin Toolbar

Add the locale "globe" icon to the admin toolbar, and include a tooltip to explain how it works. This helps new users get used to locale-specific content in the admin.

Issues

Pull Requests

Commits

Disable Support For Ruby 2.5+

After some usage of 2.5.0 and 2.5.1 by platform developers, we began to notice strange, non-determinisitic problems related to delegation. This issue revealed itself in seedingn, running tests, or within checkout steps, and the root cause was always traced back to a seemingly incorrect delegation of a method back down to a parent object.

For these reasons, we've chosen to disallow usage of Ruby 2.5+ for now, until these issues can be sufficiently addressed. This is truly an unsolved mystery. If you or anyone else knows the whereabouts of the original way delegation used to work in Ruby, please call the number on your screen.

Issues

Pull Requests

(none)

Commits

Fix Syntax Error When Booting App on Ruby 2.3.0 While Skipping Scheduled Jobs

For applications that skip scheduled jobs and are also running on Ruby 2.3.0, a syntax error would occur when booting the app due to syntax that is not supported until Ruby 2.4.0. We've replaced this syntax with something that Ruby 2.3 and below can handle.

Issues

Pull Requests

Commits

Add New Content Presets Asynchronously

When adding a new content preset in the middle of a workflow, the page refresh used to break you out of the workflow and prevent you from finishing. We're now submitting this tooltip form asynchronously, so it will add a new content preset for you in the background and allow admins to continue editing their workflow.

Issues

Pull Requests

Commits

Lock Down Rufus-scheduler

Due to a compatibility issue in sidekiq-cron related to its usage of rufus-scheduler, errors can occur if Bundler installs a newer version of rufus-scheduler than what sidekiq-cron is expecting. To remedy this issue, we've locked down the version of rufus-scheduler to ~> 3.4.2 in the platform until sidekiq-cron is able to release a patch that remedies the issue.

Issues

Pull Requests

Commits

Remove "release Version X.x.x" From Changelog Task

In the changelog.rake task, commits starting with the message "Release version" were not omitted from the generated changelog. These commits don't represent actual changes, but rather version bumps and releases to the gem server. These commits are now omitted from future changelog generation.

Issues

Pull Requests

Commits

Remove Content Block Field IDs to Prevent Duplicate ID Errors

In our quest to remove duplicate IDs from the admin, we discovered that content block fields can be rendered on the page multiple times, and it's difficult to tell when that will happen. By default, Rails adds IDs to its form tag helpers, but in this case we want to render the form multiple times on the page, so it's not useful for us to have those IDs. We've now removed IDs from the content block field partials that were experiencing duplicate ID errors.

Issues

Pull Requests

Commits

Add Translation For Heading of Recommendations Page in the Storefront

On the user recommendations page, the "Recommendations For You" text was not an I18n translation. The raw text is now in the Storefront's locale file and renders to the view with the key workarea.storefront.recommendations.personalized_heading.

Issues

Pull Requests

Commits

Prevent Duplicate Flash Messages When Caching Enabled

With caching enabled, it's still possible for duplicate flash messages to appear on the page. Using a JavaScript Set-like object, we're now logging all flash messages to appear on the page and ensuring that none of them appear twice.

Pull Requests

Commits

Now on GitHub