Skip to content
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: Created Course updates page #581

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

vladislavkeblysh
Copy link
Contributor

  • Created Course updates page
  • Ability to add new course update and handouts, edit, delete updates, edit handouts

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 29, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Aug 29, 2023

Thanks for the pull request, @vladislavkeblysh! 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@vladislavkeblysh vladislavkeblysh marked this pull request as draft August 29, 2023 06:07
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch coverage: 85.44% and project coverage change: +0.08% 🎉

Comparison is base (181f9c7) 84.54% compared to head (ccfd55b) 84.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #581      +/-   ##
==========================================
+ Coverage   84.54%   84.62%   +0.08%     
==========================================
  Files         279      301      +22     
  Lines        4582     4847     +265     
  Branches     1029     1072      +43     
==========================================
+ Hits         3874     4102     +228     
- Misses        684      721      +37     
  Partials       24       24              
Files Changed Coverage Δ
src/CourseAuthoringRoutes.jsx 100.00% <ø> (ø)
src/store.js 100.00% <ø> (ø)
src/course-updates/hooks.jsx 60.00% <60.00%> (ø)
src/course-updates/update-form/utils.js 81.81% <81.81%> (ø)
src/course-updates/data/thunk.js 83.33% <83.33%> (ø)
src/course-updates/update-form/UpdateForm.jsx 84.21% <84.21%> (ø)
src/course-updates/CourseUpdates.jsx 92.59% <92.59%> (ø)
src/constants.js 100.00% <100.00%> (ø)
src/course-updates/constants.js 100.00% <100.00%> (ø)
.../course-updates/course-handouts/CourseHandouts.jsx 100.00% <100.00%> (ø)
... and 15 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vladislavkeblysh vladislavkeblysh force-pushed the keblysh/course-updates branch 4 times, most recently from 3861234 to 8a8d2a1 Compare August 29, 2023 08:48
@vladislavkeblysh vladislavkeblysh marked this pull request as ready for review August 29, 2023 10:40
@mphilbrick211 mphilbrick211 requested a review from a team August 29, 2023 12:54
@mphilbrick211
Copy link

Hi @openedx/teaching-and-learning! Would someone be able to please review/merge this for us? Thank you!

Comment on lines +11 to +22
<Badge
className={classNames('processing-notification', {
'is-show': isShow,
})}
variant="secondary"
aria-hidden={isShow}
>
<Icon className="processing-notification-icon" src={IconSettings} />
<h2 className="processing-notification-title">
{capitalize(title)}
</h2>
</Badge>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you decided to use the Badge component instead of the Toast component?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tried to replicate the behavior of the legacy as closely as possible. This component should appear on the right (while the Toast appears on the left) and should visually resemble the legacy as much as possible. Additionally, the Toast has a close button and slightly different functionality

@@ -73,7 +73,7 @@ export const WysiwygEditor = ({
minHeight={minHeight}
editorContentHtml={initialValue}
setEditorRef={setEditorRef}
onChange={handleUpdate}
updateContent={handleUpdate}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
updateContent={handleUpdate}
onChange={handleUpdate}

This needs to be onChange. The prop has been renamed in frontend-lib-content-components because of a inherited prop conflict.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dispatch(updateSavingStatuses({ createCourseUpdateQuery: RequestStatus.PENDING }));
dispatch(showProcessingNotification(NOTIFICATION_MESSAGES.saving));
const courseHandouts = await editHandouts(courseId, data);
dispatch(editCourseHandouts(courseHandouts));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On edit, the api call is working as expected, but the data does not include the updates made to update. This is probably connected to the change that you made in the wysiwyg editor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dispatch(updateSavingStatuses({ createCourseUpdateQuery: RequestStatus.PENDING }));
dispatch(showProcessingNotification(NOTIFICATION_MESSAGES.saving));
const courseUpdate = await editUpdate(courseId, data);
dispatch(editCourseUpdate(courseUpdate));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On edit, the api call is working as expected, but the data does not include the updates made to update. This is probably connected to the change that you made in the wysiwyg editor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 63 to 69
<Layout
lg={[{ span: 9 }, { span: 3 }]}
md={[{ span: 9 }, { span: 3 }]}
sm={[{ span: 9 }, { span: 3 }]}
xs={[{ span: 9 }, { span: 3 }]}
xl={[{ span: 9 }, { span: 3 }]}
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The span should be set to 12 because there is no aside.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

dispatch(updateSavingStatuses({ createCourseUpdateQuery: RequestStatus.PENDING }));
dispatch(showProcessingNotification(NOTIFICATION_MESSAGES.saving));
const courseUpdate = await createUpdate(courseId, data);
dispatch(createCourseUpdate(courseUpdate));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On edit, the api call is working as expected, but the data does not include the updates made to update. This is probably connected to the change that you made in the wysiwyg editor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mphilbrick211 mphilbrick211 added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Aug 29, 2023
@mphilbrick211 mphilbrick211 removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Aug 30, 2023
<Button variant="tertiary" type="button" onClick={close}>
{intl.formatMessage(messages.cancelButton)}
</Button>
<Button onClick={handleSubmit} type="submit">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button should be disabled if the form cannot be submitted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@KristinAoki KristinAoki merged commit ffae3bd into openedx:master Aug 31, 2023
5 checks passed
@openedx-webhooks
Copy link

@vladislavkeblysh 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

snglth pushed a commit to Abstract-Tech/community-theme-course-authoring that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants