Frontend base Migration - #210
Conversation
|
Thanks for the pull request, @jesusbalderramawgu! 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. |
16fc5eb to
6150e8e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #210 +/- ##
==========================================
+ Coverage 97.65% 98.52% +0.86%
==========================================
Files 68 73 +5
Lines 1665 1288 -377
Branches 443 421 -22
==========================================
- Hits 1626 1269 -357
+ Misses 39 19 -20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I have updated the PR with the latest changes from frontend base. I rebased this branch and noticed that codecov is complaining, I will check to cover the pending test coverage. |
| { | ||
| id: 'org.openedx.frontend.route.adminConsole.main', | ||
| path: '/authz/*', | ||
| Component: Main, |
There was a problem hiding this comment.
The app no longer requires an authenticated user. Please add loader: authenticatedLoader to the route.
|
Also, please rebase on latest master so we don't lose any new features/fixes. I see a couple landed, recently. |
2c0f5cd to
877a882
Compare
|
Thank you @arbrandes for your great feedback! |
| </Button> | ||
| <Button | ||
| as={Hyperlink} | ||
| destination={`${getAppConfig(appId).COURSE_AUTHORING_MICROFRONTEND_URL}`} |
There was a problem hiding this comment.
Use destination={getUrlByRouteRole('org.openedx.frontend.role.courseAuthoring')}, drop the getAppConfig/appId imports, and remove the now-dead COURSE_AUTHORING_MICROFRONTEND_URL entry in site.config.test.tsx.
| "exclude": [ | ||
| "src/**/*.test.ts", | ||
| "src/**/*.test.tsx", | ||
| "src/**/*.spec.ts", | ||
| "src/**/*.spec.tsx", | ||
| "src/__mocks__/**/*", | ||
| "src/setupTest.tsx" | ||
| ] |
There was a problem hiding this comment.
Add "src/testUtils.tsx" here, and delete the stray file named tsconfig.build.json (with a trailing space) that the exclusion landed in instead.
| import { SiteContext } from '@openedx/frontend-base'; | ||
| import userEvent from '@testing-library/user-event'; | ||
| import { MemoryRouter, Route, Routes } from 'react-router-dom'; | ||
| import { mockHttpClient, mockAppContext } from '@src/setupTest'; | ||
| import { IntlProvider } from '@edx/frontend-platform/i18n'; | ||
| import { mockHttpClient, mockAppContext } from '@src/testUtils'; | ||
| import { IntlProvider } from '@openedx/frontend-base'; |
There was a problem hiding this comment.
Merge these two @openedx/frontend-base imports. They're non-adjacent, so the earlier sweep missed them; this is the last file with two.
|
|
||
| This directory contains the slots that this frontend app _offers_ for host sites to customize. Slots are implemented with the `<Slot />` component from [`@openedx/frontend-base`](https://github.com/openedx/frontend-base); see the [slot naming and lifecycle ADR](https://github.com/openedx/frontend-base/blob/main/docs/decisions/0009-slot-naming-and-lifecycle.rst) for the API and conventions. | ||
|
|
||
| Slots that this app _uses_ from other packages are declared in `src/slots.tsx`. |
There was a problem hiding this comment.
Drop this line - src/slots.tsx doesn't exist, so it points readers at a dead path.
| "react-intl": "6.8.9" | ||
| }, | ||
| "dependencies": { | ||
| "@edx/brand": "npm:@openedx/brand-openedx@^1.2.3", |
There was a problem hiding this comment.
Remove @edx/brand - nothing in the repo imports it (the dev harness gets branding via @openedx/frontend-base/shell/style), so as a hard dependency it just makes every consumer install a brand alias they don't use. lodash.debounce and react-error-boundary moving here was right.
| "ts-jest": "^29.4.5" | ||
| "@types/react-helmet": "^6.1.11", | ||
| "nodemon": "^3.1.14", | ||
| "ts-jest": "^29.4.5", |
There was a problem hiding this comment.
ts-jest isn't referenced by jest.config.js or babel.config.js, and neither frontend-app-catalog nor frontend-app-instructor-dashboard carries it.
| "overrides": { | ||
| "react-intl": "6.8.9" | ||
| }, |
There was a problem hiding this comment.
This should go away, and the repo fixed up for the version frontend-base provides.
comments addressed! thank you! |
Description
PR to migrate this repository to frontend base. It closes this issue.
Turning the MFE into a library that runs inside the
frontend-base shell. Follows the official "Migrating an MFE to frontend-base" guide.
How I have tested this change?
Screenshots
Closes #211