-
Notifications
You must be signed in to change notification settings - Fork 70
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(sync-actions): adding support for changeAssetOrder in ProductVariants #1885
feat(sync-actions): adding support for changeAssetOrder in ProductVariants #1885
Conversation
🦋 Changeset detectedLatest commit: 0096b08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1885 +/- ##
==========================================
+ Coverage 94.74% 94.75% +0.01%
==========================================
Files 147 147
Lines 5041 5057 +16
Branches 1373 1375 +2
==========================================
+ Hits 4776 4792 +16
Misses 262 262
Partials 3 3
☔ View full report in Codecov by Sentry. |
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 nice. I am a bit confused by the formatting changes. Everything else feels like a nit. Take it or leave it.
@@ -29,7 +26,7 @@ function createQuoteRequestsMapActions( | |||
return function doMapActions( | |||
diff: Object, | |||
newObj: Object, | |||
oldObj: Object, | |||
oldObj: Object |
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.
Why did we remove the ,
here? Is is some auto-formatting regression?
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.
I think the "put a comma" rule only applies to objects and not function params
@@ -1,6 +1,8 @@ | |||
/* eslint-disable max-len */ |
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.
This File
@@ -1731,5 +1731,83 @@ describe('Actions', () => { | |||
] | |||
expect(actual).toEqual(expected) | |||
}) | |||
|
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.
This section
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 👍
Regarding the format changes, do you have the same node/yarn versions than the ones specified int the nvmrc and yarnrc?
9de814c
to
5c6c49d
Compare
checked and it does match |
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 pretty good to me 👍
extended the test to make sure that actions are generated in order change order then other assets actions
import intersection from 'lodash.intersection' | ||
import without from 'lodash.without' |
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.
would avoid lodash, yep its clean but it had performance cost, there were old PR removed some lodash cause it were impacting performance, but tbh that would do the job for now 😉
oldVariant, | ||
newVariant | ||
) | ||
return [...changedAssetOrderAction, ...assetActions] |
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.
that brilliant 👍
Summary
Adding support for changeAssetOrder in ProductVariants.
Description
The first updateAction to be generated will be the
changeAssetOrder
for the groupassets
.Todo
Type
label for the PR