-
Notifications
You must be signed in to change notification settings - Fork 81
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: await async saveSetting func to remove unwanted err msg #610
fix: await async saveSetting func to remove unwanted err msg #610
Conversation
Thanks for the pull request, @navinkarkera! 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. |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #610 +/- ##
=======================================
Coverage 86.45% 86.45%
=======================================
Files 372 372
Lines 5580 5580
Branches 1235 1235
=======================================
Hits 4824 4824
Misses 732 732
Partials 24 24
☔ View full report in Codecov by Sentry. |
@brian-smith-tcril Could you please help us in reviewing and merging this? |
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 makes sense!
saveSetting
is async
https://github.com/openedx/frontend-app-course-authoring/blob/97d0a1ce61c1b051b75c8aafe1465207340d9f85/src/utils.js#L122
handleSettingsSave
is passed in to AppSettingsModal
as onSettingsSave
https://github.com/openedx/frontend-app-course-authoring/blob/bcef4e1c27ad4830c480c7754a0d9232f5014dcd/src/pages-and-resources/progress/Settings.jsx#L29
AppSettingsModal
expects onSettingsSave
to be async
https://github.com/openedx/frontend-app-course-authoring/blob/97d0a1ce61c1b051b75c8aafe1465207340d9f85/src/pages-and-resources/app-settings-modal/AppSettingsModal.jsx#L148
LGTM!
I'm going to merge this despite the CodeCov patch coverage showing 0%. The overall change the the project is 0%, this fix is just touching code that didn't have coverage before. I believe it makes more sense to get this fix merged now than to wait until we add test coverage to a couple lines of code that were never covered before. |
@navinkarkera 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Without this change, an error msg is displayed till the request runs, i.e. it is not waiting for the request to complete.
This issue was discovered while testing/reviewing openedx/frontend-app-learning#1194