-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(dashboard, medusa, medusa-js, medusa-react, icons): DataGrid, partial Product domain, and ProductVariant hook #6428
Conversation
… than selection length
🦋 Changeset detectedLatest commit: 5321765 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
Would it be possible to not make the page jump on table searches? See video below. CleanShot.2024-02-21.at.10.01.52.mp4 |
Searching in the table also does a not so elegant jump/refresh of the entire component: CleanShot.2024-02-21.at.10.05.49.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a few comments. Nice work @kasperkristensen
{t("fields.categories")} | ||
</Text> | ||
<div className="flex flex-wrap items-center gap-1"> | ||
{product.categories.length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: Check categories exist. This fails if categories are not enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do this later, currently there is no checking for feature flags. But my idea is to implement a check in the loader for each page to prevent having sections that jump in after the page has loaded.
weight: zod.string(), | ||
length: zod.string(), | ||
width: zod.string(), | ||
height: zod.string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment
.../products/product-options/components/edit-product-options-form/edit-product-options-form.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Epic 🏅
Left a couple of discussion points but overall LGTM!
packages/admin-next/dashboard/src/components/grid/data-grid/data-grid-root/data-grid-root.tsx
Outdated
Show resolved
Hide resolved
packages/admin-next/dashboard/src/components/grid/data-grid/data-grid-root/data-grid-root.tsx
Outdated
Show resolved
Hide resolved
packages/admin-next/dashboard/src/components/grid/data-grid/data-grid-root/data-grid-root.tsx
Show resolved
Hide resolved
let cells: FieldCoordinates[] = [] | ||
|
||
function selectCell(i: number, columnIndex: number) { | ||
const possibleCell = document.querySelector( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: use a more specific grid root element so that fewer nodes are traversal when searching
} | ||
|
||
/** | ||
* If the current cell is not a neighbour, we instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: is this an optimisation to separateisNeighbour
case? Should selectCell()
be able to solve for that too?
The PR for the Products section is growing quite large, so I would like to merge this PR that contains a lot of the ground work before moving onto finalizing the rest of the domain.
Note
Since the PR contains changes to the core, that the dashboard depends on, the staging env will not work. To preview this PR, you will need to run it locally.
@medusajs/medusa
What
GET /admin/products/:id/variants
options.values
has been added to the default relations of admin product endpoints.medusa-react
What
GET /admin/products/:id/variants
@medusajs/dashboard
DataGrid
component (formerlyBulkEditor
) (WIP)/products
overview page/products/create
page for creating new products (WIP - need to go over design w/ Ludvig before continuing)/products/:id
details page/products/:id/gallery
page for inspecting a products images in fullscreen./products/:id/edit
page for editing the general information of a product/products/:id/attributes
page for editing the attributes information of a product/products/:id/sales-channels
page for editing which sales channels a product is available inDataTable
where a table with two fixed columns would not display correctlyFor the review its not important to test the DataGrid, as it is still WIP, and I need to go through some minor changes to the behaviour with Ludvig, as virtualizing it adds some constraints.
@medusajs/icons
What
TODO in next PR
/products/create
page/products/:id/media
page for managing media associated with the product./products/id/options
for managing product options (need Ludvig to rethink this as the current API is very limited and we can implement the current design as is.)/products/:id/variants/:id
page for editing a variant. (Possibly concat all of these into one BulkEditor page?)