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: Absorbing frontend-platform and frontend-component-header, adding shell #8

Merged
merged 1,543 commits into from
Jul 24, 2024

Conversation

davidjoy
Copy link
Contributor

This PR adds the commit history from frontend-platform and frontend-component-header and does some work/configuration to get all of these libraries working harmoniously.

  • frontend-platform becomes the runtime sub-folder.
  • frontend-component-header becomes the shell/header sub-folder.
  • The shell is an initial pass at pulling in code from an MFE that our application shell should be responsible for and linking it up to the runtime and header. It is not yet functional.

This work was somewhat difficult because frontend-build and the 'runtime' libraries like frontend-platform/the header need different Typescript, Jest, Babel, and ESLint configurations. The commits I've added on top of the historical commit history are about tweaking all of that so that the build, test, and lint targets work properly for all the various parts of this library.

I had a version of this that used ts-jest for Jest tests, rather than babel-jest. It did not work. It is unable to process ES6+ source files in dependencies properly. In particular, it could not figure out how to process the icons subfolder of Paragon. I scoured the Internet for a solution, but never found one and gave up. babel-jest is the recommended, default way of using Jest with TypeScript and ES6 in general, so we're going to go use it.

The test-app folder is a merged version of the test apps in frontend-build and frontend-platform. It's intended to be run with a webpack dev server and visually inspected by a human. It has no automated test suite - this is intentional, as getting Jest to work on a project-inside-a-project has proven difficult and error prone, and I couldn't get it to work at all, similar to the paragon issues above. Transpilers do not like it when a dependency (frontend-base) is "above" the package to be transpiled.

renovate bot and others added 30 commits October 12, 2023 12:10
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix: href property issue in gatsby build

* chore: improve code coverage
…585)

BREAKING CHANGE: paragon and react-intl upgrade could end up causing dependency issues for consumers as well as package mismatch which would be a breaking change.
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#414)

Part of openedx/axim-engineering#23

This updates the `@edx/brand` alias to point to the `brand-openedx` package at
the `openedx` scope. This does not impact imports because this package is used
via an alias.
…#586)

Part of openedx/axim-engineering#23

This updates the `@edx/brand` alias to point to the `brand-openedx` package at
the `openedx` scope. This does not impact imports because this package is used
via an alias.
* feat: babel-plugin-react-intl to babel-plugin-formatjs migration

* fix: upgraded frontend-build to fix security issue

* fix: upgraded frontend-build to fix security issue

* fix: upgraded frontend build again

* refactor: upgraded to latest frontend-build and resolved vulnerabilities
davidjoy and others added 24 commits July 10, 2024 18:00
Just getting the initial files in.  To become more real, we need the header and footer.  Adding those repositories after this commit.
…r' into djoy/frontend-platform-merge

# Conflicts:
#	.env.development
#	.eslintignore
#	.eslintrc.js
#	.github/workflows/ci.yml
#	.github/workflows/lockfileversion-check.yml
#	.gitignore
#	LICENSE
#	Makefile
#	jest.config.js
#	package-lock.json
#	package.json
#	public/index.html
#	renovate.json
…hell

This is a first step at incorporating the header.  Mostly it deletes files we don’t want in this repo, and moves frontend-component-header’s “src” folder into “shell/header”.  The ‘example’ server from the header is deleted; we’ll spend some time incorporating it into test-app later.  Similarly, the README.rst is deleted.  Because the header is no longer a component that can be used directly, it requires a very different set of docs.

Subsequent commits will get the header so it actually works with the shell.
When they were in frontend-platform they didn’t have anywhere better to go.  But now we have a separate jest config appropriate for node.
Jest tests in the test app don’t really work well because many of the dependencies are outside the project directory.  They’re not worth it - there was only an ExamplePage test anyway, and we intended the test-app to be a thing a developer would load manually.
Cleaning up some references to frontend-platform, and hooking up the header so it’s imports are correct.
ts-jest is not able to resolve ES6+ code in dependencies on its own.  It completely chokes on the icons folder in paragon.  I’ve spent days trying to fix this, and don’t believe it’s possible.  It is not a mature/flexible tool for our purposes, so we need to abandon it.  Jest is intended to work with Babel for Typescript support, so we’re going back to that.  This commit re-instates Babel for use in Jest - the webpack build does not use it.

It also straightens out our various Jest configs so they only match the files they’re supposed to and stop testing and reading files in other areas of the project.
Needs an i81n folder for translations, and actual contents in the index.scss file.  The brand lines there are temporary, and we’ll add the ‘footer’ once the frontend-component-footer repo is added.
# Conflicts:
#	package-lock.json
#	package.json
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 24, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @davidjoy!

What's next?

Please work through the following steps to get your changes 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.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently unmaintained.

To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:

  1. On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
  2. Find their GitHub handle here.

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.

@davidjoy davidjoy merged commit 56f2877 into openedx:main Jul 24, 2024
1 check passed
@openedx-webhooks
Copy link

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

davidjoy pushed a commit to davidjoy/frontend-base that referenced this pull request Jul 31, 2024
* refactor: error boundary
---------

Co-authored-by: Maxwell Frank <[email protected]>
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.