npm @medusajs/medusa 2.10.3
v2.10.3: View configurations and Shipping Options context hook

latest releases: 2.10.4-preview-20250919031359, 2.10.4-preview-20250919000319, 2.10.4-preview-20250918210156...
11 hours ago

Highlights

[Experimental] Customizable columns in Medusa Admin tables

In previous versions, tables that list Orders, Products, etc., had hard-coded columns that couldn’t be modified. However, columns have different relevance between businesses. The only way to get tables to show additional columns was to introduce admin extensions that duplicated the original table’s behavior. This was tedious and clunky.

In this release, we are rolling out experimental support for View Configurations, which allow you to change which columns are displayed in the Orders and Products tables. Click the columns dropdown to see the available columns and add the ones you want. The available columns are computed using Medusa’s module graph, meaning any custom data models linked to Orders or Products can also be included in your table config.

With the View Configurations feature, we also enable saved views so you can have the right view at hand for your workflow. Saved views hold both your column configurations and any filters you have applied.

To try View Configurations turn on the feature flag in your medusa-config.ts

module.exports = defineConfig({
  ...
  featureFlags: {
    view_configurations: true
  }
})

Shipping options context hook

This release introduces a hook to customize the context used to list shipping options, allowing you to leverage custom rules for shipping options more easily.

The hook can be used like so:

import { listShippingOptionsForCartWithPricingWorkflow } from "@medusajs/medusa/core-flows"
import { StepResponse } from "@medusajs/workflows-sdk"

listShippingOptionsForCartWithPricingWorkflow.hooks.setShippingOptionsContext(
  async ({ cart }, { container }) => {

    if (cart.customer_id) {
      return new StepResponse({
        customer_id: cart.customer_id,
      })
    }

    const query = container.resolve("query")

    const { data: carts } = await query.graph({
      entity: "cart",
      filters: {
        id: cart.id,
      },
      fields: ["customer_id"],
    })

    return new StepResponse({
      customer_id: carts[0].customer_id,
    })
  }
)

In the example above, we add customer_id to the context along with the fixed properties is_return and enabled_in_store. This means that if a shipping option rule includes a customer_id attribute, the shipping option will be included in the result set.

The hook has been introduced in the following workflows:

  • listShippingOptionsForCartWithPricingWorkflow
  • listShippingOptionsForCartWorkflow

Please make sure to register the hook in both, since they are used for shipping option validation across workflows.

Features

Bugs

Documentation

Chores

  • chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #13491
  • chore(docs): Update version in documentation (automated) by @github-actions[bot] in #13490
  • chore(js-sdk): add ignore tag to views by @shahednasser in #13503
  • chore: update TSDocs of JS SDK store methods to clarify required auth by @shahednasser in #13507
  • chore(core-flows): use directory convention for locking steps by @shahednasser in #13501
  • chore: add a link to the storefront docs for cart item totals type by @shahednasser in #13514
  • test(): test dynamic max workers and improve CI by @adrien2p in #13516
  • chore(): Shard unit tests jobs by @adrien2p in #13525
  • fix(core-flows): Lock cart on shipping + taxes update by @olivermrbl in #13535
  • chore: add tsdocs for latest changes by @shahednasser in #13539
  • fix(): Prevent promotion filtering to exceed psql limits by @adrien2p in #13540

Other Changes

  • fix(js-sdk): skip null values in query qs.stringify by @leobenzol in #13460
  • feat(dashboard): update display of tracking/label URLs on order details by @docloulou in #11613
  • fix(dashboard): added missing currencies by @tehaulp in #13214
  • test(): Try to reproduce automatic promotion adjustments being applied twice by @adrien2p in #13533

Full Changelog: v2.10.2...v2.10.3

Don't miss a new medusa release

NewReleases is sending notifications on new releases.