feat: [FC-0070] implement move xblock modal - #1422
Conversation
|
Thanks for the pull request, @ihor-romaniuk! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
c917065 to
1a9145e
Compare
1a9145e to
de9f97c
Compare
0d617b7 to
062e439
Compare
|
Sandbox deployment successful 🚀 |
peterkulko
left a comment
There was a problem hiding this comment.
[inform]: Regarding the failing tests. Apparently after merging one of the last PRs we had problems with tests for the library functionality. I have already fixed this in a new PR
#1493
64a02a0 to
54ddf6b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1422 +/- ##
==========================================
+ Coverage 93.04% 93.11% +0.06%
==========================================
Files 1048 1060 +12
Lines 20544 20889 +345
Branches 4363 4531 +168
==========================================
+ Hits 19116 19451 +335
- Misses 1358 1369 +11
+ Partials 70 69 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment successful 🚀 |
54ddf6b to
7429b68
Compare
|
Sandbox deployment successful 🚀 |
7429b68 to
8965b19
Compare
|
Sandbox deployment successful 🚀 |
8965b19 to
dedc765
Compare
|
Sandbox deployment successful 🚀 |
dedc765 to
01031d4
Compare
|
Sandbox deployment successful 🚀 |
arbrandes
left a comment
There was a problem hiding this comment.
Can't find anything to object to except for the console logging. Code looks good and works well. Once the calls to console() are removed, we can merge.
|
|
||
| import { IframeContext, IframeContextType } from './iFrameContext'; | ||
|
|
||
| // eslint-disable-next-line import/prefer-default-export |
There was a problem hiding this comment.
Not a blocker, but the latest frontend-build makes it so that we don't need this line anymore.
There was a problem hiding this comment.
After update current branch to master branch and reinstall dependencies, still catch the error ESLint: Prefer default export on a file with single export.(import/ prefer-default-export)
There was a problem hiding this comment.
@bradenmacdonald, FYI. Not sure what went wrong.
There was a problem hiding this comment.
@arbrandes This MFE's master branch is still on 14.1.4 not 14.2.0
npm ls @openedx/frontend-build
@edx/frontend-app-authoring@0.1.0
├─┬ @edx/frontend-platform@8.1.1
│ └── @openedx/frontend-build@14.1.4 deduped
├─┬ @edx/react-unit-test-utils@3.0.0
│ └── @openedx/frontend-build@14.1.4 deduped
└── @openedx/frontend-build@14.1.4
There was a problem hiding this comment.
Let's update @openedx/frontend-build in the next PRs to avoid delaying this feature, as it will require additional time to refactor the current code (I found 104 matches for import/prefer-default-export).
There was a problem hiding this comment.
I've done that refactor in #1519 and it's now merged to master :)
| iframeWindow.postMessage({ type: messageType, payload }, '*'); | ||
| } catch (error) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Failed to send message to iframe:', error); |
There was a problem hiding this comment.
This is fine for debugging, but there's a reason for the linting to be there: we don't want to use the console in production code.
There was a problem hiding this comment.
Replaced with throw new Error('Failed to send message to iframe.');
There was a problem hiding this comment.
The idea to not use console() is to avoid showing ugly messages to the end user. I'm not sure if throwing a new Error() will get managed properly, but I suspect it won't.
How about if we used logError instead? Right now it only works with newRelic, but at least it takes case of both sides of the issue: not showing the message to the end user while still allowing the operator to know about it.
There was a problem hiding this comment.
Good point. This place and comment below are replaced with logError events.
| } | ||
| } else { | ||
| // eslint-disable-next-line no-console | ||
| console.warn('Iframe is not accessible or loaded yet.'); |
There was a problem hiding this comment.
Please remove the console message, as per the previous comment.
There was a problem hiding this comment.
Replaced with throw new Error('Iframe is not accessible or loaded yet.');
01031d4 to
c561446
Compare
|
Sandbox deployment failed 💥 |
c561446 to
a06651c
Compare
|
Sandbox deployment successful 🚀 |
arbrandes
left a comment
There was a problem hiding this comment.
Works for me! Thank you!
🚨 Dependencies:
Settings
Description
This PR introduces the ability to move an xBlock from one unit to another within a course using a modal window. The feature enables users to select a target unit for the xBlock and confirm the move.
move-xblock.mov
Related Pull Requests
Testing instructions