-
Notifications
You must be signed in to change notification settings - Fork 80
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-0070] implement move xblock modal #1422
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 🚀 |
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.
[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 ReportAttention: 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. 🚨 Try these New Features:
|
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
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! 👍
Thanks!
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradenmacdonald, FYI. Not sure what went wrong.
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.
@arbrandes This MFE's master
branch is still on 14.1.4 not 14.2.0
npm ls @openedx/frontend-build
@edx/[email protected]
├─┬ @edx/[email protected]
│ └── @openedx/[email protected] deduped
├─┬ @edx/[email protected]
│ └── @openedx/[email protected] deduped
└── @openedx/[email protected]
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with throw new Error('Failed to send message to iframe.');
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the console message, as per the previous comment.
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.
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 🚀 |
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.
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