Skip to content

feat: [FC-86] Added course overview for Course About page#47

Merged
brian-smith-tcril merged 5 commits intoopenedx:masterfrom
raccoongang:Peter_Kulko/course-overview-section
Nov 20, 2025
Merged

feat: [FC-86] Added course overview for Course About page#47
brian-smith-tcril merged 5 commits intoopenedx:masterfrom
raccoongang:Peter_Kulko/course-overview-section

Conversation

@PKulkoRaccoonGang
Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang commented Nov 5, 2025

Description

Added course overview for Course About page.

Useful information

Initial setup

  1. Clone and install the tutor-mfe plugin from the draft PR that adds support for Catalog MFE.
  2. Go to http://apps.local.openedx.io:1998/catalog/courses/<course_id>/about

How Has This Been Tested?

  1. Go to Course About page (http://apps.local.openedx.io:1998/catalog/courses/<course_id>/about).
  2. If no content is available, the message “No course overview added.” should be displayed.
  3. Open the Schedule and Details page and add content to the Overview section.
  4. Verify that the course overview content is displayed correctly.
  5. If the user is not logged in, the View About Page in Studio button should not be visible.
  6. If the user is logged in but does not have admin permissions, the View About Page in Studio button should also not be visible.

@openedx-webhooks
Copy link

openedx-webhooks commented Nov 5, 2025

Thanks for the pull request, @PKulkoRaccoonGang!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 5, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Nov 5, 2025
@PKulkoRaccoonGang PKulkoRaccoonGang changed the title feat: added course overview for Course About page feat: [FC-86] Added course overview for Course About page Nov 5, 2025
@PKulkoRaccoonGang PKulkoRaccoonGang self-assigned this Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (157da4d) to head (d8c977d).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   98.57%   98.77%   +0.19%     
==========================================
  Files          89       96       +7     
  Lines         845      981     +136     
  Branches      129      160      +31     
==========================================
+ Hits          833      969     +136     
  Misses         12       12              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PKulkoRaccoonGang PKulkoRaccoonGang marked this pull request as ready for review November 6, 2025 09:04
@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/course-overview-section branch from 47acddc to 37d0560 Compare November 6, 2025 09:38
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Nov 6, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Nov 6, 2025
},
noCourseOverview: {
id: 'catalog.course-about.no-course-overview',
defaultMessage: 'No course overview added',
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should have this message (and especially not show it to learners).

The legacy page doesn't have this

Image

so we should match that.


I messed around locally a bit to see what a "don't show the card when we don't have anything to put in it" version of this could look like.

diff --git a/src/course-about/course-overview/index.tsx b/src/course-about/course-overview/index.tsx
index 1eaf333..48ed156 100644
--- a/src/course-about/course-overview/index.tsx
+++ b/src/course-about/course-overview/index.tsx
@@ -4,7 +4,6 @@ import {
 import { getConfig } from '@edx/frontend-platform';
 import { useIntl } from '@edx/frontend-platform/i18n';
 import { getAuthenticatedUser } from '@edx/frontend-platform/auth';
-import classNames from 'classnames';
 
 import messages from '../messages';
 import type { CourseOverviewProps } from './types';
@@ -19,6 +18,24 @@ export const CourseOverview = ({ overviewData, courseId }: CourseOverviewProps)
   const processedOverviewData = processOverviewContent(overviewData, getConfig().LMS_BASE_URL);
   const hasOverviewContent = processedOverviewData.trim().length > 0;
 
+  if (!hasOverviewContent) {
+    if (!isGlobalStaff) {
+      return undefined;
+    }
+
+    return (
+      <Button
+        as="a"
+        size="sm"
+        block={isExtraSmall}
+        variant="outline-primary"
+        href={`${getConfig().STUDIO_BASE_URL}/settings/details/${courseId}`}
+      >
+        {intl.formatMessage(messages.viewAboutPageInStudio)}
+      </Button>
+    );
+  }
+
   return (
     <Container className="px-0">
       <Card>
@@ -40,14 +57,10 @@ export const CourseOverview = ({ overviewData, courseId }: CourseOverviewProps)
           />
         )}
         <Card.Section>
-          {hasOverviewContent ? (
+          {
             /* eslint-disable-next-line react/no-danger */
             <div dangerouslySetInnerHTML={{ __html: processedOverviewData }} />
-          ) : (
-            <div className={classNames('text-center', isGlobalStaff ? 'mb-5.5' : 'my-5.5')}>
-              <p className="m-0">{intl.formatMessage(messages.noCourseOverview)}</p>
-            </div>
-          )}
+          }
         </Card.Section>
       </Card>
     </Container>
Image Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I heard back from the designer about the “View About Page in Studio” button. They think it’s better not to make it full width and suggested going with the following option instead:

image

What do you think about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change and your suggestions regarding the card have been added to the PR. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Using an ActionRow looks like a great solution! Thanks!

@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/course-overview-section branch from b885c5f to 418065c Compare November 10, 2025 08:43
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Overall this looks great! Couple small comments/suggestions but nothing major.

Thanks for putting this together!

},
noCourseOverview: {
id: 'catalog.course-about.no-course-overview',
defaultMessage: 'No course overview added',
Copy link
Contributor

Choose a reason for hiding this comment

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

Using an ActionRow looks like a great solution! Thanks!

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Thanks for putting all of this together! I just pulled down the latest version and tested locally and it looks wonderful!

LGTM!

@brian-smith-tcril brian-smith-tcril merged commit 26f4fb3 into openedx:master Nov 20, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Contributions Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project 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.

5 participants