-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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(product,dashboard): Allow re-ordering images #10187
Conversation
…edusa into feat/image-rank-field
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Skipped Deployments
|
🦋 Changeset detectedLatest commit: a166fa9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 65 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 |
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.
Overall LGTM, would be nice with a pair of extra eyes, if possible.
@adrien2p, any chance you could glance over the BE in this PR? |
Yes for sure, i can have a look tomorrow morning 🙏 |
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.
Looks good to me - will let someone else take a look as well
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!
…om/medusajs/medusa into feat/image-rank-field-many-to-one
@@ -52,7 +52,7 @@ export interface SoftDeletableEntity extends BaseEntity { | |||
/** | |||
* Temporary type fixing to allow any level of orders until we get to properly clean all the types | |||
*/ | |||
type FindConfigOrder = { [Key: string]: "ASC" | "DESC" | FindConfigOrder } | |||
export type FindConfigOrder = { [Key: string]: "ASC" | "DESC" | FindConfigOrder } |
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.
export type FindConfigOrder = { [Key: string]: "ASC" | "DESC" | string & {} | FindConfigOrder }
What
product-images
pivot table is migrated.ProductImage.rank
field, the field is treated as readonly, and does not allow the user to set it directly. It is instead inferred by the index of an image in the product payload, e.g.images: [{ url: "./funny-cat.jpg" }, { url: "./funny-dog.jpg" }]
is saved as[{ url: "./funny-cat.jpg", rank: 0 }, { url: "./funny-dog.jpg", rank: 1 }]
.Resolves CMRC-723, CMRC-724, CMRC-725
CLOSES #10128