[APER-2261]
This PR adds Algolia support to the Profile MFE and the upcoming Skills Builder feature.
* Adds new dependency for the `algoliasearch` package
* Add new config to support Algolia
* Update MFE configuration so we can access the new configuration variables
* Add hook to initialize Algolia client and return job and product Algolia indexes (based on settings)
* Update SkillsBuilderModal to add test code that displays the results of querying Algolia
* feat: add unit tests for LearningGoal component
* feat: add LearningGoals component to Profile
---------
Co-authored-by: Jason Wesson <jwesson@2u.com>
[APER-2240]
The Profile MFE no longer needs to understand anything about the Learner Record MFE. The Credentials IDA now has logic to determine if a request should be redirected to the Learner Record MFE so we can remove these changes from the Profile MFE.
* build: cleanup environment variables
Setting 'null' to an empty string '' (which is falsy and the right thing here)
* fix: clean up unused dependencies
- Removing a number of packages from dependencies that simply were not in use.
- Removing 'font-awesome' dependency which we didn't actually need in our stylesheet - we don't use it, though we were importing it and setting a variable from it. Not sure why it was ever there.
* fix: remove unused dependency
We get 'history' through frontend-platform.
[MICROBA-1321]
* Add two new configuration settings: `ENABLE_LEARNER_RECORD_MFE` and `LEARNER_RECORD_MFE_BASE_URL`
* Add function to `ProfilePage.jsx` to determine where learners should be routed (Credentials or Learner Record MFE) when the `View My Records` button is pressed on the profile page.
* fix: fixing broken linter script and linting
The linter script in package.json didn’t specify which files to lint, so it never linted anything. As soon as I fixed the script line, there was suddenly a ton of stuff that needed linting.
This fixes the script and cleans up all the things that needed linting. The vast majority were formatting auto-fixes in VSCode for me.
* fix: setting NODE_ENV to production in .env
Without this change, the NODE_ENV comes through as “null” (a string!) in the app. This causes a number of third party dependencies like React and Redux to potentially go into development mode, slowing them down, or to not realize they’re in production mode, causing them to throw some warnings.
* style: some additional linting
* feat: upgrading to modern paragon and a brand package
This commit updates the app from Paragon 7 to 12 and fixes the breaking changes in between. Mostly small changes to Button and Dropdown, as well as using “container” instead of “container-fluid” to preserve the page’s width as closely as possible.
It also adds the brand package, which is why it’s a feature. Using the brand package allows the MFE to be rebranded by using an npm alias to override the source of the brand.
* test: fixing test snapshots that failed when updating paragon
The test snapshots got a bit out of date when updating paragon. Also removing an unncessary “type” from Dropdown.Toggle which does nothing.
- container has been replaced by container-fluid
- The Button component is a different implementation, which adds slightly different properties to the rendered button. i.e., onKeyDown and disabled, but doesn’t add the id or onBlur.
- The Dropdown doesn’t render its contents until it’s opened, which is why “Upload Photo” and “Remove” are no longer in the snapshot.
-
* build: bumping paragon to 13
* fix: fixing broken test snapshot
btn-outline is definitely not a correct button type.
* fix: using the ‘size’ property on Button
* fix: updating dependencies
We needed to upgrade paragon to 13.1.2 to fix a transpilation issue that was causing ES6 code to be included in the build artifact. All other upgrades here were attempts at fixing that, but they’re all also perfectly valid and good to update, so I left them.
babel-polyfill has been replaced by including core-js and regenerator-runtime.
Upgrading frontend-build fixed an issue with eslint configuration that emerged during the other upgrades.
* fix: switch back to container-fluid
We want to leave it as container-fluid and solve the max width problem through paragon.
* style: cleanup and formatting of SCSS
Also removing an unnecessary variant of primary on a button.
* test: fix broken snapshot test