Commit Graph

7 Commits

Author SHA1 Message Date
Bilal Qamar
42810a5e36 feat: migrated tests from enzyme to RTL 2023-12-19 15:02:27 +05:00
Bilal Qamar
4a02f0ef6d feat: update react & react-dom to v17 (#769)
* feat: update react & react-dom to v17
* build: update lock file and paragon
* Merge branch 'master' of github.com:openedx/frontend-app-profile into bilalqamar95/react-upgrade-to-v17
* refactor: updated edx packages
---------

Co-authored-by: mashal-m <mashal.malik@arbisoft.com>
2023-07-07 10:17:53 -04:00
David Joy
e3b692b9f2 Update Paragon to 13 and make the app brandable (#397)
* 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
2021-02-05 13:38:36 -05:00
Adam Butterworth
be67c13914 feat: delegate build scripts to edx/frontend-build (#257) 2019-09-25 11:54:49 -04:00
David Joy
5ac0558a92 Use frontend-base! (#220)
* Adding frontend-builder and frontend-core stubs

* gatsby stub added

* Remove gatsby stuff.

* Reorganization of top level app.

Some naming TBD.

* Review feedback.

* Various config improvements

- Adding APP_ERROR handler for top level errors.
- Splitting footer config out of main app config.
- Simplifying config variables and deriving some from others in the files that need them.

* Use App.error()

* Improving exports/imports from frontend-core

* Moving header and footer out of src.

Getting rid of “common”

* Setting authentication directlty from App.authentication in AppProvider.

* Switching over to using frontend-base.

Updating a bunch of dependencies to their latest versions in the process.

* Bumping versions of frontend-base and frontend-auth

* Getting tests working again.

* Addressing review feedback and bumping to a newer version of frontend-base.

* Removing unneeded eslint disable lines.

* Updating usage of frontend-logging to remove deprecated method names.

* Bumping node-sass version to 4.12.0 - hopefully fixes node 12 build

* css-loader now requires cssnano for minification

* fix: couldn’t set preferred language visibility.
2019-09-16 16:49:16 -04:00
Douglas Hall
73ac32ac9f Move to frontend-i18n library. 2019-05-31 09:21:27 -04:00
Douglas Hall
b79aa790fa Initial commit. 2019-01-14 16:37:21 -05:00