FC-86 feat: Empty page templates - #3
Conversation
|
Thanks for the pull request, @vladislavkeblysh! This repository is currently maintained by 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 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. DetailsWhere 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. |
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
0e38e4d to
f31e1e6
Compare
peterkulko
left a comment
There was a problem hiding this comment.
After merging dependent PRs, LGTM!
|
Hi @vladislavkeblysh can you rebase master branch? thanks 😄 |
3d2dc4d to
f31e1e6
Compare
f31e1e6 to
c8dc06b
Compare
brian-smith-tcril
left a comment
There was a problem hiding this comment.
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.
| <Route path="/" element={<HomePage />} /> | ||
| <Route path="/courses" element={<CatalogPage />} /> | ||
| <Route path="/courses/:courseId/about" element={<CourseAboutPage />} /> | ||
| <Route path="*" element={<NotFoundPage />} /> |
There was a problem hiding this comment.
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.
| @@ -0,0 +1,3 @@ | |||
| .not-found-message { | |||
| max-width: 32em; | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Not found page component moved in separate PR
|
Please remember to put the FC number (FC-86) in the title of the PRs, thank you! |
a7c8e01 to
46017bd
Compare
|
|
||
| return ( | ||
| <Container size="sm"> | ||
| <p className="my-0 py-5 text-muted text-center not-found-message mx-auto"> |
There was a problem hiding this comment.
This class doesn't exist now that NotFoundPage.scss was removed in https://github.com/openedx/frontend-app-catalog/compare/a7c8e0155c756d33555f4655f3e24ba15ab88d64..46017bd5b0a2e8a0df64132aa38ee9d6d958cdd3
| <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"> |
There was a problem hiding this comment.
Not found page component moved in separate PR
| }; | ||
| }); | ||
|
|
||
| jest.mock('@edx/frontend-component-header', () => function () { |
There was a problem hiding this comment.
Can we get rid of this warning?
| jest.mock('@edx/frontend-component-header', () => function () { | ||
| return <header>Header</header>; | ||
| }); | ||
| jest.mock('@edx/frontend-component-footer', () => ({ |
There was a problem hiding this comment.
Please add some spacing between these lines jest.mocks
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Overall this looks great!
One small comment about tests but other than that this is looking ready to merge!
| it('renders HomePage at route /', () => { | ||
| const { getByText } = renderWithProviders('/'); | ||
|
|
||
| expect(getByText('Home page')).toBeInTheDocument(); |
There was a problem hiding this comment.
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?

Note
This pull request depends on that PR.
Description
Added empty page templates:
How Has This Been Tested?
"/"route"/courses"route"/courses/:courseId/about"route