-
Notifications
You must be signed in to change notification settings - Fork 76
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: [FC-0044] Course unit - Drag and drop for xblocks #908
feat: [FC-0044] Course unit - Drag and drop for xblocks #908
Conversation
Thanks for the pull request, @PKulkoRaccoonGang! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
fb9c34d
to
a68fc60
Compare
@arbrandes @KristinAoki the first commit in this PR will be deleted after the #884 merge |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
Sandbox deployment successful 🚀 |
fdccc68
to
b698843
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #908 +/- ##
==========================================
+ Coverage 92.09% 92.12% +0.02%
==========================================
Files 685 685
Lines 12090 12133 +43
Branches 2609 2642 +33
==========================================
+ Hits 11134 11177 +43
Misses 920 920
Partials 36 36 ☔ View full report in Codecov by Sentry. |
Sandbox deployment successful 🚀 |
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 seems to be working fine, and the code looks good! I did have one minor question, though. See below.
|
||
// Directly sort the children based on the order defined in payload | ||
// This avoids the need to copy the array beforehand | ||
state.courseVerticalChildren.children.sort((a, b) => (indexMap.get(a.id) || 0) - (indexMap.get(b.id) || 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.
Nice!
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.
Thanks
|
||
// Special handling for objects with both 'id' and 'blockId' to ensure 'blockId' takes precedence | ||
if ('blockId' in data) { | ||
updatedData.id = data.blockId; |
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.
If we're doing this here, can't we get rid of the else if
on line 75?
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.
Yes, thanks
Good catch! 💯
Also, please resolve conflicts so I can merge on the next pass. Thanks! |
* feat: [AXIMST-46] Drag And Drop For Xblocks * feat: added tests * refactor: refactoring after review
Sandbox deployment successful 🚀 |
a6d2b9c
to
7bf6021
Compare
Sandbox deployment successful 🚀 |
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.
Thanks for addressing my comments!
@PKulkoRaccoonGang 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Settings
Description
Xblock drag and drop feature for Course unit page.
Useful information to include:
Supporting information
Testing instructions
contentstore.new_studio_mfe.use_new_unit_page
in the CMS admin panel.Other information
Include anything else that will help reviewers and consumers understand the change.