Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inventory,dashboard,types,core-flows,js-sdk,medusa): Improve inventory UX #10630

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

kasperkristensen
Copy link
Contributor

@kasperkristensen kasperkristensen commented Dec 17, 2024

@medusajs/dashboard

  • Add new bulk editors for managing Inventory: One one the product details page, and another on the inventory item list page.
  • Improves performance of DataGrid when performing actions on a large number of cells, e.g. selecting a column of 100 rows and copy/paste, delete, etc.
  • Allow bidirectional actions in the DataGrid component when multiColumnSelection is true. This allows the users to drag-to-fill, copy/paste, etc, across all columns at once. The feature needs to be enabled with the above flag, as it only makes sense for DataGrids where we can guarantee that all columns are of the same type. Will also enable this for the various price related DataGrids in a follow up PR.
  • Adds global "Pending Navigation" UI. We use loaders throughout the admin, to preload the data needed for a page before we render it. Before we would not provide any feedback to the user that this was happening which would make the UI seem unresponsive, if a loader took a noticeable amount of time to resolve. We now dim the content and show a progress bar at the top of the screen, which indicates to the user that a navigation is in progress. This was added as fetching the data needed for the Inventory data grid could take a while to resolve. As we plan to move to more SSR in the future, this pattern will be an even bigger UX improvement.
  • Replaces framer-motion dependency with motion, as the former was deprecated after motion was separated from the Framer organization.

@medusajs/core-flows

  • Adds new batch workflow for creating, updating and deleting location levels.
  • Deprecates old create/delete location level workflow

@medusajs/medusa

  • Adds new POST /admin/inventory-items/location-levels/batch endpoint using the above mentioned workflow.
  • Updates POST /admin/inventory-items/:id/location-levels/batch endpoint to use the above mentioned workflow.
    • The includes two breaking change: To delete a location level you no longer pass the ID of the stock location of said location level. Instead you need to pass the ID of the location level. The body of the endpoint has been changes from { creates: [], deletes: []} to { create: [], update: [], delete: [] } to bring it inline with other batch endpoints. As an example an accepted payload went from { deletes: ["sloc_123"] } to { delete: ["ilvl_123"] }.

@medusajs/js-sdk

  • Adds two new methods batchInventoryItemsLocationLevels and batchInventoryItemLocationLevels. Notice that one is the plural form of InventoryItems. The two methods correspond to POST /admin/inventory-items/location-levels/batch and POST /admin/inventory-items/:id/location-levels/batch.
  • Deprecates batchUpdateLevels in favour of batchInventoryItemLocationLevels

@medusajs/types

  • Adds new Inventory Item types, and some cleanup of existing ones.

@medusajs/ui

  • Updates the styling of the Switch, RadioGroup, and Checkbox components to the new style guidelines for disabled inputs.

Resolves CMRC-784, CMRC-786, CMRC-787

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 10:20am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Jan 8, 2025 10:20am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:20am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:20am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:20am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:20am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:20am

Copy link

changeset-bot bot commented Dec 17, 2024

🦋 Changeset detected

Latest commit: 2638460

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 65 packages
Name Type
@medusajs/inventory Patch
@medusajs/dashboard Patch
@medusajs/core-flows Patch
@medusajs/js-sdk Patch
@medusajs/types Patch
@medusajs/medusa Patch
integration-tests-http Patch
@medusajs/admin-bundler Patch
@medusajs/test-utils Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/framework Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch
@medusajs/telemetry Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kasperkristensen kasperkristensen marked this pull request as ready for review December 20, 2024 08:56
@kasperkristensen kasperkristensen requested a review from a team as a code owner December 20, 2024 08:56
@olivermrbl
Copy link
Contributor

/snapshot-this

Copy link
Contributor

github-actions bot commented Jan 7, 2025

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 8e7d895

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐐🐐

@@ -0,0 +1,9 @@
import { HttpTypes } from "@medusajs/types"

// TODO: Create a type in the types package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants