Skip to content

FC-86 feat: Empty page templates - #3

Merged
brian-smith-tcril merged 5 commits into
openedx:masterfrom
raccoongang:keblysh/feat/empty-page-templates
Jun 3, 2025
Merged

FC-86 feat: Empty page templates#3
brian-smith-tcril merged 5 commits into
openedx:masterfrom
raccoongang:keblysh/feat/empty-page-templates

Conversation

@vladislavkeblysh

@vladislavkeblysh vladislavkeblysh commented May 22, 2025

Copy link
Copy Markdown
Contributor

Note

This pull request depends on that PR.

Description

Added empty page templates:

  1. Added template for Home page
  2. Added template for Catalog page
  3. Added template for Course About page
  4. Aded routing
  5. Updated setup.js

How Has This Been Tested?

  1. Clone this repository
  2. Check that Home page is displaying on "/" route
  3. Check that Catalog page is displaying on "/courses" route
  4. Check that Course About page is displaying on "/courses/:courseId/about" route

@vladislavkeblysh vladislavkeblysh self-assigned this May 22, 2025
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @vladislavkeblysh!

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.

@codecov

codecov Bot commented May 22, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 24.32%. Comparing base (b16b5fb) to head (f39ac73).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/index.tsx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master       #3       +/-   ##
===========================================
+ Coverage    0.00%   24.32%   +24.32%     
===========================================
  Files           3        6        +3     
  Lines          24       37       +13     
===========================================
+ Hits            0        9        +9     
- Misses         24       28        +4     

☔ 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.

@vladislavkeblysh
vladislavkeblysh force-pushed the keblysh/feat/empty-page-templates branch from 0e38e4d to f31e1e6 Compare May 22, 2025 08:41

@peterkulko peterkulko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After merging dependent PRs, LGTM!

@diana-villalvazo-wgu

Copy link
Copy Markdown

Hi @vladislavkeblysh can you rebase master branch? thanks 😄

@vladislavkeblysh
vladislavkeblysh force-pushed the keblysh/feat/empty-page-templates branch from f31e1e6 to c8dc06b Compare May 26, 2025 09:32
@vladislavkeblysh
vladislavkeblysh removed the request for review from ihor-romaniuk May 26, 2025 09:32

@peterkulko peterkulko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGPM!

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would you be able to break this PR up into the empty page templates and the "not found" page.

I'm happy to review the empty templates as placeholders, but this PR includes what appears to be a mostly final version of the "not found" page.

I'm more or less happy to merge the templates as they are in this PR, and I don't want my comments on the "not found" page to block that.

Comment thread src/index.tsx Outdated
Comment on lines +38 to +41
<Route path="/" element={<HomePage />} />
<Route path="/courses" element={<CatalogPage />} />
<Route path="/courses/:courseId/about" element={<CourseAboutPage />} />
<Route path="*" element={<NotFoundPage />} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I bet if we add some tests to verify the correct pages are rendered at the correct routes almost all of the Codecov "not covered by tests" warnings will disappear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/not-found-page/NotFoundPage.scss Outdated
@@ -0,0 +1,3 @@
.not-found-message {
max-width: 32em;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm curious about the hardcoded 32em here. From what I can tell it is being used to create a newline between "The page you're looking for is unavailable or there's an error in the URL." and "Please check the URL and try again."

This works for English, but I don't think it provides the intended result in other languages.

Using https://github.com/openedx/openedx-translations/blob/13bd491a2fffd1a39d3a8fdd33739b969000d059/translations/frontend-app-profile/src/i18n/messages/vi.json#L7 as an example

image

@vladislavkeblysh vladislavkeblysh Jun 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not found page component moved in separate PR

@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions May 27, 2025
@sarina sarina changed the title feat: Empty page templates FC-86 feat: Empty page templates May 28, 2025
@sarina

sarina commented May 28, 2025

Copy link
Copy Markdown

Please remember to put the FC number (FC-86) in the title of the PRs, thank you!

@vladislavkeblysh
vladislavkeblysh force-pushed the keblysh/feat/empty-page-templates branch from a7c8e01 to 46017bd Compare May 30, 2025 06:41
Comment thread src/not-found-page/NotFoundPage.tsx Outdated

return (
<Container size="sm">
<p className="my-0 py-5 text-muted text-center not-found-message mx-auto">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This class doesn't exist now that NotFoundPage.scss was removed in https://github.com/openedx/frontend-app-catalog/compare/a7c8e0155c756d33555f4655f3e24ba15ab88d64..46017bd5b0a2e8a0df64132aa38ee9d6d958cdd3

Suggested change
<p className="my-0 py-5 text-muted text-center not-found-message mx-auto">
<p className="my-0 py-5 text-muted text-center mx-auto">

@vladislavkeblysh vladislavkeblysh Jun 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not found page component moved in separate PR

Comment thread src/index.test.jsx Outdated
};
});

jest.mock('@edx/frontend-component-header', () => function () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we get rid of this warning?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment thread src/index.test.jsx
jest.mock('@edx/frontend-component-header', () => function () {
return <header>Header</header>;
});
jest.mock('@edx/frontend-component-footer', () => ({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add some spacing between these lines jest.mocks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall this looks great!

One small comment about tests but other than that this is looking ready to merge!

Comment thread src/index.test.jsx Outdated
it('renders HomePage at route /', () => {
const { getByText } = renderWithProviders('/');

expect(getByText('Home page')).toBeInTheDocument();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While this will work for now, it will need to be updated as soon as the placeholder <h1>Home page</h1> is removed from the HomePage component. Would switching to checking for a test id here make more sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@brian-smith-tcril
brian-smith-tcril merged commit b1a42de into openedx:master Jun 3, 2025
@github-project-automation github-project-automation Bot moved this from In Eng Review to Done in Contributions Jun 3, 2025
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Jun 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.

7 participants