-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: wrong input argument in ErrorBanner #288
fix: wrong input argument in ErrorBanner #288
Conversation
Thanks for the pull request, @FatemeKhodayari! 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. |
@FatemeKhodayari looks like there are some check failing, can you have a look? |
Sorry. I had forgotten to change the test file as well. Fixed it. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #288 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 109 109
Lines 1079 1078 -1
Branches 160 159 -1
=========================================
- Hits 1079 1078 -1 ☔ View full report in Codecov by Sentry. |
Hi @openedx/content-aurora - this is ready for review. Thanks! |
Dear @mphilbrick211, do you have any idea about the state of this PR? It's been open for so long that now it has conflict with the master branch :)) Shall I resolve the conflict so you can proceed with the review or maybe there's a problem with this PR and thus it won't be merged? |
Hi @FatemeKhodayari! I apologize for the delay. I believe the Aurora group is no longer reviewing pull requests, so I will look into another reviewer for you. Ok to hold off on the conflict until we have a reviewer! |
Hi @mphilbrick211! No worries :) Thanks for looking into this. I'll wait to hear back from you before proceeding with the conflict. |
…hub.com:FatemeKhodayari/frontend-app-ora-grading into FatemeKhodayari/fix-error-banner-input-argument
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.
Every other instance of error handling in this MFE uses headingMessage
for similar purposes. I believe we should stick to that pattern.
With that in mind, do you mind changing https://github.com/openedx/frontend-app-ora-grading/blob/master/src/components/FilePreview/hooks.js#L82 instead?
…hub.com:FatemeKhodayari/frontend-app-ora-grading into FatemeKhodayari/fix-error-banner-input-argument
Thanks Adolfo. Applied the requested changes. Sorry for the messy git history by the way. Didn't squash / rebase the commits as I was afraid it may cause more conflict / complexity. Hope you can squash them while merging. |
@arbrandes - would you mind re-enabling the tests to run? |
Friendly ping on this, @arbrandes! |
@arbrandes flagging for when you're able to take a look. |
We can close this in favor of 2208737 |
When opening an ORA with file uploads, the MFE tries to preview the uploaded file. If anything goes wrong, it displays the error banner.
As we see in the code,
error
is passed toErrorBanner
for displaying the error banner component. TheErrorBanner
component has an input argument namedheadingMessage
The problem happens here. The
error
object passed from theFileRenderer
component has noheadingMessage
attribute. This will crash the frontend as it tries to get anid
out of theheadingMessage
to display the translated error message. The attribute available inerror
isheaderMessage
. Renaming the input argument will fix this issue.Test Plan
To reproduce the error
Grade available responses
error
object inFileRenderer
component for testing purpose or make some change that crashes theFileRenderer
componentView all responses
buttonAdditional info
More info can be found in this topic
Closes 285