Workarea 3.1.0
Adds Order Copying
46967c84a5a, b7592d3925f, b37d2159a80
Workarea 3.1 adds a Ruby API for order copying.
- Adds
Workarea::CopyOrder
service - Does not copy fields specified in
Workarea.config.copy_order_ignored_fields
- Modifies workarea/admin/orders/show.html.haml, but most UI work is completed in the Workarea OMS plugin
Adds Fulfillment & Payment Statuses
#2726, #2743, #2727, #2721, #2706, 2f052fedd5d, #2671
Workarea 3.1 adds the concept of payment status and decouples fulfillment status from order status. Fulfillment and payment statuses are displayed in the Admin.
- Adds state component to Admin UI
Workarea.config.status_state_indicators
stores a mapping of fulfillment and payment statuses to state component modifiers- Displays fulfillment and payment status within the order cards
- Fulfillment and payment statuses are each a facet on the order and a filter in the Admin UI
OrderFulfillmentStatus
is deprecated and no longer used to implementWorkarea::Search::Admin::Order#order_status
- Adds
Workarea::Payment::Status
module with various status calculator status classes Workarea.config.payment_status_calculators
contains the list of calculators used to determine payment status- Converts orders and payment transactions index pages to use tables instead of summaries
- Abstracts a checkbox component from the summary component to allow its use in the new index tables
Adds Orders Timeline
#2635, 00480af01a4, 2b33c68a666
Workarea 3.1 adds an Admin order timeline, which is similar in function to other Admin activity.
- Adds Admin route, controller action, view model, helper, views, and partials for orders timeline
- Adds factory method
create_transaction
for creating payment transactions in tests - Changes fulfillment logic so that all items shipped or canceled together have the same values for both
created_at
andupdated_at
- Adds MongoDB index for
Workarea::Payment::Transaction#payment
Adds User Creation Admin Workflow
#2558, 18c052bc7bb, 29fff0c372e, #2744, #2755
Workarea 3.1 allows for the creation of new users through the Admin.
- Adds Admin route, controller, and views for create users workflow
- The current user must be a permissions manager to create a new user
- The workflow optionally delivers an account creation email
- Extracts Admin
UserParams
into its own module
Adds User Avatars
Workarea 3.1 adds user avatars and displays them in the Admin. Avatars may be user-provided but fall back to Gravatar.
- Adds
Workarea::User::Avatar
module, which is included inWorkarea::User
avatar_image_url
defaults to GravatarWorkarea.config.gravatar_options
sets Gravatar options- Adds avatar fields, including file upload, to workarea/admin/users/edit.html.haml
- Adds
:avatar
image processor to Dragonfly initializer - Adds
Workarea::Factories::User
module for user-related test factories
Adds "Publish Now" Permission
#2576, #2628, #2678, #2759, #2652, #2745, #2750
Workarea 3.1 adds a "can publish now" permission and modifies the Admin UI to honor this permission. Users without this permission must select a release in order to make changes.
- Adds
can_publish_now
permission toUser::Authorization
- Extracts Admin publish controls to workarea/admin/releases/_publish.html.haml
- Adds
check_publishing_authorization
method toWorkarea::Admin::Publishing
controller module - Adds
check_publishing_authorization
before action to various Admin controllers - Add
WORKAREA.disablePublishNow
JavaScript module to disable publishing controls as needed - Displays disabled buttons in a "disabled" state with tooltip explaining why the button is disabled
Adds Sequential Product Editing
#2571, 2cfeed0a4b5, 6d640e3a7b9, #2575, #2747
Workarea 3.1 adds sequential product editing, which allows an admin user to select products in bulk and edit them sequentially (in an editing loop).
- Adds model
Workarea::BulkAction::SequentialProductEdit
- Adds Admin route, controller, view model, and views for sequential product editing
- Extracts
Workarea::Admin::BulkVariantSaving
fromWorkarea::Admin::CreateCatalogProductsController
- Modifies
Workarea::BulkAction
to convert a query-based bulk action to an ID-based bulk action when possible
Adds Bulk Product Editing with a Release
#2539, #2565, #2564, c91a2d2f8b5
Workarea 3.1 modifies Workarea::BulkAction::ProductEdit
and its associated Admin controller and views to allow bulk product editing with a release.
Adds Product Copying
Workarea 3.1 adds a Ruby API for copying a product and provides an Admin workflow for this process.
- Adds the
Workarea::CopyProduct
service Workarea.config.product_copy_default_attributes
sets default values to be used for particular fields on the copied product (for example, setsactive
tofalse
- Adds Admin route, controller, and views for copying a product
- Adds Admin JavaScript module
WORKAREA.productCopyIDs
Adds Variant Ordering
Workarea 3.1 allows admins to re-order variants in the Admin UI. The order is honored when displaying variants in the Storefront.
- Modifies
Workarea::Catalog::Variant
to includeWorkarea::Ordering
- Adds Admin route and controller action for sorting variants
- Modifies variants Admin index page, allowing variants to be sorted with mouse/pointer
- Adds Admin JavaScript module
WORKAREA.sortVariants
to handle sorting
Adds Storefront Preview Links to Admin Creation Workflows
Workarea 3.1 adds "preview in Storefront" links within several Admin creation workflows. The change modifies many Admin views to create a consistently positioned auxiliary navigation, within which the preview links appear.
Adds Automatic Navigation Redirects
Workarea 3.1 adds the callbacks worker Workarea::RedirectNavigableSlugs
, which enqueues on Navigable#update
if the Navigable#slug
has changed. The worker creates a Navigation::Redirect
within each locale based on the changed slug. This worker is disabled by default, but is enabled for Admin UI requests by the Workarea::Admin::ApplicationController
.
Adds Restore Functionality (and "Trash" View) to Admin
5dd586d5aa4, #2632, 6038b5434a0, 89212ff576c, #2640, 35b70445561
Workarea 3.1 allows admins to restore deleted model instances and provides a "Trash" screen for viewing models that can be restored.
- Adds "restore" links for deleted items within various Admin activity partials
- Adds route, controller, and view for "Trash" view of activity, which is activity which can be restored
- Adds
can_restore
user permission, which is required for a user to restore a model - Restoring a model re-creates it from a cache in the Mongoid audit log
- Changes 'mongoid-audit_log' dependency to
'>= 0.5.0'
- Removes
dependent: :destroy
behavior fromCommentable#comments
,Contentable#content
, andReleasable#changesets
- Extends Dragonfly to not delete assets from the data store
Adds HTML Sitemap to Storefront
#2507, #2525, #2543, 1c8fa2175fb, c3cea6b8835, 7744f1c9daf
Workarea 3.1 adds an HTML sitemap to the Storefront in response to requests from retailers and SEO companies.
- Adds MongoDB indexes to
Workarea::Navigation::Taxon
fornavigable_id
andurl
- Adds
Workarea::TaxonomySitemap
query for retrieving taxons - Adds Storefront route, controller, and views for rendering Storefront sitemap
- Modifies robots.txt file to allow the sitemap path
- Adds sitemap and sitemap-pagination Storefront components
- Adds system page links, including the sitemap, to the application footer
- Adds append point to the application footer to allow plugins to append additional system pages
Adds Prompt for Unsaved Changes in Admin
#2625, #2636, #2649, #2665, #2725
Workarea 3.1 adds the Admin JavaScript module WORKAREA.unsavedChanges
, which prompts Admin users when navigating away from unsaved changes in the Admin UI. The functionality applies only to forms with a data-unsaved-changes
attribute and ignores fields with a data-unsaved-changes-ignore
attribute.
Adds "Spacing" Options to Divider Content Block Type
Workarea 3.1 modifies the Divider content block type, allowing for "spacer" content blocks that create visual separation, with or without a visible border.
- Adds Height and Show line fields to the Divider content block type
- Adds small, medium, and large modifiers to the Storefront divider-content-block component
- Modifies the
Workarea::Content::BlockDraft
model to typecast data before save
Adds Boolean Content Field Type
Workarea 3.1 adds the Workarea::Content::Fields::Boolean
content field type and the associated Admin partial, workarea/admin/content_blocks/_boolean.html.haml.
Disables Checkout Buttons on First Click
Workarea 3.1 disables checkout "continue" buttons on first click to prevent multiple submissions.
- Requires the jQuery UJS JavaScript library in the Storefront
- Uses
data-disable-with
on each of the "continue" buttons in checkout to disable the button on first click - Modifies the Storefront loading component and adds the inline and light modifiers for use within disabled buttons
Changes Storefront Primary Image Logic
Workarea 3.1 adds the Storefront enumerable Workarea::Storefront::ProductViewModel::ImageCollection
and returns an instance of this collection as the product view model images
. This change ensures the current product image matches the facets selected by the user when available.
Changes Fulfillment Logic
#2760, #2762, c47f10e35b5, #2653
Workarea 3.1 makes the following minor changes to fulfillment logic.
- Modifies the
CreateFulfillment
service to prevent creating duplicate fulfillment items under certain circumstances - Modifies the
Fulfillment
model, extractingmark_item_shipped
fromship_items
, allowing items to be marked shipped without triggering a transactional email (useful in the case of digital items) - Opens tracking links within the fulfillment Admin screen within a new window
Applies Admin UI Changes to Support OMS Plugin
Workarea 3.1 applies the following changes to support upcoming changes in the Workarea OMS plugin.
- Modifies margin styles on the Admin property component
- Modifies the styles of the Admin text-button component to support icons
- Adds "Trash" link to "Settings" dashboard navigation
- Adds append point to "Settings" dashboard navigation
Improves Usability of Storefront Form Fields
Workarea 3.1 modifies attributes on various form fields in the Storefront to improve usability.
Deprecates Auto Filter Middleware for Storefront Search
Workarea 3.1 removes Workarea::Search::StorefrontSearch::AutoFilter
from the configured Storefront search middleware (Workarea.config.storefront_search_middleware
) and prints a deprecation warning when this middleware is included in that configuration. This middleware is marked for removal in Workarea 3.2.
Upgrades to Rails 5.1
Workarea updates its Rails dependency to Rails 5.1.
- Changes various Ruby dependencies in workarea-core.gemspec for compatibility with Rails 5.1
- Changes minor implementation details in various files for compatibility with the Ruby dependency changes
- Modifies
Workarea::SystemTest
to inherit fromActionDispatch::SystemTestCase
, the Rails system test case introduced in Rails 5.1 - Extracts
Workarea::IntegrationTest::Configuration
to share behavior betweenIntegrationTest
andSystemTest
(sinceSystemTest
no longer inherits fromIntegrationTest
) - Extends the Mongoid Simple Tags library for compatibility with Mongoid 6.2
Adds Tests Converted from RSpec
Workarea 3.1 adds more tests which were converted from the remaining RSpec test suite. The converted tests include all Admin specs and credit card operation specs.
Adds Factory Method to Complete a Checkout
Workarea 3.1 adds the complete_checkout
factory method for use in tests.
Adds Test Runner for Each Installed Plugin
Workarea 3.1 adds a test runner task for each installed plugin, allowing an application to run tests per-plugin.
Disables Text Transforms in Tests
Workarea 3.1 disables CSS text transforms while running tests to reduce failures caused by case sensitivity when tests are extended by applications.
Adds Asset Lookup for Use in Content Block DSL
Workarea 3.1 adds the find_asset_id_by_file_name
method for use in the content block DSL, avoiding the need for applications to provide this functionality on their own.
Adds "Details" API to Product (Extracted from Variant)
Workarea 3.1 extracts Workarea::Details
from Workarea::Catalog::Variant
and includes the new module in Workarea::Catalog::Product
(and Workarea::Catalog::Variant
) for a consistent details API for products and variants.
Adds "Only If" Option for Enqueuing Callbacks Workers
Workarea 3.1 adds the enqueue_on: { only_if: -> { ... } }
Sidekiq option for use by callbacks workers. This option complements the previously available ignore_if
option.
Adds "Add to Cart Confirmation" Analytics Event
Workarea 3.1 announces an addToCartConfirmation analytics event when items are added to the cart in the Storefront. Analytics adapters may report this event as appropriate for each analytics service.
Adds Detection for Duplicate DOM IDs in Storefront
Workarea 3.1 adds the Core JavaScript module WORKAREA.duplicateId
, which throws an error when duplicate id attribute values exist in the DOM. The module is required only in the Storefront, and only for the Development and Test Rails environments. The change also fixes several instances of duplicate IDs.
Adds Detection for Duplicate JS Module Scopes in Storefront
Workarea 3.1 updates the Workarea JavaScript library, workarea/core/workarea.js
, to throw an error when modules are re-initialized on the same scope. This change is limited to the Development and Test Rails environments.
Adds Additional Permissions to Admins Seeds
Workarea 3.1 adds additional permissions to the admin users created by Workarea::AdminsSeeds
. The permissions added were previously omitted due to oversight or are new in Workarea 3.1.
Raises When Discount Application Order is Not Configured
Workarea 3.1 raises a MissingConfigurationError
if Workarea.config.discount_application_order
is missing a discount class. The raised error provides info on how to resolve the problem and is more helpful than the error raised in previous Workarea versions.
Automatically Configures Amazon S3 Dragonfly Data Store from Environment
Workarea 3.1 automatically configures Dragonfly to use S3 as its data store when WORKAREA_S3_REGION
and WORKAREA_S3_BUCKET_NAME
are present in the environment. The values of WORKAREA_S3_ACCESS_KEY_ID
and WORKAREA_S3_SECRET_ACCESS_KEY
are also included in the configuration when present.
Prior Workarea versions required manual configuration via Workarea.config.asset_store
.
Changes Search Synonyms Sanitization to Remove Hyphens
Workarea 3.1 changes Workarea::Search::Settings#sanitized_synonyms
to split hyphenated synonyms into multiple words.
Persists Backorder Dates to Inventory Transaction Items When Capturing Inventory
Workarea 3.1 saves the backorder date on the inventory transaction item when placing the order. This change will help in future OMS related features that require a decision on when orders should ship.
Internationalizes Name Field on Order
Workarea 3.1 internationalizes Workarea::Order#name
, which previously returned an English string due to oversight.
Changes "Finished Checkout" Destination for Admins
Workarea 3.1 redirects to the order Admin screen after placing an order when the order is placed by an admin user with order access.
Moves Storefront Search Response Message from Flash to View
Workarea 3.1 moves the Storefront search response message (e.g. a message indicating the search query was rewritten) from the flash to the view so that the message persists until the user manually dismisses it or reloads the page.
Removes Explicit Line Height from Admin Toggle Buttons
Workarea 3.1 removes explicit line height styles from the toggle-button Admin component to improve alignment with other controls.
Adds Workarea Favicon to Admin
Workarea 3.1 adds a Workarea favicon to the Admin.
Adds Discount Redemption Data to Admin UI
Workarea 3.1 displays the discount redemption amount in pricing discounts Admin screens.
Adds Sale Price to Pricing Skus Cards
Workarea 3.1 displays the sale price (when available) in the pricing skus Admin screens.
Adds Template to Product Summaries in Admin
Workarea 3.1 displays the product template within Admin product summaries.
Adds "Type" Title Attributes to Admin Summaries
Workarea 3.1 adds title attributes to the display of type values in Admin summaries since this text sometimes overflows the container.
Re-Orders Cards in Orders Admin
Workarea 3.1 re-orders the cards within the order Admin screens to group read-only and actionable cards together.
Improves Display of Empty Admin Activities
Workarea 3.1 moves the display of empty activities to a more appropriate location within Admin activity.
Fixes Display of "Active/Inactive" in Prices Admin
Workarea 3.1 fixes the display of the values "Active" and "Inactive" within prices Admin screens.
Removes Link to Nonexistent Shipping Service Admin Screen
Workarea 3.1 changes the shipping services Admin screen, removing a link to a nonexistent location.