Compare commits

...

709 Commits

Author SHA1 Message Date
renovate[bot]
e08014c656 chore(deps): update dependency @edx/frontend-component-footer to v14.9.3 (#1288)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 05:44:12 +00:00
renovate[bot]
6fd8b2506c chore(deps): update dependency @edx/frontend-platform to v8.5.2 (#1289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 05:44:08 +00:00
renovate[bot]
cf382b89ed chore(deps): update dependency @openedx/paragon to v23.14.9 (#1286)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 06:14:41 +00:00
edX requirements bot
9306d45284 chore: update browserslist DB (#1285)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-10-20 00:16:20 +00:00
renovate[bot]
773fdaba28 fix(deps): update dependency core-js to v3.46.0 (#1283)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 04:29:50 +00:00
renovate[bot]
b07a7602e4 chore(deps): update dependency @openedx/paragon to v23.14.8 (#1282)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 04:29:41 +00:00
edX requirements bot
d0416cdcd2 chore: update browserslist DB (#1281)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-10-13 00:15:38 +00:00
renovate[bot]
8f78079112 chore(deps): update dependency @openedx/paragon to v23.14.4 (#1278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-06 04:38:45 +00:00
renovate[bot]
4956d8966f chore(deps): update dependency @testing-library/jest-dom to v6.9.1 (#1279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-06 04:38:30 +00:00
edX requirements bot
20eb6b9de3 chore: update browserslist DB (#1277)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-10-06 00:14:55 +00:00
Feanil Patel
b43f088f9f Merge pull request #1274 from openedx/feanil/remove-reactifex-packages
build: remove unused reactifex packages
2025-09-29 10:54:51 -04:00
renovate[bot]
5f4d620b1e chore(deps): update dependency @openedx/paragon to v23.14.3 (#1275)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-29 14:52:29 +00:00
Feanil Patel
a7ef931ef5 build: remove unused reactifex packages
Remove reactifex and @edx/reactifex packages from devDependencies as they are no longer
needed. Translation extraction functionality has been verified to work
correctly without these dependencies.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 10:49:42 -04:00
Feanil Patel
1ac78e2752 Merge pull request #1267 from raccoongang/Artur_Filippovskii/node24-upgrade-3
test: Remove support for Node 20
2025-09-29 10:48:19 -04:00
artur.filippovskii
2867ea653b test: Remove support for Node 20 2025-09-29 09:53:49 +03:00
artur.filippovskii
3f71adec02 build: Upgrade to Node 24 2025-09-26 11:56:19 -03:00
artur.filippovskii
e33573e503 test: Add Node 24 to CI matrix 2025-09-26 09:50:36 -03:00
renovate[bot]
1b2b34e0e4 chore(deps): update dependency @testing-library/jest-dom to v6.8.0 (#1273)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 05:36:18 +00:00
renovate[bot]
5f34256118 fix(deps): update dependency core-js to v3.45.1 (#1272)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 05:35:47 +00:00
edX requirements bot
d9ab9a9c4c chore: update browserslist DB (#1271)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-09-22 00:16:14 +00:00
renovate[bot]
29979a57e1 fix(deps): update dependency @edx/frontend-platform to v8.5.1 (#1269)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 04:35:36 +00:00
renovate[bot]
97144ba002 fix(deps): update dependency @edx/frontend-component-footer to v14.9.2 (#1268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 04:35:17 +00:00
renovate[bot]
10bb6e1b3e fix(deps): update dependency @edx/frontend-component-header to v6.6.1 (#1265)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 04:51:26 +00:00
renovate[bot]
4a37b68550 fix(deps): update dependency @edx/frontend-component-footer to v14.9.1 (#1264)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 04:51:02 +00:00
edX requirements bot
f50c77e051 chore: update browserslist DB (#1263)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-09-08 00:15:47 +00:00
Samuel Allan
67c3ce6402 fix: update frontend-build to fix install issues (#1260)
Earlier versions of @openedx/frontend-build used on older version of
'sharp', which caused intermittent installation issues. The version of
'sharp' was updated in @openedx/frontend-build to fix these issues, so
the frontend-build version can be updated here, to fix the issues in
this project too. See
https://github.com/openedx/frontend-build/issues/664 and
https://github.com/openedx/frontend-build/pull/665 for more information.

The frontend-build dependency was updated by:

```
npm install --package-lock-only @openedx/frontend-build
```

Private-ref: https://tasks.opencraft.com/browse/BB-9953
2025-09-04 08:47:08 -06:00
edX requirements bot
3a7a443d5b chore: update browserslist DB (#1259)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-09-01 00:17:47 +00:00
renovate[bot]
7c7e472fb2 fix(deps): update dependency @openedx/paragon to v23.14.2 (#1258)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 05:07:17 +00:00
renovate[bot]
c74c62f5a0 fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.6 (#1257)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 05:07:05 +00:00
edX requirements bot
8e1c4f06c4 chore: update browserslist DB (#1256)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-08-25 00:16:16 +00:00
Simone Saturno
d2ed3e54ee refactor: replaced injectIntl with useIntl (#1239)
* refactor: replaced injectIntl with useIntl

* test: update tests for useIntl hook implementation

* fix: add missing trailing comma

* test: fix failing component tests and remove deprecated defaultProps

- Fix SwitchContent component defaultProps warning with default parameters
- Fix Visibility component formatMessage errors and remove defaultProps
- Fix FormControls component intl provider issues with useIntl mock
- Fix EditButton component defaultProps and message formatting
- Update EditableItemHeader, EmptyContent components
- Replace React defaultProps with ES6 default parameters across components
- Update test mocking to properly handle useIntl hook
- All 82 tests now pass (previously 4 failed, 78 passed)

Resolves React deprecation warnings and modernizes component patterns.

* fix: add missing trailing comma
2025-08-18 10:00:13 -04:00
edX requirements bot
c73d1f96a0 chore: update browserslist DB (#1255)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-08-18 00:17:07 +00:00
Brayan Cerón
8b88de618d feat: add slot to extend the profile fields (#1211)
* feat: add extended profile fields functionality with context and form components

* refactor: replace string literals with FORM_MODE constants in profile fields components

* feat: implement BaseField component and refactor field elements to use it

* chore: remove unused webpack development configuration file

* feat: refactor extended profile fields implementation and remove unused components

* feat: update dependencies for frontend-plugin-framework and remove unused dompurify

* refactor: simplify pluginProps structure in ExtendedProfileFieldsSlot component

* feat: add README and example images for Extended Profile Fields slot

* refactor: improve performance & keep consistency

* feat: add Additional Profile Fields slot with example implementation and documentation

* feat: update custom fields image for Additional Profile Fields slot

* fix: reorder import of AdditionalProfileFieldsSlot for consistency

* test: fix snapshot

* fix: adjust margin in example to avoid oddities on mobile

* fix: remove unnecessary empty divs from ProfilePage snapshots
2025-08-13 15:25:45 -04:00
ayesha waris
872fa4c917 test: added test cases to improve test coverage (#1254)
Co-authored-by: Ayesha Waris <ayesha.waris@192.168.1.75>
2025-08-13 15:21:09 +05:00
renovate[bot]
cdf19f4ba5 fix(deps): update dependency core-js to v3.45.0 (#1253)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 05:22:00 +00:00
renovate[bot]
67af9d0f8d fix(deps): update dependency @edx/frontend-platform to v8.5.0 (#1252)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 05:21:51 +00:00
edX requirements bot
7ac0e21741 chore: update browserslist DB (#1251)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-08-11 00:17:23 +00:00
Eemaan Amir
25a0f08850 fix: fixed styling of buttons (#1250)
* fix: fixed styling of buttons

* test: updated test snapshots
2025-08-07 16:17:55 +05:00
renovate[bot]
cb0af0df7b fix(deps): update dependency @openedx/paragon to v23.14.1 (#1248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 05:43:14 +00:00
renovate[bot]
23f8b5a58c fix(deps): update dependency @edx/frontend-component-header to v6.6.0 (#1249)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 05:42:43 +00:00
edX requirements bot
ea50a3ec10 chore: update browserslist DB (#1247)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2025-08-04 00:17:53 +00:00
Kyle McCormick
31a0e43a92 chore: Delete CODEOWNERS (#1245)
See: https://github.com/openedx/axim-engineering/issues/1511
2025-07-31 16:18:14 -04:00
renovate[bot]
927fb56c8b fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.3 (#1244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 06:50:28 +00:00
renovate[bot]
1f88d5752f chore(deps): update dependency @testing-library/jest-dom to v6.6.4 (#1243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 06:50:07 +00:00
renovate[bot]
58e14019dc fix(deps): update dependency core-js to v3.44.0 (#1237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 07:13:53 +00:00
renovate[bot]
e373c7da75 fix(deps): update dependency @edx/frontend-component-header to v6.4.2 (#1236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 07:13:40 +00:00
Eemaan Amir
2b3857d922 fix: added country code list to profilePage state (#1235) 2025-07-11 18:43:36 +05:00
Eemaan Amir
863937be88 fix: added DISABLE_VISIBILITY_EDITING flag to index (#1234) 2025-07-11 17:33:47 +05:00
Eemaan Amir
9d5a89d4c6 feat: removed flag for new profile UI and depreacted old code (#1233) 2025-07-11 11:09:13 +05:00
Awais Ansari
762e29047f feat: merge 2u-main into master (#1231)
* feat: added country disabling feature (#1084)

* feat: added country disabling feature

* fix: lint errors

* test: added test case for disabled countries

* refactor: combined test cases

* feat: reskin of Profile MFE main page (#1114)

* feat: reskin of Profile MFE main page

* feat: reskin of Profile MFE main page

* test: updated tests according to the changes

* fix: added missing name property

* test: updated test snapshot

* test: added tests for reducers

* feat: moved reskin logic behind env variable

* test: updated tests

* refactor: refactored code according to requested changes

* fix: fixed lint errors

* refactor: refactored code according to requested changes

* refactor: refactored code according to requested changes

* feat: fixed reloading issue

* fix: fixed responsiveness issues on mobile view (#1133)

* fix: fixed reponsiveness issues on mobile view

* test: updated tests

* refactor: refactored code as requested

* test: added not found test case

* test: updated test cases

* feat: added restricted country functionality

* fix: fixed test cases

* test: updated snapshot

* test: updated test cases

* feat: made profile editable (#1212)

* feat: readded editable fields to new profile view

* feat: made fullname editable and updated design

* test: updated test cases

* refactor: refactored code based on reviews

* feat: made fullname uneditable and added redirect link (#1215)

* feat: made fullname uneditable and added redirect link

* refactor: refactored code

* refactor: refactored code

* chore: rebase 2u-main with master (#1225)

* fix(deps): update dependency @edx/frontend-platform to v8.3.3 (#1187)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency core-js to v3.41.0 (#1188)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update `@openedx` dependencies to versions that support React 18 (#1189)

* chore(deps): update dependency @openedx/frontend-build to v14.4.1 (#1191)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update react-router monorepo to v6.30.0 (#1192)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: upgrade react to v18 (#1190)

* fix(deps): update dependency @edx/frontend-platform to v8.3.4 (#1195)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.4.0 (#1196)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-header to v6.3.0 (#1197)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.6.0 (#1199)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/openedx-atlas to ^0.7.0 (#1200)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-header to v6.4.0 (#1201)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: import `FooterSlot` from component package instead of slot package (#1198)

* chore(deps): update dependency glob to v11.0.2 (#1202)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.7.0 (#1203)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.7.1 (#1204)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency core-js to v3.42.0 (#1205)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-platform to v8.3.6 (#1207)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update commitlint monorepo to v19.8.1 (#1206)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-platform to v8.3.7 (#1209)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.7.2 (#1213)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update react-router monorepo to v6.30.1 (#1214)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-platform to v8.3.9 (#1216)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @edx/frontend-component-footer to v14.9.0 (#1217)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat!: add design tokens support (#1220)

BREAKING CHANGE: Pre-design-tokens theming is no longer supported.

Co-authored-by: Diana Olarte <diana.olarte@edunext.co>

* fix: fixed lint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com>
Co-authored-by: Hunia Fatima <huniafatima99@gmail.com>
Co-authored-by: Diana Olarte <diana.olarte@edunext.co>
Co-authored-by: sundasnoreen12 <sundasnoreen12@gmail.com>

* fix: fixed font sizing issue after applying elm theme (#1228)

* Revert "fix: fixed font sizing issue after applying elm theme (#1228)" (#1232)

This reverts commit a9159f6613.

---------

Co-authored-by: muhammadadeeltajamul <muhammadadeeltajamul@hotmail.com>
Co-authored-by: Muhammad Adeel Tajamul <77053848+muhammadadeeltajamul@users.noreply.github.com>
Co-authored-by: Eemaan Amir <57627710+eemaanamir@users.noreply.github.com>
Co-authored-by: sundasnoreen12 <sundasnoreen12@gmail.com>
Co-authored-by: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com>
Co-authored-by: Hunia Fatima <huniafatima99@gmail.com>
Co-authored-by: Diana Olarte <diana.olarte@edunext.co>
Co-authored-by: eemaanamir <eemaan.amir@gmail.com>
2025-07-10 10:12:21 +05:00
renovate[bot]
fa7267f17c fix(deps): update dependency @openedx/paragon to v23.14.0 (#1230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 06:54:42 +00:00
renovate[bot]
7b754edef8 fix(deps): update dependency @edx/frontend-component-header to v6.4.1 (#1229)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 06:54:14 +00:00
renovate[bot]
0bb7ee2fd4 fix(deps): update dependency core-js to v3.43.0 (#1223)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 11:39:56 +00:00
renovate[bot]
335dd7819d chore(deps): update dependency glob to v11.0.3 (#1222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 11:39:43 +00:00
renovate[bot]
b18a01c302 fix(deps): update dependency @openedx/paragon to v23.13.0 (#1226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 05:06:16 +00:00
Brian Smith
981dccf2d5 feat!: add design tokens support (#1220)
BREAKING CHANGE: Pre-design-tokens theming is no longer supported.

Co-authored-by: Diana Olarte <diana.olarte@edunext.co>
2025-06-18 12:13:59 -04:00
renovate[bot]
e8be148ca9 fix(deps): update dependency @edx/frontend-component-footer to v14.9.0 (#1217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 08:03:40 +00:00
renovate[bot]
167a8bd9a8 fix(deps): update dependency @edx/frontend-platform to v8.3.9 (#1216)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 07:58:23 +00:00
renovate[bot]
db2336ac09 fix(deps): update react-router monorepo to v6.30.1 (#1214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 06:07:45 +00:00
renovate[bot]
a13c25d4ea fix(deps): update dependency @edx/frontend-component-footer to v14.7.2 (#1213)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 06:07:26 +00:00
renovate[bot]
9452b72525 fix(deps): update dependency @edx/frontend-platform to v8.3.7 (#1209)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 13:58:23 +00:00
renovate[bot]
3601cb6c05 chore(deps): update commitlint monorepo to v19.8.1 (#1206)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 07:18:40 +00:00
renovate[bot]
b73c0f0f26 fix(deps): update dependency @edx/frontend-platform to v8.3.6 (#1207)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 07:07:33 +00:00
renovate[bot]
37feffc0db fix(deps): update dependency core-js to v3.42.0 (#1205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 06:10:05 +00:00
renovate[bot]
c9d2813009 fix(deps): update dependency @edx/frontend-component-footer to v14.7.1 (#1204)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 06:09:50 +00:00
renovate[bot]
8ec67d9ed2 fix(deps): update dependency @edx/frontend-component-footer to v14.7.0 (#1203)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 06:04:06 +00:00
renovate[bot]
1d149f12ea chore(deps): update dependency glob to v11.0.2 (#1202)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 06:03:48 +00:00
Brian Smith
9516ee0e92 feat: import FooterSlot from component package instead of slot package (#1198) 2025-04-24 12:11:20 -04:00
renovate[bot]
29fd7176c8 fix(deps): update dependency @edx/frontend-component-header to v6.4.0 (#1201)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 20:18:38 +00:00
renovate[bot]
16ddd7abba fix(deps): update dependency @edx/openedx-atlas to ^0.7.0 (#1200)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 05:46:19 +00:00
renovate[bot]
577ef6ab0b fix(deps): update dependency @edx/frontend-component-footer to v14.6.0 (#1199)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 05:46:13 +00:00
renovate[bot]
8268fa4eab fix(deps): update dependency @edx/frontend-component-header to v6.3.0 (#1197)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 06:11:54 +00:00
renovate[bot]
5665f8a0d6 fix(deps): update dependency @edx/frontend-component-footer to v14.4.0 (#1196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 06:11:46 +00:00
renovate[bot]
4b7a3207e0 fix(deps): update dependency @edx/frontend-platform to v8.3.4 (#1195)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 07:51:52 +00:00
Hunia Fatima
3db0289aab feat: upgrade react to v18 (#1190) 2025-04-04 11:16:23 -04:00
renovate[bot]
85d3eca9e4 fix(deps): update react-router monorepo to v6.30.0 (#1192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 06:47:19 +00:00
renovate[bot]
f7fd2959ac chore(deps): update dependency @openedx/frontend-build to v14.4.1 (#1191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 06:47:09 +00:00
Brian Smith
8652206aa4 chore(deps): update @openedx dependencies to versions that support React 18 (#1189) 2025-03-27 16:17:12 -04:00
renovate[bot]
7a5e03967d fix(deps): update dependency core-js to v3.41.0 (#1188)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 06:30:58 +00:00
renovate[bot]
da19dfaadc fix(deps): update dependency @edx/frontend-platform to v8.3.3 (#1187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 06:30:34 +00:00
renovate[bot]
60d960276d fix(deps): update dependency @edx/frontend-platform to v8.3.1 (#1178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-18 11:02:27 +00:00
Awais Ansari
c8a6f9fbd8 test: updated profile test cases (#1182) 2025-03-18 15:58:48 +05:00
renovate[bot]
2ef5a7baff chore(deps): update commitlint monorepo to v19.8.0 (#1177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 01:35:10 -04:00
renovate[bot]
d59c641b3d chore(deps): update dependency @openedx/frontend-build to v14.3.2 (#1176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 01:34:58 -04:00
renovate[bot]
4ea80a2a09 chore(deps): update dependency @openedx/frontend-build to v14.3.1 (#1175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 01:52:17 -05:00
renovate[bot]
45fe50f7f7 fix(deps): update dependency @openedx/paragon to v22.15.3 (#1174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 01:51:54 -05:00
renovate[bot]
933a177c78 fix(deps): update dependency @openedx/paragon to v22.15.2 (#1170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 06:10:14 +00:00
renovate[bot]
14fff570a4 fix(deps): update dependency @edx/frontend-component-header to v5.8.3 (#1169)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 01:09:59 -05:00
sundasnoreen12
3d0f3806e1 Merge pull request #1168 from openedx/revert-1166-sundas/INF-1779
Revert "feat: addd countries changes for embargo"
2025-02-22 15:47:48 +05:00
sundasnoreen12
b597e2cc14 Revert "feat: addd countries changes for embargo" 2025-02-22 15:44:11 +05:00
sundasnoreen12
22dc85470a Merge pull request #1166 from openedx/sundas/INF-1779
feat: addd countries changes for embargo
2025-02-22 15:10:21 +05:00
sundasnoreen12
9a26dc7088 refactor: refactored test file 2025-02-20 16:55:53 +05:00
sundasnoreen12
770a248d8c refactor: fixed review suggestions 2025-02-19 16:14:48 +05:00
sundasnoreen12
70cb1803b4 refactor: added constant 2025-02-17 21:09:11 +05:00
sundasnoreen12
e9aa787ade test: fixed test case 2025-02-17 18:29:21 +05:00
sundasnoreen12
01e2f1af79 test: fixed test cases 2025-02-17 18:10:57 +05:00
sundasnoreen12
1e67d51394 feat: addd countries changes for embargo 2025-02-17 13:18:02 +05:00
renovate[bot]
95936419c2 fix(deps): update react-router monorepo to v6.29.0 (#1162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 08:50:22 +00:00
renovate[bot]
00ada93994 fix(deps): update font awesome to v6.7.2 (#1161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 03:50:09 -05:00
renovate[bot]
c57a924cc3 fix(deps): update dependency core-js to v3.40.0 (#1160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 05:36:00 +00:00
renovate[bot]
dc2f03dfad fix(deps): update dependency @openedx/paragon to v22.15.1 (#1159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 00:35:51 -05:00
renovate[bot]
5c7a521705 chore(deps): update dependency @edx/browserslist-config to v1.5.0 (#1158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 05:11:55 +00:00
renovate[bot]
074374b2af chore(deps): update commitlint monorepo to v19.7.1 (#1157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 00:11:44 -05:00
renovate[bot]
0a3aad38dc fix(deps): update dependency @edx/frontend-platform to v8.1.5 (#1156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 05:10:58 +00:00
renovate[bot]
1730b5a2c4 chore(deps): update dependency glob to v11.0.1 (#1155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 00:10:45 -05:00
Deborah Kaplan
12269c2c8e Merge pull request #1154 from salman2013/salman/update-catalog-info-file
Add catalog-info.yaml file for release data
2025-01-14 11:06:08 -05:00
salman2013
630dbefb7e chore: Update catalog-info file and remove openedx.yaml 2025-01-14 15:04:47 +05:00
renovate[bot]
00c8697c59 chore(deps): update dependency @commitlint/config-angular to v19.7.0 (#1153)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 02:23:40 -05:00
renovate[bot]
8df3d06598 fix(deps): update dependency @edx/frontend-platform to v8.1.4 (#1152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 07:23:31 +00:00
renovate[bot]
f6ed6ee1f5 fix(deps): update dependency @openedx/paragon to v22.13.0 (#1151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-30 06:41:46 +00:00
renovate[bot]
7e8d22ec6a chore(deps): update dependency @edx/browserslist-config to v1.4.0 (#1150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-30 01:41:34 -05:00
renovate[bot]
d0595e679d fix(deps): update react-router monorepo to v6.28.1 (#1149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 03:37:53 -05:00
renovate[bot]
4c7e713b6e fix(deps): update dependency @edx/frontend-platform to v8.1.3 (#1148)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 08:37:41 +00:00
renovate[bot]
bc0683281f fix(deps): update dependency @edx/frontend-component-header to v5.8.2 (#1147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 06:47:58 +00:00
renovate[bot]
b954345b38 chore(deps): update dependency @commitlint/cli to v19.6.1 (#1146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 06:47:46 +00:00
renovate[bot]
ca4f78bd1c chore(deps): update dependency @edx/browserslist-config to v1.3.0 (#1143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 06:42:17 +00:00
renovate[bot]
3dc8b156fe chore(deps): update dependency @openedx/frontend-build to v14.2.2 (#1142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 01:41:56 -05:00
renovate[bot]
a818cd4dc4 fix(deps): update dependency @edx/frontend-component-header to v5.8.1 (#1141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 08:30:04 +00:00
renovate[bot]
2e9dcd165e fix(deps): update dependency @openedx/frontend-slot-footer to v1.0.7 (#1140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 03:29:49 -05:00
sundasnoreen12
53a52b8f06 Merge pull request #1139 from openedx/sundasMasterBranch-INF-1594
feat: fixed loading issue for wrong username
2024-11-26 19:59:05 +05:00
sundasnoreen12
c66facee92 feat: fixed loading issue for wrong username 2024-11-26 16:32:50 +05:00
renovate[bot]
3270e27c94 chore(deps): update dependency @openedx/frontend-build to v14.2.0 (#1136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 03:33:45 -05:00
renovate[bot]
01cd125d4f chore(deps): update commitlint monorepo to v19.6.0 (#1135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 08:33:31 +00:00
renovate[bot]
5fcef4edf4 fix(deps): update dependency @openedx/paragon to v22.10.0 (#1128)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 06:25:48 +00:00
renovate[bot]
d33c79a525 fix(deps): update dependency @edx/frontend-component-header to v5.7.2 (#1127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 01:25:22 -05:00
renovate[bot]
d36c61d44e fix(deps): update react-router monorepo to v6.28.0 (#1126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 07:10:19 +00:00
renovate[bot]
aed6081d37 fix(deps): update dependency core-js to v3.39.0 (#1125)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 07:09:23 +00:00
renovate[bot]
66a4eef910 fix(deps): update dependency @openedx/frontend-slot-footer to v1.0.6 (#1124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 06:43:51 +00:00
renovate[bot]
6da6fedc57 fix(deps): update dependency @edx/frontend-component-header to v5.7.1 (#1123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 06:43:30 +00:00
edX requirements bot
a7e095f3bf chore: update browserslist DB (#1091)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-11-11 07:16:51 +05:00
Muhammad Adeel Tajamul
9a393d8e43 Merge pull request #1105 from openedx/renovate/glob-11.x
chore(deps): update dependency glob to v11
2024-11-11 07:16:06 +05:00
renovate[bot]
1a5c4f2404 chore(deps): update dependency glob to v11 2024-11-07 05:13:12 +00:00
Muhammad Adeel Tajamul
13aaca03fd Merge pull request #1118 from openedx/renovate/reselect-5.x
fix(deps): update dependency reselect to v5
2024-11-07 10:12:13 +05:00
renovate[bot]
422aff1915 fix(deps): update dependency reselect to v5 2024-11-04 09:21:34 +00:00
renovate[bot]
cac4e42364 fix(deps): update dependency @edx/frontend-component-header to v5.7.0 2024-11-04 06:01:48 +00:00
renovate[bot]
c6d39884c8 chore(deps): update dependency @testing-library/jest-dom to v6.6.3 2024-11-04 06:01:26 +00:00
Bilal Qamar
4bb3678d4c test: Remove support for Node 18 (#1075) 2024-10-31 14:46:22 -04:00
renovate[bot]
5c2951de40 chore(deps): update dependency redux-mock-store to v1.5.5 2024-10-28 04:53:32 +00:00
Brian Smith
35d9ae8fec feat(deps): update header to 5.6.0 (#1112) 2024-10-22 19:20:12 -04:00
renovate[bot]
ff32632411 fix(deps): update dependency @openedx/paragon to v22.9.0 2024-10-21 00:19:54 -04:00
renovate[bot]
2c97964f0b chore(deps): update dependency @testing-library/jest-dom to v6.6.2 2024-10-21 00:19:14 -04:00
Awais Ansari
fa748719ae Revert "chore(deps): update dependency @testing-library/react to v16" (#1107)
This reverts commit 1fb7b96c40.
2024-10-15 17:04:54 +05:00
renovate[bot]
1fb7b96c40 chore(deps): update dependency @testing-library/react to v16 2024-10-14 04:36:50 +00:00
renovate[bot]
e13d04a5ea fix(deps): update react-router monorepo to v6.27.0 2024-10-14 04:36:37 +00:00
renovate[bot]
e3f5129746 fix(deps): update dependency @edx/frontend-component-header to v5.5.0 2024-10-07 06:04:17 -04:00
renovate[bot]
24b054f55f fix(deps): update dependency @edx/frontend-platform to v8.1.2 2024-10-07 07:03:35 +00:00
renovate[bot]
8498d9f04f fix(deps): update dependency @openedx/paragon to v22.8.1 2024-09-30 02:06:48 -04:00
renovate[bot]
0fa58d8112 fix(deps): update dependency @edx/frontend-component-header to v5.4.0 2024-09-30 02:06:35 -04:00
renovate[bot]
312b114ef7 chore(deps): update dependency @testing-library/jest-dom to v6.5.0 2024-09-30 02:06:22 -04:00
renovate[bot]
a05b29e406 chore(deps): update dependency @openedx/frontend-build to v14.1.5 2024-09-30 00:04:06 -04:00
renovate[bot]
6e3e67467a chore(deps): update commitlint monorepo to v19.5.0 2024-09-23 03:26:23 -04:00
renovate[bot]
09b5c8b72d chore(deps): update dependency @openedx/frontend-build to v14.1.4 2024-09-23 03:26:10 -04:00
edX requirements bot
5e71737240 chore: update browserslist DB (#1085)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-09-17 09:14:49 -04:00
edX requirements bot
eb726e80ab chore: enable github action auto update in dependabot.yml (#1083) 2024-09-17 09:10:50 -04:00
renovate[bot]
4f1272b01c fix(deps): update dependency core-js to v3.38.1 2024-09-16 06:36:06 +00:00
renovate[bot]
30e3fcdcba fix(deps): update dependency @openedx/frontend-slot-footer to v1.0.5 2024-09-16 06:35:49 +00:00
edX requirements bot
b13fc58bad chore: update browserslist DB (#1078)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-09-10 15:03:36 -04:00
sundasnoreen12
31b31ba345 Merge pull request #1077 from openedx/sundas/INF-1551
docs: updated catalog-info file for profile MFE
2024-09-10 16:34:00 +05:00
sundasnoreen12
f7449bfdcc docs: added pull request template and updated team name 2024-09-10 13:19:17 +03:00
sundasnoreen12
cb0f05955f docs: updated catalog-info file for profile MFE 2024-09-10 13:18:09 +03:00
renovate[bot]
f1586d260a chore(deps): update dependency @openedx/frontend-build to v14.1.2 2024-09-09 04:34:22 +00:00
renovate[bot]
b268c43978 chore(deps): update commitlint monorepo to v19.4.1 2024-09-09 00:34:04 -04:00
edX requirements bot
ed58a41042 chore: update browserslist DB (#1076)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-09-03 09:15:26 -07:00
Deborah Kaplan
7e4ba48de8 Merge pull request #1074 from openedx/dependabot/npm_and_yarn/micromatch-4.0.8
build(deps): bump micromatch from 4.0.7 to 4.0.8
2024-08-27 09:48:00 -04:00
edX requirements bot
e9e16cc595 chore: update browserslist DB (#1071)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-08-27 09:45:47 -04:00
dependabot[bot]
88d786b49f build(deps): bump micromatch from 4.0.7 to 4.0.8
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 07:21:56 +00:00
renovate[bot]
a24fea54ec fix(deps): update dependency @openedx/frontend-slot-footer to v1.0.4 2024-08-26 07:20:58 +00:00
renovate[bot]
8980b22fff fix(deps): update dependency @edx/openedx-atlas to v0.6.2 2024-08-26 03:20:42 -04:00
Bilal Qamar
389d923a08 build: Upgrade to Node 20 (#1056)
* feat: updated node to v20
2024-08-23 10:27:32 -04:00
Bilal Qamar
714851c329 test: Add Node 20 to CI matrix (#1069) 2024-08-22 08:39:33 -04:00
Bilal Qamar
b27300e63d fix: updated failing snapshots (#1070) 2024-08-21 07:21:48 -07:00
renovate[bot]
0869a82a31 fix(deps): update font awesome to v6.6.0 2024-08-19 06:26:50 +00:00
renovate[bot]
507525262c fix(deps): update dependency core-js to v3.38.0 2024-08-19 06:26:33 +00:00
renovate[bot]
a69170a4d2 fix(deps): update dependency @openedx/paragon to v22.7.0 2024-08-19 04:19:32 +00:00
renovate[bot]
26203bb744 chore(deps): update dependency @openedx/frontend-build to v14.1.0 2024-08-19 00:19:15 -04:00
edX requirements bot
21fb4702b4 chore: update browserslist DB (#1062)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-08-14 13:58:49 -04:00
renovate[bot]
aa8d1f9473 chore(deps): update dependency @commitlint/cli to v19.4.0 2024-08-12 04:19:50 +00:00
renovate[bot]
b6e9df9778 chore(deps): update dependency @openedx/frontend-build to v14.0.15 2024-08-12 00:19:35 -04:00
edX requirements bot
a7ed0cd62a chore: update browserslist DB (#1059)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-08-05 15:21:00 -07:00
renovate[bot]
e61fada0b2 fix(deps): update dependency @edx/frontend-platform to v8.1.1 2024-08-05 07:45:45 -04:00
renovate[bot]
3b0b1be197 fix(deps): update dependency @edx/frontend-component-header to v5.3.4 2024-08-05 03:33:34 -04:00
renovate[bot]
616847c6b5 chore(deps): update dependency @testing-library/jest-dom to v6.4.8 2024-07-29 05:54:29 -04:00
renovate[bot]
95b41131fc chore(deps): update dependency @openedx/frontend-build to v14.0.14 2024-07-29 02:02:34 -04:00
edX requirements bot
59a3150706 chore: update browserslist DB (#1055)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-07-22 12:33:25 -04:00
edX requirements bot
774b67b208 chore: update browserslist DB (#1050)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-07-17 08:54:42 -04:00
renovate[bot]
9a855cd30e fix(deps): update react-router monorepo to v6.24.1 2024-07-15 07:39:30 +00:00
renovate[bot]
9c6647aeae fix(deps): update dependency @edx/frontend-platform to v8.1.0 2024-07-15 03:39:10 -04:00
renovate[bot]
ecdec9083a fix(deps): update dependency @openedx/frontend-slot-footer to v1.0.3 2024-07-15 01:07:15 -04:00
renovate[bot]
1c0746c907 chore(deps): update dependency glob to v10.4.5 2024-07-15 01:07:00 -04:00
edX requirements bot
e7f8a5d1ff chore: update browserslist DB (#1049)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-07-08 11:09:34 -07:00
edX requirements bot
d927b43c01 chore: update browserslist DB (#1042)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-07-01 17:18:34 -04:00
Deborah Kaplan
1a36d69bd8 Merge pull request #1048 from openedx/dkaplan1/APER-3263_take-2-create-codeowners-for-openedx/frontend-app-profile
feat: fixing codeowners
2024-07-01 17:17:36 -04:00
Deborah Kaplan
db90ce5975 Merge branch 'master' into dkaplan1/APER-3263_take-2-create-codeowners-for-openedx/frontend-app-profile 2024-07-01 16:11:42 -04:00
Deborah Kaplan
b22d411481 feat: fixing codeowners
I used internal team name, fixing to external
2024-07-01 20:10:25 +00:00
Deborah Kaplan
d7fff65162 Merge pull request #1047 from openedx/dkaplan1/APER-3263_create-codeowners-for-openedx/frontend-app-profile
feat:  adding codeowners
2024-07-01 16:08:26 -04:00
Deborah Kaplan
cf5d69c5ba feat: adding codeowners
this is a dependency for other parts of the flow

FIXES: APER-3263
2024-07-01 20:00:43 +00:00
renovate[bot]
53d26746c1 fix(deps): update dependency core-js to v3.37.1 2024-07-01 03:10:14 -04:00
renovate[bot]
048433a135 fix(deps): update dependency @openedx/paragon to v22.6.1 2024-07-01 03:09:56 -04:00
renovate[bot]
31136b0523 chore(deps): update dependency glob to v10.4.2 2024-07-01 00:28:36 -04:00
renovate[bot]
caaf8547dc chore(deps): update dependency @openedx/frontend-build to v14.0.10 2024-07-01 00:28:21 -04:00
dependabot[bot]
e92332859a build(deps): bump braces from 3.0.2 to 3.0.3 (#1034)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 16:03:48 -04:00
dependabot[bot]
55529b0b74 build(deps): bump ws from 7.5.9 to 7.5.10 (#1039)
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 16:03:35 -04:00
Adolfo R. Brandes
7682971b63 build: Update codecov and use token (#1033)
Update codecov to the latest version and start using the org-wide token for uploads.

See https://github.com/openedx/wg-frontend/issues/179
2024-06-25 16:03:11 -04:00
Emad Rad
6aaf615c63 fix: make raw string a formatted message (#1041) 2024-06-24 09:49:14 -07:00
edX requirements bot
3512fc56c9 chore: update browserslist DB (#1029)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-06-17 12:19:32 -04:00
renovate[bot]
fda2ef1977 chore(deps): update dependency glob to v10.4.1 2024-06-17 03:35:58 -04:00
renovate[bot]
3784c2a6df fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.2 2024-06-17 07:35:45 +00:00
renovate[bot]
04d74389ed chore(deps): update dependency @testing-library/jest-dom to v6.4.6 2024-06-17 03:35:29 -04:00
renovate[bot]
1d338d0127 chore(deps): update dependency @openedx/frontend-build to v14.0.9 2024-06-17 00:29:48 -04:00
renovate[bot]
0fd6e34a8e fix(deps): update dependency @edx/frontend-platform to v8.0.4 2024-06-10 13:09:22 +00:00
renovate[bot]
9d89c79fb2 fix(deps): update dependency @edx/openedx-atlas to v0.6.1 2024-06-10 07:54:31 +00:00
edX requirements bot
bfc31696ee chore: update browserslist DB (#1026)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-05-31 09:37:43 -04:00
renovate[bot]
8ebdc1030f fix(deps): update dependency @edx/frontend-platform to v8.0.3 2024-05-27 05:02:43 -04:00
renovate[bot]
8c3d706071 fix(deps): update dependency @edx/frontend-component-header to v5.3.3 2024-05-27 02:19:12 -04:00
Bilal Qamar
ee8912530d feat: updated frontend-build & frontend-platform major versions (#932)
* chore: updated frontend-build
* fix: updated snapshots for failing tests
* refactor: switched frontend-build to openedx, updated screenshots
* refactor: added overrides to resolve dependency issues
* refactor: updated frontend-build to alpha
* refactor: updated frontend-build
* feat: updated build and platform major versions, along with edx packages
* refactor: updated package-lock
* refactor: resolved lint issues
---------

Co-authored-by: Muhammad Abdullah Waheed <abdullah.waheed@arbisoft.com>
2024-05-22 13:21:34 -04:00
edX requirements bot
db91e0f1a4 chore: update browserslist DB (#1014)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-05-20 10:16:19 -04:00
renovate[bot]
5f2d0c089e fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.1 2024-05-20 03:31:00 -04:00
renovate[bot]
75be372ec9 fix(deps): update dependency @edx/frontend-component-header to v5.3.2 2024-05-20 07:30:45 +00:00
Brian Smith
9ef81f7485 feat: use frontend-plugin-framework to provide a FooterSlot (#1017) 2024-05-17 13:12:51 -03:00
Brian Smith
6a32790f28 fix: update footer to resolve (not so) optional peer dependency issue (#1022) 2024-05-14 10:43:50 -04:00
renovate[bot]
9f5f7f9a64 fix(deps): update dependency @openedx/paragon to v22.4.0 2024-05-13 02:29:21 -04:00
renovate[bot]
06f6e3537a fix(deps): update dependency @edx/frontend-component-footer to v13.2.0 2024-05-13 02:28:58 -04:00
renovate[bot]
44f0295d0d fix(deps): update dependency @edx/frontend-component-header to v5.3.1 2024-05-13 00:05:58 -04:00
renovate[bot]
19be2e93e2 chore(deps): update dependency glob to v10.3.15 2024-05-13 00:05:29 -04:00
renovate[bot]
5090a62594 fix(deps): update dependency @edx/frontend-component-header to v5.3.0 2024-05-06 02:08:43 -04:00
renovate[bot]
dc2bbee481 chore(deps): update dependency @testing-library/jest-dom to v6.4.5 2024-05-06 02:08:19 -04:00
edX requirements bot
8dc37f9bba chore: update browserslist DB (#1011)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-05-02 08:41:19 -04:00
renovate[bot]
14d93d2f6c fix(deps): update dependency @edx/frontend-component-footer to v13.1.0 2024-04-29 07:51:45 +00:00
renovate[bot]
768351fc15 chore(deps): update commitlint monorepo to v19.3.0 2024-04-29 03:51:20 -04:00
edX requirements bot
c3dc8b7330 chore: update browserslist DB (#1005)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-04-22 16:08:58 -04:00
renovate[bot]
9fd2d3f75a fix(deps): update dependency @edx/frontend-component-header to v5.2.0 2024-04-22 02:32:02 -04:00
renovate[bot]
760fa0c6a2 chore(deps): update dependency @openedx/frontend-build to v13.1.4 2024-04-22 02:31:34 -04:00
renovate[bot]
cf6a62266c fix(deps): update dependency @edx/frontend-platform to v7.1.4 2024-04-22 00:55:37 -04:00
renovate[bot]
f16fd36a24 fix(deps): update dependency @edx/frontend-component-footer to v13.0.5 2024-04-22 00:55:18 -04:00
Maxwell Frank
c30e1b3f17 chore(deps): upgrade to paragon v22 (#1004) 2024-04-19 13:33:52 -04:00
edX requirements bot
9985afde2d chore: update browserslist DB (#994)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-04-18 12:55:51 -07:00
renovate[bot]
ccd6e95f70 fix(deps): update font awesome to v6.5.2 2024-04-15 00:10:56 -04:00
renovate[bot]
fb904a5cc2 chore(deps): update commitlint monorepo to v19.2.2 2024-04-15 04:10:34 +00:00
renovate[bot]
a255bbe2b8 chore(deps): update commitlint monorepo 2024-04-01 02:50:14 -04:00
renovate[bot]
a314878cc4 fix(deps): update react-router monorepo to v6.22.3 2024-04-01 06:49:51 +00:00
renovate[bot]
61b8b0a509 fix(deps): update dependency @edx/frontend-platform to v7.1.3 2024-04-01 04:37:36 +00:00
renovate[bot]
f144cd857e chore(deps): update dependency glob to v10.3.12 2024-04-01 00:37:08 -04:00
Justin Hynes
c922a1cd29 revert: "chore(deps): update dependency @testing-library/react to v14" (#993)
This reverts commit a3611b026c. This version of `testing-library/react` doesn't play well with our current version of React.

We shouldn't upgrade this library until we're running a newer version of React in this MFE.
2024-03-29 10:59:43 -04:00
dependabot[bot]
6cefe7b3c0 build(deps): bump express and @openedx/frontend-build (#992)
Bumps [express](https://github.com/expressjs/express) to 4.19.2 and updates ancestor dependency [@openedx/frontend-build](https://github.com/openedx/frontend-build). These dependencies need to be updated together.


Updates `express` from 4.18.2 to 4.19.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

Updates `@openedx/frontend-build` from 13.0.29 to 13.0.30
- [Release notes](https://github.com/openedx/frontend-build/releases)
- [Commits](https://github.com/openedx/frontend-build/compare/v13.0.29...v13.0.30)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
- dependency-name: "@openedx/frontend-build"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 08:20:28 -04:00
renovate[bot]
a3611b026c chore(deps): update dependency @testing-library/react to v14 2024-03-29 08:20:14 -04:00
edX requirements bot
d33d3d9a4b chore: update browserslist DB (#988)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-03-29 08:19:37 -04:00
dependabot[bot]
ec68baa74e build(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#987)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 08:19:14 -04:00
renovate[bot]
7216b0f5cb fix(deps): update dependency core-js to v3.36.1 2024-03-25 11:50:35 +00:00
renovate[bot]
83b21bff7d chore(deps): update dependency @openedx/frontend-build to v13.0.29 2024-03-25 08:24:53 +00:00
dependabot[bot]
cb52875651 build(deps): bump follow-redirects from 1.15.4 to 1.15.6 (#984)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 14:31:07 -07:00
Samir Sabri
89bcceaadc feat!: remove Transifex calls for OEP-58 (#889) 2024-03-20 09:31:47 -04:00
edX requirements bot
51dc454948 chore: update browserslist DB (#981)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-03-18 11:57:00 -07:00
renovate[bot]
c7d57e24c3 fix(deps): update dependency @edx/frontend-platform to v7.1.2 2024-03-18 14:18:38 +00:00
renovate[bot]
54c702fb7f fix(deps): update dependency @edx/frontend-component-footer to v13.0.4 2024-03-18 11:31:15 +00:00
renovate[bot]
da6c9ebd1e fix(deps): update dependency @edx/frontend-platform to v7.1.1 2024-03-11 11:04:34 +00:00
renovate[bot]
f987e45c97 fix(deps): update dependency @edx/frontend-component-footer to v13.0.3 2024-03-11 10:41:35 +00:00
edX requirements bot
1f2ac2e1e7 chore: update browserslist DB (#977)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-03-07 10:29:27 -05:00
mashal-m
b13c26b06a refactor: remova paranthesis 2024-03-04 14:52:12 -03:00
mashal-m
b5ace63438 feat: add profile config in env files 2024-03-04 14:52:12 -03:00
mashal-m
15a81ee09f feat: replace legacy LMS url with account mfe url 2024-03-04 14:52:12 -03:00
renovate[bot]
fecfdc101c fix(deps): update react-router monorepo to v6.22.2 2024-03-04 12:39:13 +00:00
renovate[bot]
4fdf3ef190 chore(deps): update commitlint monorepo to v19.0.3 2024-03-04 10:09:31 +00:00
dependabot[bot]
88f4ac2349 build(deps): bump es5-ext from 0.10.62 to 0.10.63 (#974)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.63.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 15:58:11 -05:00
renovate[bot]
deaebd3333 chore(deps): update commitlint monorepo to v19 (#971)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-27 15:39:37 -05:00
Omar Al-Ithawi
6b0655aed3 fix: get @edx/openedx-atlas back to fix Tutor MFE
this is a partial revert for bd4b79baa0
which broke Tutor MFE.
2024-02-27 14:46:16 -03:00
edX requirements bot
2901345ea6 chore: update browserslist DB (#973)
Co-authored-by: justinhynes <3229735+justinhynes@users.noreply.github.com>
2024-02-26 15:53:47 -05:00
renovate[bot]
e51677b0f0 chore(deps): update dependency @testing-library/jest-dom to v6 2024-02-26 11:12:07 +00:00
Mashal Malik
676166a160 refactor: replace @edx/paragon and @edx/frontend-build (#945)
* refactor: replace @edx/paragon and @edx/frontend-build

* refactor: updated edx packages

---------

Co-authored-by: mashal-m <mashal.malik@arbisoft.com>
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2024-02-22 09:21:04 -08:00
Deborah Kaplan
761995b623 Merge pull request #967 from openedx/update-browserslist-db
Update browserslist DB
2024-02-21 15:08:55 -05:00
renovate[bot]
abc1b682d4 fix(deps): update dependency core-js to v3.36.0 2024-02-19 12:06:58 +00:00
renovate[bot]
3b37cbb76c fix(deps): update react-router monorepo to v6.22.1 2024-02-19 10:11:11 +00:00
jsnwesson
6c6229916e chore: update browserslist DB 2024-02-19 00:09:15 +00:00
edX requirements bot
2aeb7b0710 chore: update browserslist DB (#963)
Co-authored-by: jsnwesson <62807795+jsnwesson@users.noreply.github.com>
2024-02-15 10:42:46 -08:00
dependabot[bot]
a36c0629e9 build(deps): bump follow-redirects from 1.15.2 to 1.15.4 (#951)
Bumps follow-redirects from 1.15.2 to 1.15.4.
---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-15 10:33:35 -08:00
renovate[bot]
5a9d3887a7 fix(deps): update dependency @redux-devtools/extension to v3.3.0 2024-02-12 10:48:35 +00:00
Maxwell Frank
3fdd68b203 Merge pull request #958 from openedx/update-browserslist-db
Update browserslist DB
2024-02-05 14:43:57 -05:00
renovate[bot]
a1264deda0 fix(deps): replace dependency redux-devtools-extension with @redux-devtools/extension 3.0.0 (#960)
* fix(deps): replace dependency redux-devtools-extension with @redux-devtools/extension 3.0.0

* fix: dependency import

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Maxwell Frank <mfrank@2u.com>
2024-02-05 14:33:19 -05:00
renovate[bot]
f9fa5360d9 fix(deps): update react-router monorepo to v6.22.0 2024-02-05 10:59:24 +00:00
jsnwesson
b4a1ec6e60 chore: update browserslist DB 2024-02-05 00:09:10 +00:00
Omar Al-Ithawi
c30eb00c8d feat: tutor-mfe compatiblilty for atlas pull (#959)
- install atlas
 - remove `--filter` to pull all languages by default
 - use ATLAS_OPTIONS to allow custom `--filter`
 - include frontend-platform in `atlas pull`

Refs: FC-0012 OEP-58
2024-01-30 12:19:40 -05:00
Deborah Kaplan
fc75405597 Merge pull request #823 from openedx/renovate/major-font-awesome
fix(deps): update font awesome to v6 (major)
2024-01-24 16:54:49 -05:00
Deborah Kaplan
5726470881 feat: updating the snapshots
update jest snapshots
2024-01-24 21:33:26 +00:00
renovate[bot]
6bbae1f7f0 fix(deps): update font awesome to v6 2024-01-23 19:47:43 +00:00
Deborah Kaplan
ef5fe2fa91 Merge pull request #954 from openedx/update-browserslist-db
Update browserslist DB
2024-01-23 14:46:32 -05:00
Deborah Kaplan
585856ad89 Merge pull request #941 from openedx/bilalqamar95/enzyme-to-rtl-migration
feat: migrated tests from enzyme to RTL
2024-01-22 12:23:51 -05:00
Syed Ali Abbas Zaidi
8d1dbfe55d Merge branch 'master' of github.com:openedx/frontend-app-profile into bilalqamar95/enzyme-to-rtl-migration 2024-01-22 17:42:03 +05:00
renovate[bot]
8a9c78662f fix(deps): update react-router monorepo to v6.21.3 2024-01-22 12:39:23 +00:00
Syed Ali Abbas Zaidi
8eb0029970 chore: remove react-test-renderer 2024-01-22 17:38:53 +05:00
renovate[bot]
2dc20dd3fd fix(deps): update dependency core-js to v3.35.1 2024-01-22 10:41:46 +00:00
jsnwesson
2fefab5311 chore: update browserslist DB 2024-01-22 00:09:28 +00:00
renovate[bot]
e7ab90a778 fix(deps): update dependency redux-saga to v1.3.0 2024-01-15 15:16:11 +00:00
renovate[bot]
28226e4d03 fix(deps): update dependency core-js to v3.35.0 2024-01-15 09:15:58 +00:00
vladislavkeblysh
e59ab99d45 feat: Fixed displaying banner and certificates on mobile view (#860)
* feat: fixed displaing banner and certificates on mobile view

* feat: update snapshot
2024-01-08 13:58:27 -05:00
edX requirements bot
3f1fa50608 chore: update browserslist DB (#950)
Co-authored-by: justinhynes <justinhynes@users.noreply.github.com>
2024-01-08 13:54:57 -05:00
renovate[bot]
71a37ace78 fix(deps): update dependency classnames to v2.5.1 2024-01-01 12:57:10 +00:00
renovate[bot]
d4e16347b8 fix(deps): update dependency @edx/frontend-component-header to v4.11.0 2024-01-01 10:13:43 +00:00
renovate[bot]
76c94ef0e1 fix(deps): update dependency @edx/frontend-component-footer to v12.7.0 2023-12-25 13:55:39 +00:00
renovate[bot]
db6351560a fix(deps): update dependency core-js to v3.34.0 2023-12-25 09:22:23 +00:00
Feanil Patel
bd06a7ada7 Merge pull request #940 from openedx/nedbat/catalog-info-name
build: the name in catalog-info.yaml should be the repo name
2023-12-19 09:28:33 -05:00
Bilal Qamar
42810a5e36 feat: migrated tests from enzyme to RTL 2023-12-19 15:02:27 +05:00
Ned Batchelder
01e1dd027a build: the name in catalog-info.yaml should be the repo name 2023-12-18 17:48:08 -05:00
edX requirements bot
275b7f9ba5 chore: update browserslist DB (#937)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-12-18 13:54:43 -05:00
renovate[bot]
e18b6497ba fix(deps): update dependency regenerator-runtime to v0.14.1 2023-12-18 13:28:26 +00:00
renovate[bot]
14a4efe86b chore(deps): update dependency @edx/frontend-build to v13.0.14 2023-12-18 10:38:36 +00:00
Deborah Kaplan
5e602c9c0b Merge pull request #877 from openedx/renovate/actions-checkout-4.x
chore(deps): update actions/checkout action to v4
2023-12-11 15:42:36 -05:00
renovate[bot]
e2eb4a6eae chore(deps): update actions/checkout action to v4 2023-12-11 20:28:59 +00:00
Deborah Kaplan
8b195f1531 Merge pull request #931 from openedx/renovate/actions-setup-node-4.x
chore(deps): update actions/setup-node action to v4
2023-12-11 15:28:44 -05:00
renovate[bot]
650b47a631 chore(deps): update actions/setup-node action to v4 2023-12-11 16:41:39 +00:00
Deborah Kaplan
bd5c909bbc Merge pull request #934 from openedx/update-browserslist-db
Update browserslist DB
2023-12-11 11:41:20 -05:00
renovate[bot]
eb347f4d68 fix(deps): update dependency @edx/frontend-component-footer to v12.6.1 2023-12-11 14:14:14 +00:00
renovate[bot]
b3b88779b4 chore(deps): update dependency @edx/frontend-build to v13.0.12 2023-12-11 10:59:21 +00:00
jsnwesson
ade2bad564 chore: update browserslist DB 2023-12-11 00:09:18 +00:00
edX requirements bot
4ca59f0984 chore: update browserslist DB (#929)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-12-04 11:23:52 -08:00
renovate[bot]
ab9b129b43 fix(deps): update react-router monorepo to v6.20.1 2023-12-04 10:32:15 +00:00
edX requirements bot
5d9ee134c1 chore: update browserslist DB (#923)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-11-28 14:52:19 -05:00
Jenkins
b6e4c34b77 chore(i18n): update translations 2023-11-28 11:18:49 -05:00
renovate[bot]
c36595170d fix(deps): update dependency @edx/frontend-component-header to v4.10.1 2023-11-27 13:18:57 +00:00
renovate[bot]
cf6b4dae98 fix(deps): update dependency @edx/frontend-component-footer to v12.6.0 2023-11-27 09:07:31 +00:00
Deborah Kaplan
994852741e Merge pull request #917 from openedx/update-browserslist-db
Update browserslist DB
2023-11-21 12:51:45 -05:00
renovate[bot]
9403fd84f6 fix(deps): update dependency core-js to v3.33.3 2023-11-20 12:17:03 +00:00
renovate[bot]
4d5562e2dd chore(deps): update dependency @edx/frontend-build to v13.0.8 2023-11-20 09:24:14 +00:00
jsnwesson
cad60cff61 chore: update browserslist DB 2023-11-20 00:09:20 +00:00
Justin Hynes
a9ce16add6 chore: remove unused codecov package from package.json (#915)
[APER-2889]

The codecov package is no longer supported and we have moved to using a GitHub action for uploading coverage data. The NPM package can be removed from our requirements.
2023-11-17 10:42:26 -05:00
renovate[bot]
8a2755751b fix(deps): update dependency core-js to v3.33.2 2023-11-13 15:20:25 +00:00
renovate[bot]
1401c8b156 chore(deps): update dependency @edx/frontend-build to v13.0.5 2023-11-13 09:03:23 +00:00
Ihor Romaniuk
5cf7db140c fix: trim long text in form controls and username block (#888)
* fix: trim long text in form controls and username block
* fix: update snapshots
2023-11-08 13:56:49 -05:00
vladislavkeblysh
860d2e6f5e feat: fixed displaying field and visibility forms (#864) 2023-11-08 13:41:54 -05:00
edX requirements bot
a434c0a7b9 chore: update browserslist DB (#905)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-11-08 10:34:10 -05:00
renovate[bot]
c6c5521ecf fix(deps): update dependency @edx/frontend-component-footer to v12.5.1 2023-11-06 13:50:59 +00:00
renovate[bot]
7175183d6a chore(deps): update dependency @edx/frontend-build to v13.0.4 2023-11-06 10:44:12 +00:00
Deborah Kaplan
8566cf9095 Merge pull request #903 from openedx/renovate/edx-brand-1.x-lockfile
fix(deps): update dependency @edx/brand to v1.2.3
2023-10-31 14:53:33 -04:00
Deborah Kaplan
efeedb3247 feat: fixing a conflict
ran npm i
2023-10-31 18:06:07 +00:00
renovate[bot]
a3849495d5 fix(deps): update dependency @edx/brand to v1.2.3 2023-10-31 15:00:50 +00:00
Deborah Kaplan
47a7d77e55 Merge pull request #898 from openedx/mashal-m/update-README
refactor: updated README file to reflect template changes
2023-10-31 11:00:20 -04:00
Deborah Kaplan
943ff02a38 Merge pull request #901 from openedx/update-browserslist-db
Update browserslist DB
2023-10-30 16:40:41 -04:00
renovate[bot]
8b48dc8bad chore(deps): update dependency @edx/frontend-build to v13.0.3 2023-10-30 09:50:11 +00:00
jsnwesson
e195dbf1b4 chore: update browserslist DB 2023-10-30 00:09:08 +00:00
mashal-m
7ae5956f06 refactor: updated README file to reflect template changes 2023-10-25 11:27:02 +05:00
edX requirements bot
f48a06b8c5 chore: update browserslist DB (#890)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-10-23 12:56:24 -07:00
Muhammad Abdullah Waheed
48d2766c13 feat: babel-plugin-react-intl to babel-plugin-formatjs migration (#855)
* feat: babel-plugin-react-intl to babel-plugin-formatjs migration

* fix: upgraded frontend-build to fix security issue
2023-10-23 12:49:15 -07:00
renovate[bot]
d677d11558 fix(deps): update dependency @edx/frontend-component-header to v4.8.0 2023-10-23 17:22:25 +00:00
renovate[bot]
c396800657 fix(deps): update dependency @edx/frontend-component-footer to v12.5.0 2023-10-23 13:37:46 +00:00
renovate[bot]
1baf21aad9 fix(deps): update dependency core-js to v3.33.1 2023-10-23 09:42:17 +00:00
renovate[bot]
dc068cbf33 chore(deps): update commitlint monorepo to v17.8.1 2023-10-23 06:09:58 +00:00
Feanil Patel
2f8b9963ce chore: Update to the new version of brand-openedx in the new scope. (#886)
Part of https://github.com/openedx/axim-engineering/issues/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.
2023-10-20 14:31:21 -04:00
renovate[bot]
6957ad0401 fix(deps): update dependency core-js to v3.33.0 (#876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 12:40:15 -04:00
dependabot[bot]
ce616fa409 build(deps): bump @babel/traverse from 7.22.5 to 7.23.2 (#879)
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 12:32:19 -04:00
renovate[bot]
e216036d8d fix(deps): update dependency @edx/frontend-platform to v5.6.1 (#875)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 12:29:39 -04:00
edX requirements bot
69cacc1e3b chore: update browserslist DB (#871)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-10-16 12:18:30 -04:00
Stanislav
8f6b96983f fix: Add ID attribute to the main content (#845)
Co-authored-by: Stanislav Lunyachek <lunyachek@MacBook-Pro-M1.local>
2023-10-16 12:17:28 -04:00
Syed Ali Abbas Zaidi
779c5078ca chore: bump frontend-platform (#869) 2023-10-16 17:12:03 +05:00
renovate[bot]
e6c3d10b37 fix(deps): update dependency @edx/frontend-component-footer to v12.4.0 2023-10-16 10:14:10 +00:00
renovate[bot]
4cc9e53a4d chore(deps): update commitlint monorepo to v17.8.0 2023-10-16 07:22:04 +00:00
renovate[bot]
88b583865a fix(deps): update dependency @edx/paragon to v20.46.3 2023-10-16 06:53:57 +00:00
Deborah Kaplan
43f485d841 Merge pull request #850 from openedx/update-browserslist-db
Update browserslist DB
2023-10-10 11:06:24 -04:00
renovate[bot]
b892ba763e fix(deps): update dependency @edx/frontend-component-header to v4.7.1 2023-10-09 16:53:45 +00:00
renovate[bot]
896905b457 fix(deps): update dependency @edx/frontend-component-footer to v12.3.0 2023-10-09 10:34:37 +00:00
jsnwesson
095b91c8cb chore: update browserslist DB 2023-10-09 00:09:13 +00:00
renovate[bot]
a6e63a8686 chore(deps): update dependency glob to v10.3.10 2023-10-02 17:03:40 +00:00
renovate[bot]
67c8d79aa2 fix(deps): update dependency @edx/frontend-component-header to v4.6.1 2023-10-02 13:24:41 +00:00
renovate[bot]
f76185d57d chore(deps): update dependency @edx/frontend-build to v12.9.17 2023-10-02 09:40:44 +00:00
renovate[bot]
f0678ca94c chore(deps): update dependency @commitlint/cli to v17.7.2 2023-10-02 06:30:56 +00:00
Mashal Malik
e73b646263 refactor: add openedx in renovate automate configuration (#849) 2023-09-28 12:21:18 -04:00
renovate[bot]
ddb8494471 fix(deps): update dependency @edx/frontend-platform to v5.4.0 2023-09-25 15:09:40 +00:00
edX requirements bot
a576bdf98b chore: update browserslist DB (#846)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-09-25 09:01:20 -04:00
renovate[bot]
21dcadba5b chore(deps): update dependency glob to v10.3.7 2023-09-25 09:21:59 +00:00
Deborah Kaplan
e770101e4e Merge pull request #842 from openedx/update-browserslist-db
Update browserslist DB
2023-09-18 12:49:47 -04:00
renovate[bot]
8ca5ea5809 fix(deps): update react-router monorepo to v6.16.0 2023-09-18 10:09:02 +00:00
renovate[bot]
d687ea30cb fix(deps): update dependency regenerator-runtime to v0.14.0 2023-09-18 07:58:45 +00:00
jsnwesson
ecda751786 chore: update browserslist DB 2023-09-18 00:08:53 +00:00
edX requirements bot
e58b174c9e chore: update browserslist DB (#839)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-09-15 14:37:58 -07:00
edx-transifex-bot
6c82805c7a chore(i18n): update translations (#838)
Co-authored-by: Jenkins <sre+jenkins@edx.org>
2023-09-15 14:37:47 -07:00
renovate[bot]
d1d98794ab fix(deps): update dependency @edx/frontend-platform to v5.3.2 2023-09-11 16:58:08 +00:00
renovate[bot]
3c7baaa91b fix(deps): update dependency core-js to v3.32.2 2023-09-11 09:39:16 +00:00
Syed Ali Abbas Zaidi
fe800f2ee9 feat: upgrade react router to v6 (#716)
* feat: upgrade react router to v6
* refactor: add hoc to use params
* fix: lint issue
2023-09-05 14:55:23 -04:00
Mashal Malik
e1d4e9b474 refactor: update lock file version (#834) 2023-09-05 14:49:02 -04:00
edX requirements bot
cf7568bcfb chore: update browserslist DB (#829)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-09-05 14:46:18 -04:00
renovate[bot]
a0fd863bc4 fix(deps): update dependency @edx/frontend-component-footer to v12.2.1 2023-09-04 09:53:06 +00:00
renovate[bot]
b63341fe99 chore(deps): update dependency glob to v10.3.4 2023-09-04 08:36:20 +00:00
renovate[bot]
1887167d0e fix(deps): update dependency core-js to v3.32.1 2023-08-21 13:43:20 +00:00
renovate[bot]
57de2b4156 chore(deps): update dependency @edx/frontend-build to v12.9.10 2023-08-21 10:09:12 +00:00
renovate[bot]
aaf6935577 fix(deps): update dependency @edx/frontend-component-header to v4.5.2 2023-08-14 16:30:15 +00:00
renovate[bot]
03b7859b20 chore(deps): update commitlint monorepo 2023-08-14 09:24:21 +00:00
edX requirements bot
2800e89f02 chore: update browserslist DB (#825)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-08-10 07:40:49 -04:00
Emad Rad
0cc03e5fec chore: translations updated (#828) 2023-08-07 14:02:54 -07:00
renovate[bot]
44f1a5f0cd fix(deps): update dependency @edx/frontend-platform to v4.6.1 2023-08-07 09:09:08 +00:00
renovate[bot]
2694f6f754 chore(deps): update dependency @edx/frontend-build to v12.9.4 2023-08-07 08:28:02 +00:00
renovate[bot]
18afe62590 fix(deps): update dependency core-js to v3.32.0 2023-07-31 10:26:36 +00:00
renovate[bot]
0b6d3dc9ac chore(deps): update dependency @edx/frontend-build to v12.9.3 2023-07-31 06:56:55 +00:00
edX requirements bot
bd5984f27b chore: update browserslist DB (#813)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-07-25 14:48:37 -04:00
Omar Al-Ithawi
f899727f8d feat: include paragon in atlas pull (#811)
This pull request is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification).
2023-07-25 11:22:15 -04:00
renovate[bot]
803a2d5572 fix(deps): update dependency core-js to v3.31.1 2023-07-24 13:49:10 +00:00
renovate[bot]
93b0b1b9da fix(deps): update dependency @edx/frontend-component-header to v4.4.4 2023-07-24 10:27:39 +00:00
renovate[bot]
22b01f347d chore(deps): update commitlint monorepo to v17.6.7 2023-07-24 07:53:18 +00:00
Mashal Malik
b537f1f82d chore: add paragon messages (#798) 2023-07-21 11:08:29 +05:00
Deborah Kaplan
c42e339051 Merge pull request #800 from openedx/update-browserslist-db
Update browserslist DB
2023-07-20 11:15:12 -04:00
Deborah Kaplan
528bbcbad8 Merge pull request #805 from openedx/dependabot/npm_and_yarn/semver-5.7.2
build(deps): bump semver from 5.7.1 to 5.7.2
2023-07-20 11:02:08 -04:00
renovate[bot]
fcc5ce77e7 fix(deps): update dependency @edx/paragon to v20.45.2 2023-07-17 17:19:14 +00:00
renovate[bot]
ff4cd80ff2 fix(deps): update dependency @edx/frontend-component-header to v4.4.3 2023-07-17 12:24:56 +00:00
dependabot[bot]
25a6093a78 build(deps): bump semver from 5.7.1 to 5.7.2
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 09:41:10 +00:00
renovate[bot]
d3a4b4b62d chore(deps): update dependency @edx/frontend-build to v12.8.66 2023-07-17 09:39:54 +00:00
renovate[bot]
fd52682b5c fix(deps): update dependency @edx/frontend-component-footer to v12.1.2 2023-07-17 06:41:39 +00:00
jsnwesson
a6eb5f75d1 chore: update browserslist DB 2023-07-17 00:10:44 +00:00
Emad Rad
6803fb5199 Feature: Persian language (#620)
* feat: Persian translations added

* feat: persian language added to messages

* feat: fa_IR added to transifex_langs
2023-07-12 10:07:50 -07:00
Swayam Rana
f05db64d49 Merge pull request #790 from openedx/swayamrana-pact
feat: Pact Consumer Contract Testing on LMS Account API
2023-07-11 11:22:08 -04:00
Swayam Rana
038c2a845f feat: Pact Contract Consumer testing with the Account API, and implement stub script 2023-07-11 15:15:33 +00:00
renovate[bot]
105486a44a fix(deps): update dependency @edx/frontend-component-header to v4.4.0 2023-07-10 15:51:59 +00:00
renovate[bot]
7b44687db9 fix(deps): update dependency @edx/frontend-component-footer to v12.1.1 2023-07-10 14:36:42 +00:00
renovate[bot]
7aeac7be3b chore(deps): update dependency glob to v10.3.3 2023-07-10 11:08:03 +00:00
renovate[bot]
d4665797a1 chore(deps): update dependency @edx/frontend-build to v12.8.60 2023-07-10 07:14:11 +00: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
Jason Wesson
b0b8e96025 build: add catalog-info yaml and update README (#797)
* These updates and additions aim to meet the Maintainership Pilot Phase 1 requirements

Co-authored-by: Jason Wesson <jwesson@2u.com>
2023-07-05 12:08:06 -07:00
renovate[bot]
6d5c150d2f chore(deps): update dependency glob to v10 (#793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-03 10:55:50 -07:00
Eugene Dyudyunov
549d51509b fix: error when trying to save 'other education' (#667)
When user selects "Other Education" and clicks save - error occurs.

It's caused by the wrong API call payload value `'o'`
Fix: use the `'other'` payload value instead (the valid one).
2023-07-03 10:22:13 -07:00
Yoiber
ba74aef631 chore(i18n): add more languages (#689)
* chore(i18n): add more languages
2023-07-03 10:20:05 -07:00
edX requirements bot
941652aba2 chore: update browserslist DB (#781)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-07-03 10:15:59 -07:00
renovate[bot]
3b68201748 fix(deps): update dependency @edx/frontend-component-header to v4.2.3 (#743)
* fix(deps): update dependency @edx/frontend-component-header to v4.2.3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason Wesson <jwesson@2u.com>
2023-07-03 10:13:11 -07:00
renovate[bot]
2b8f5a8b3d fix(deps): update dependency history to v5 (#794)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-03 10:04:22 -07:00
Maxwell Frank
235644e570 Merge pull request #791 from openedx/mfrank/remove-skills-builder-master
refactor: remove Skills Builder
2023-07-03 09:11:34 -04:00
Maxwell Frank
5e0eef68e3 refactor: remove Skills Builder 2023-07-03 13:00:47 +00:00
renovate[bot]
4692477738 fix(deps): update dependency react-instantsearch-hooks-web to v6.45.0 2023-07-03 06:15:35 +00:00
renovate[bot]
465d3b481a fix(deps): update dependency algoliasearch to v4.18.0 2023-06-26 15:57:05 +00:00
renovate[bot]
79e29c46c5 fix(deps): update dependency @edx/paragon to v20.45.0 2023-06-26 13:32:44 +00:00
renovate[bot]
97e70fa4ab chore(deps): update dependency @edx/frontend-build to v12.8.57 2023-06-26 10:16:08 +00:00
renovate[bot]
60fec4152f chore(deps): update commitlint monorepo to v17.6.6 2023-06-26 07:16:12 +00:00
Maxwell Frank
26a82ec109 Merge pull request #776 from openedx/update-browserslist-db
Update browserslist DB
2023-06-21 13:09:03 -04:00
renovate[bot]
bf03f8b5ef fix(deps): update dependency react-instantsearch-hooks-web to v6.44.3 2023-06-19 17:51:20 +00:00
renovate[bot]
2a4addbb38 fix(deps): update dependency core-js to v3.31.0 2023-06-19 14:19:55 +00:00
renovate[bot]
e2b9ef7a2f fix(deps): update dependency @edx/paragon to v20.44.0 2023-06-19 11:34:11 +00:00
renovate[bot]
a6bcc9c054 chore(deps): update dependency @edx/frontend-build to v12.8.54 2023-06-19 06:49:52 +00:00
jsnwesson
31d2c07c5b chore: update browserslist DB 2023-06-19 00:08:41 +00:00
Jason Wesson
03e352208f fix: switch out class overwrite in SCSS for an aria-label selector (#771)
* fix: switch out class overwrite in SCSS for an aria-label selector

---------

Co-authored-by: Jason Wesson <jwesson@2u.com>
2023-06-15 11:22:46 -07:00
Maxwell Frank
ac7285dac5 Merge pull request #775 from openedx/mfrank/switch-for-lob
Query string to act as switch for lines of business
2023-06-15 10:01:36 -04:00
Maxwell Frank
60fe9cff9a feat: adding lines of business 2023-06-15 13:27:10 +00:00
edX requirements bot
93f757f3d7 chore: update browserslist DB (#699)
Co-authored-by: jsnwesson <jsnwesson@users.noreply.github.com>
2023-06-14 13:36:48 -07:00
renovate[bot]
6740ad3672 fix(deps): update dependency algoliasearch to v4.17.2 2023-06-12 16:25:54 +00:00
renovate[bot]
ca14d3d279 chore(deps): update dependency @edx/frontend-build to v12.8.51 2023-06-12 12:00:55 +00:00
Jenkins
9dbe58b10f chore(i18n): update translations 2023-06-11 16:40:53 -04:00
Jason Wesson
50d80ef614 fix: adjust header height and content when window is medium in width or less (#756)
* fix: adjust header height and content when window is medium in width or less

* feat: convert stepper header's contents to compact view for medium windows (or less)

---------

Co-authored-by: Jason Wesson <jwesson@2u.com>
2023-06-06 11:10:00 -07:00
renovate[bot]
fe6b76da7e fix(deps): update dependency @edx/frontend-platform to v4.5.1 2023-06-05 12:46:05 +00:00
renovate[bot]
7fff13137d chore(deps): update dependency @edx/frontend-build to v12.8.40 2023-06-05 10:26:23 +00:00
renovate[bot]
91282cff74 chore(deps): update commitlint monorepo to v17.6.5 2023-06-05 07:50:24 +00:00
renovate[bot]
45be830f18 fix(deps): update dependency core-js to v3.30.2 2023-05-29 12:15:11 +00:00
renovate[bot]
122affbb6d fix(deps): update dependency @edx/frontend-platform to v4.5.0 2023-05-29 11:07:30 +00:00
renovate[bot]
48a97b769f fix(deps): update dependency algoliasearch to v4.17.1 2023-05-29 08:24:04 +00:00
renovate[bot]
bdcc09f6ba chore(deps): update dependency @edx/frontend-build to v12.8.38 2023-05-29 06:05:47 +00:00
Maxwell Frank
ac4fb6a340 Merge pull request #757 from openedx/mfrank/fallback-img-typo
fix: fallback src typo for course cards
2023-05-25 13:01:59 -04:00
Maxwell Frank
409d365125 fix: fallback src typo for course cards 2023-05-25 16:15:20 +00:00
Jason Wesson
53985e94d8 fix: disable 'select a goal' from goal dropdown when a goal has been selected (#755)
* hide the second and third portion of skills form if currentGoal is false
2023-05-23 07:57:25 -07:00
renovate[bot]
0d9a39afd7 fix(deps): update dependency @edx/frontend-platform to v4.4.0 2023-05-23 04:18:26 +00:00
renovate[bot]
cbb860bb16 chore(deps): update dependency @edx/reactifex to v2.2.0 2023-05-23 01:34:22 +00:00
Justin Hynes
695df9aa0b fix: filter out non-English courses from recommendations (#752)
[APER-2444]

This PR updates the `getProductRecommendations` utiltiy function, adding a filter to only include English courses in our recommendations.
2023-05-22 13:13:43 -04:00
Maxwell Frank
603304b799 Merge pull request #751 from openedx/mfrank/fix-close-exit-buttons
fix: close and exit buttons
2023-05-18 13:58:42 -04:00
Maxwell Frank
d3e5931d05 fix: close and exit buttons 2023-05-18 17:52:40 +00:00
renovate[bot]
6804f7e127 fix(deps): update dependency algoliasearch to v4.17.0 2023-05-17 22:25:05 +00:00
Maxwell Frank
4b16673780 Merge pull request #750 from openedx/mfrank/reduce-event-payload
fix: reduce event payload
2023-05-17 11:12:10 -04:00
Maxwell Frank
6674025bd4 fix: reduce event payload 2023-05-17 14:38:15 +00:00
renovate[bot]
0dab2d03eb chore(deps): update commitlint monorepo to v17.6.3 2023-05-15 09:41:55 +00:00
Jenkins
df1a84feb7 chore(i18n): update translations 2023-05-14 16:40:48 -04:00
Bilal Qamar
334a9b090e feat: upgraded to node v18, added .nvmrc and updated workflows (#712)
* feat: upgraded to node v18, added .nvmrc and updated workflows

* build: updated frontend-build, frontend-platform, component-footer & component-header packages

* refactor: updated snapshots

* refactor: updated snapshots
2023-05-12 14:09:48 -04:00
Maxwell Frank
5d06276838 Merge pull request #745 from openedx/mfrank/adding-configure-component
fix: remove filtering from current job select
2023-05-11 09:20:43 -04:00
Maxwell Frank
e391e427f1 fix: remove filtering from current job select 2023-05-11 13:05:04 +00:00
Maxwell Frank
b71328fd3f Merge pull request #744 from openedx/mfrank/adding-configure-component
fix: adding configure component to filter jobs
2023-05-10 16:40:11 -04:00
Maxwell Frank
3b9b3f8840 fix: adding configure component to filter jobs 2023-05-10 20:34:29 +00:00
Maxwell Frank
30e837306f Merge pull request #739 from openedx/mfrank/segement-events
APER-2333: Dispatch segment events from JS components
2023-05-10 15:45:35 -04:00
Maxwell Frank
c7a0c1d799 feat: adding analytics 2023-05-09 13:29:38 +00:00
renovate[bot]
337c97e3a0 chore(deps): update dependency @edx/frontend-build to v12.8.27 2023-05-08 09:32:26 +00:00
renovate[bot]
0de4496953 fix(deps): update dependency @edx/paragon to v20.32.3 2023-05-01 10:06:44 +00:00
renovate[bot]
359ae7f1fb chore(deps): update dependency @edx/frontend-build to v12.8.16 2023-05-01 07:10:23 +00:00
Omar Al-Ithawi
8d467f01dc feat: use atlas in make pull_translations (#732)
- Bump frontend-platform to bring intl-imports.js script
 - Move all i18n imports into `src/i18n/index.js` so intl-imports.js can override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL` environment variable is set.

This pull request is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification).
2023-04-25 09:33:22 -04:00
renovate[bot]
20debcd79e fix(deps): update dependency reselect to v4.1.8 2023-04-24 13:13:42 +00:00
renovate[bot]
6a7cbf88df fix(deps): update dependency @edx/frontend-component-footer to v11.7.4 2023-04-24 09:34:43 +00:00
Jenkins
1b3880ee1b chore(i18n): update translations 2023-04-23 16:40:44 -04:00
renovate[bot]
79cebaf6df fix(deps): update dependency @edx/frontend-component-footer to v11.7.2 2023-04-17 15:00:56 +00:00
renovate[bot]
8686af563e chore(deps): update dependency @edx/frontend-build to v12.8.10 2023-04-17 10:24:54 +00:00
renovate[bot]
85d85007d2 fix(deps): update dependency @edx/frontend-component-footer to v11.7.1 2023-04-10 13:30:36 +00:00
renovate[bot]
9276fe25ad chore(deps): update dependency @edx/frontend-build to v12.8.6 2023-04-10 09:32:52 +00:00
Jenkins
9c2dd68752 chore(i18n): update translations 2023-04-02 16:40:41 -04:00
Maxwell Frank
e4a9045e89 feat: course recommendations for Skills Builder with fix 2023-03-30 15:34:43 -04:00
Maxwell Frank
c1bbbe488a feat: skills builder course recommendations 2023-03-30 19:26:29 +00:00
Maxwell Frank
45ab2f8175 Merge pull request #725 from openedx/revert-721-mfrank/course-recommendations
Revert "feat: course recommendations for Skills Builder"
2023-03-28 14:34:51 -04:00
Maxwell Frank
d9c7096fd7 Revert "feat: course recommendations for Skills Builder" 2023-03-28 14:05:18 -04:00
Maxwell Frank
c6825393c6 feat: course recommendations for Skills Builder
feat: course recommendations for Skills Builder
2023-03-28 09:37:59 -04:00
renovate[bot]
9354f11a99 fix(deps): update dependency @edx/frontend-component-header to v3.6.5 2023-03-28 12:04:23 +00:00
renovate[bot]
e7fc8f52fb chore(deps): update dependency @commitlint/cli to v17.5.1 2023-03-28 10:16:30 +00:00
Maxwell Frank
d8c8f5d7bd feat: course recommendations for Skills Builder 2023-03-27 19:28:46 +00:00
renovate[bot]
e5355e7ac8 chore(deps): update dependency @edx/frontend-build to v12.6.2 2023-03-24 09:14:55 +00:00
Maxwell Frank
99a80d3e66 Merge pull request #718 from openedx/mfrank/authenticated-page-route
fix: authenticated page route
2023-03-22 10:56:11 -04:00
Maxwell Frank
abf9860f62 fix: authenticated page route 2023-03-20 13:39:01 +00:00
renovate[bot]
ccc62a0e48 fix(deps): update dependency redux-saga to v1.2.3 2023-03-20 10:39:41 +00:00
renovate[bot]
650d3d469f fix(deps): update dependency @edx/paragon to v20.28.5 2023-03-20 08:06:56 +00:00
renovate[bot]
ab80fd7671 fix(deps): update dependency @edx/frontend-component-header to v3.6.4 2023-03-13 13:09:42 +00:00
Mashal Malik
f55b304732 refactor: remove unused tranisfex v2 url (#704) 2023-03-13 10:45:28 +05:00
Jenkins
65971820d4 chore(i18n): update translations 2023-03-12 16:40:39 -04:00
Maxwell Frank
7da386264b Merge pull request #706 from openedx/mfrank/retrieving-job-skills-data
APER-2187 Render jobs and related skills for Skills Builder
2023-03-08 14:03:46 -05:00
Maxwell Frank
b1fe21cded feat: SkillsBuilder jobs with related skills 2023-03-07 19:07:10 +00:00
Jenkins
40225d7db3 chore(i18n): update translations 2023-03-05 15:40:37 -05:00
Maxwell Frank
b4ba5276ae Merge pull request #702 from openedx/mfrank/adding-career-interests
feat: SkillsBuilder career interests selection
2023-02-28 14:55:57 -05:00
Maxwell Frank
ddff5364ce feat: SkillsBuilder career interests selection 2023-02-28 19:51:16 +00:00
David Joy
f57f5c4725 docs: update the maintaining group to openedx/2u-aperture (#703)
The @edx/arch-fed group no longer exists - this repo is maintained by the @openedx/2u-aperture team.
2023-02-28 13:46:03 -05:00
Feanil Patel
e6feef00eb Merge pull request #696 from openedx/repo_checks/ensure_workflows
Update standard workflow files.
2023-02-27 22:36:12 -05:00
Maxwell Frank
87487e37d7 Merge pull request #693 from openedx/mfrank/goals-and-job-select-v2
APER-2186: adding goal and job title selection
2023-02-27 09:16:06 -05:00
renovate[bot]
6b451a4437 fix(deps): update dependency @edx/frontend-component-footer to v11.6.3 2023-02-27 12:33:52 +00:00
renovate[bot]
b10b31860d chore(deps): update commitlint monorepo to v17.4.4 2023-02-27 09:29:59 +00:00
Jenkins
83e2b66c77 chore(i18n): update translations 2023-02-26 15:40:39 -05:00
dependabot[bot]
6fa5681e91 build(deps): bump cookiejar from 2.1.3 to 2.1.4 (#674)
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/bmeck/node-cookiejar/releases)
- [Commits](https://github.com/bmeck/node-cookiejar/commits)

---
updated-dependencies:
- dependency-name: cookiejar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 13:07:48 -08:00
dependabot[bot]
e9e48e4eb0 build(deps): bump json5 from 1.0.1 to 1.0.2 (#661)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-24 13:03:26 -08:00
renovate[bot]
17b4933278 fix(deps): update dependency @edx/frontend-platform to v3 (#660)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-24 12:52:53 -08:00
Maxwell Frank
68dc8a1045 feat: first two questions of Skills Builder 2023-02-24 19:26:53 +00:00
Justin Hynes
21a3e9259d Merge pull request #695 from openedx/jhynes/aper-2262
feat: add utility function to retrieve product recommendations based on job skills
2023-02-24 09:06:26 -05:00
Justin Hynes
a6086fd4bf feat: add utility function to retrieve product recommendations based on job skills
[APER-2262]

- add a utility function to retrieve product recommendations based on skills from a job a learner is interested in
- add additional tests and coverage around new utility functions in `search.jsx`
2023-02-24 08:57:37 -05:00
edX requirements bot
0c427cf5e3 chore: update browserslist DB (#656) 2023-02-23 13:44:15 -08:00
Feanil Patel
75ea8bc207 build: Updating a missing workflow file add-depr-ticket-to-depr-board.yml.
The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 14:01:50 -05:00
Feanil Patel
47c06c0f5d build: Creating a missing workflow file add-remove-label-on-comment.yml.
The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 14:01:49 -05:00
Feanil Patel
8e0ab6db4d build: Creating a missing workflow file self-assign-issue.yml.
The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
2023-02-23 14:01:48 -05:00
Jenkins
20159f140e chore(i18n): update translations 2023-02-19 15:40:37 -05:00
Justin Hynes
2d05de92af Merge pull request #691 from openedx/jhynes/aper-2261_algolia-utility-functions
feat: Add utility functions for querying job related data from Algolia
2023-02-17 14:12:54 -05:00
Justin Hynes
10f93420f4 feat: Add utility functions for querying job related data from Algolia
[APER-2261]
* rename `hooks.jsx` to `search.jsx` as this is more of a collection of utilities for working with Algolia
* add a utiltiy function for returning job info (from our "job" Algolia index) based on a list of jobs a learner is interested in
* add a utility function for formatting job names based on the syntax Algolia expects
2023-02-17 14:08:11 -05:00
Maxwell Frank
a12f91f7a5 Merge pull request #685 from openedx/mfrank/building-out-reducer
feat: adding actions and reducer for Skills Builder
2023-02-15 13:34:06 -05:00
Maxwell Frank
8f42e6fbfb feat: adding actions and reducer 2023-02-15 17:09:12 +00:00
Justin Hynes
4ecdf583ea Merge pull request #690 from openedx/jhynes/aper-2261
feat: Add Algolia support to Profile MFE for Skills Builder
2023-02-15 11:37:46 -05:00
Justin Hynes
e75864b860 feat: Add Algolia support to Profile MFE
[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
2023-02-15 09:56:52 -05:00
Jenkins
a697e3c543 chore(i18n): update translations 2023-02-12 15:40:35 -05:00
Jason Wesson
04607dba1d Feat: display Learning Goal in profile (#676)
* feat: add unit tests for LearningGoal component

* feat: add LearningGoals component to Profile

---------

Co-authored-by: Jason Wesson <jwesson@2u.com>
2023-02-08 13:54:47 -08:00
Justin Hynes
6a4c8d9138 Merge pull request #682 from openedx/jhynes/aper-2258
feat: add Skills Builder Header component, refactor to use ModalDialog
2023-02-06 14:45:31 -05:00
Justin Hynes
dbf716eef5 feat: add Skills Builder Header component, refactor to use ModalDialog
[APER-2258]

This PR adds the SkillsBuilderHeader component to the profile MFE.

There was also some additional refactoring work required to display the header in the modal. The FullscreenModal component is not flexible enough to allow custom header designs to be displayed (only text). We have to pivot to using the `ModalDialog` family of components instead.
2023-02-06 13:34:04 -05:00
renovate[bot]
5eaab4f07d fix(deps): update dependency redux to v4.2.1 2023-02-06 13:31:33 +00:00
renovate[bot]
a139c2f71d fix(deps): update dependency @edx/frontend-component-footer to v11.6.2 2023-02-06 11:47:01 +00:00
Maxwell Frank
9e34fdd68d Merge pull request #680 from openedx/mfrank/adding-skills-context
feat: added skills context
2023-02-01 13:31:52 -05:00
Justin Hynes
109c5d437d Merge pull request #681 from openedx/jhynes/aper-2240-cleanup
fix: remove LR MFE URL building logic
2023-01-31 13:48:51 -05:00
Justin Hynes
25d0ecb531 fix: remove learner record MFE URL building logic
[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.
2023-01-30 14:00:13 -05:00
Maxwell Frank
767af3c40b feat: added skills context 2023-01-30 15:46:15 +00:00
renovate[bot]
6a05552969 fix(deps): update dependency core-js to v3.27.2 2023-01-30 15:02:41 +00:00
renovate[bot]
628914dce3 fix(deps): update dependency @edx/frontend-component-header to v3.6.1 2023-01-30 10:28:08 +00:00
Jenkins
be7e204c91 chore(i18n): update translations 2023-01-29 15:40:36 -05:00
Bilal Qamar
c1d4c36a65 chore: update dependency @edx/frontend-build to v12.4.19 (#675) 2023-01-26 12:20:35 +05:00
renovate[bot]
ce04a04c36 fix(deps): update dependency @edx/frontend-component-footer to v11.6.1 2023-01-23 14:58:40 +00:00
renovate[bot]
346c08e5d6 chore(deps): update dependency @edx/frontend-build to v12.4.16 2023-01-23 11:27:47 +00:00
Jenkins
fe61237464 chore(i18n): update translations 2023-01-22 15:40:35 -05:00
renovate[bot]
c89285f0e8 chore(deps): update dependency glob to v8.1.0 2023-01-16 15:28:14 +00:00
renovate[bot]
7523a1edb3 chore(deps): update commitlint monorepo to v17.4.2 2023-01-16 11:27:14 +00:00
Jenkins
9f1c16a599 chore(i18n): update translations 2023-01-15 15:40:34 -05:00
Maxwell Frank
fdcef0edc8 Merge pull request #664 from openedx/mfrank/adding-skills-route
feat: set up skills builder route
2023-01-11 13:53:03 -05:00
Maxwell Frank
1f056dfac7 feat: set up skills builder route 2023-01-11 18:45:06 +00:00
renovate[bot]
2814349f37 fix(deps): update dependency @edx/brand to v1.2.0 2023-01-09 11:50:01 +00:00
renovate[bot]
a4327a98e4 chore(deps): update commitlint monorepo to v17.4.0 2023-01-09 08:15:56 +00:00
renovate[bot]
50fe0ecb6f fix(deps): update dependency core-js to v3.27.1 2023-01-02 08:58:39 +00:00
renovate[bot]
8e011fdf7b fix(deps): update dependency core-js to v3.27.0 2022-12-26 08:57:37 +00:00
dependabot[bot]
a6a35f3762 build(deps): bump loader-utils from 1.4.0 to 1.4.2 (#655)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 12:54:32 -08:00
renovate[bot]
259f4b2a5e chore(deps): update dependency @edx/frontend-build to v12.4.15 (#625)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-22 12:34:58 -08:00
Muhammad Abdullah Waheed
65a4091e78 Automate Browserlist DB Update (#615)
* feat: added cron github action to auto update brwoserlist DB periodically

* refactor: used a shared script to update broswerslist DB, create PR and automerge it
2022-12-22 12:06:26 -08:00
Jason Wesson
e5ee7894b0 refactor: updated frontend-build & resolved eslint issues (#654)
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2022-12-22 12:00:53 -08:00
renovate[bot]
8f781ea867 chore(deps): update dependency glob to v8 (#622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-20 13:16:24 -08:00
dependabot[bot]
7d208a91ac build(deps): bump loader-utils from 1.4.0 to 1.4.2 (#635)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 13:07:00 -08:00
dependabot[bot]
80599a617f build(deps): bump minimatch and recursive-readdir (#642)
Bumps [minimatch](https://github.com/isaacs/minimatch) and [recursive-readdir](https://github.com/jergason/recursive-readdir). These dependencies needed to be updated together.

Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

Updates `recursive-readdir` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/jergason/recursive-readdir/releases)
- [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
- dependency-name: recursive-readdir
  dependency-type: indirect

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 12:59:41 -08:00
dependabot[bot]
652559b157 build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#644)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 12:53:22 -08:00
renovate[bot]
5363663170 fix(deps): update dependency universal-cookie to v4 (#279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-20 12:44:44 -08:00
renovate[bot]
b34041f090 fix(deps): update dependency core-js to v3.26.1 2022-12-19 10:22:55 +00:00
renovate[bot]
a82e3e9918 fix(deps): update dependency @edx/frontend-component-header to v3.6.0 2022-12-19 08:03:15 +00:00
mashal-m
6c15c2a0fd fix: remove is-es6 check 2022-12-15 12:43:57 +00:00
mashal-m
da5bf2f533 build: use shared browserslist configuration and upgrade paragon version 2022-12-15 12:43:57 +00:00
renovate[bot]
e507548d48 fix(deps): update dependency @edx/frontend-component-footer to v11.6.0 2022-12-12 11:18:25 +00:00
renovate[bot]
ff6c63c86b fix(deps): update dependency redux-saga to v1.2.2 2022-12-12 08:31:07 +00:00
renovate[bot]
6e24a48570 fix(deps): update dependency @edx/frontend-component-header to v3.5.0 2022-12-05 13:32:14 +00:00
renovate[bot]
42a0d27b47 fix(deps): update dependency @edx/frontend-component-footer to v11.5.2 2022-12-05 11:02:32 +00:00
edX requirements bot
6a79462567 fix: -t flag added in pull translation command (#639) 2022-11-30 16:43:21 +05:00
renovate[bot]
afe39e8b9e fix(deps): update dependency @edx/frontend-component-header to v3.4.1 2022-11-28 12:53:13 +00:00
renovate[bot]
38afcb8a5a fix(deps): update dependency @edx/frontend-component-footer to v11.5.1 2022-11-28 09:16:22 +00:00
renovate[bot]
5bf65de9e4 chore(deps): update commitlint monorepo to v17.3.0 2022-11-28 09:09:07 +00:00
renovate[bot]
28423c261d fix(deps): update dependency regenerator-runtime to v0.13.11 2022-11-21 09:04:15 +00:00
renovate[bot]
0986fd05ab chore(deps): update commitlint monorepo to v17.2.0 2022-11-14 08:32:19 +00:00
renovate[bot]
21adb70478 fix(deps): update dependency reselect to v4.1.7 2022-11-14 08:25:41 +00:00
renovate[bot]
daca35ffbe fix(deps): update dependency redux-thunk to v2.4.2 2022-11-07 10:07:44 +00:00
renovate[bot]
9fe9164bb2 chore(deps): update dependency enzyme-adapter-react-16 to v1.15.7 2022-11-07 07:58:45 +00:00
Jenkins
09e010443d chore(i18n): update translations 2022-10-30 16:40:23 -04:00
renovate[bot]
87377a1443 fix(deps): pin dependency react-helmet to 6.1.0 2022-10-24 08:47:44 +00:00
Jenkins
5f89049506 chore(i18n): update translations 2022-10-23 16:40:27 -04:00
Diana Olarte
4f00bc43b9 feat: allow runtieme configuration (#586)
Allows frontend-app-profile to be configured at
runtime using the LMS's new MFE Configuration API.

Part of https://github.com/openedx/frontend-wg/issues/103
2022-10-17 12:13:59 -04:00
renovate[bot]
f732fa7ffc fix(deps): update dependency regenerator-runtime to v0.13.10 2022-10-17 09:48:16 +00:00
renovate[bot]
963ff21423 fix(deps): update dependency redux-saga to v1.2.1 2022-10-10 12:57:02 +00:00
renovate[bot]
bb5a8004b9 fix(deps): update dependency core-js to v3.25.5 2022-10-10 10:01:03 +00:00
renovate[bot]
de81959252 chore(deps): update dependency @edx/frontend-build to v12.0.6 2022-10-10 06:41:00 +00:00
renovate[bot]
964dbe26b7 fix(deps): update dependency core-js to v3.25.4 2022-10-03 11:37:09 +00:00
renovate[bot]
be0865c8d4 fix(deps): update react-router monorepo to v5.3.4 2022-10-03 08:00:29 +00:00
Jenkins
b4afc24ef2 chore(i18n): update translations 2022-10-02 16:41:52 -04:00
renovate[bot]
392f01cecf fix(deps): update dependency react-redux to v7.2.9 2022-09-26 15:45:28 +00:00
renovate[bot]
cb504f2d57 fix(deps): update dependency classnames to v2.3.2 2022-09-26 11:50:55 +00:00
Jenkins
599b655ac4 chore(i18n): update translations 2022-09-25 16:39:48 -04:00
Thomas Tracy
e28bc0a62e Merge pull request #608 from openedx/renovate/major-commitlint-monorepo
chore(deps): update commitlint monorepo to v17 (major)
2022-09-23 10:38:27 -04:00
renovate[bot]
af46aa208f chore(deps): update commitlint monorepo to v17 2022-09-22 17:01:15 +00:00
renovate[bot]
2ad4d24262 chore(deps): update dependency @edx/frontend-build to v12.0.5 2022-09-22 16:57:54 +00:00
Thomas Tracy
d4c49fb34b Merge pull request #582 from openedx/renovate/redux-4.x
fix(deps): update dependency redux to v4.2.0
2022-09-21 15:41:36 -04:00
renovate[bot]
0034fcf79f fix(deps): update dependency redux to v4.2.0 2022-09-21 14:39:57 +00:00
Thomas Tracy
b3bb371d05 Merge pull request #588 from openedx/renovate/actions-checkout-3.x
chore(deps): update actions/checkout action to v3
2022-09-21 10:36:36 -04:00
renovate[bot]
1f5c4939e4 chore(deps): update actions/checkout action to v3 2022-09-21 14:21:21 +00:00
Thomas Tracy
349c4f799d Merge pull request #591 from openedx/renovate/actions-setup-node-3.x
chore(deps): update actions/setup-node action to v3
2022-09-21 10:14:47 -04:00
Thomas Tracy
1d3c09f7a5 Merge pull request #592 from openedx/renovate/codecov-codecov-action-3.x
chore(deps): update codecov/codecov-action action to v3
2022-09-21 10:14:21 -04:00
Thomas Tracy
777ba47a3c Merge pull request #581 from openedx/renovate/font-awesome
fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.0
2022-09-21 10:13:21 -04:00
renovate[bot]
379bb8a9c4 chore(deps): update codecov/codecov-action action to v3 2022-09-20 20:18:43 +00:00
renovate[bot]
1e14092771 chore(deps): update actions/setup-node action to v3 2022-09-20 20:18:38 +00:00
renovate[bot]
066f447d38 fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.0 2022-09-20 20:17:55 +00:00
Thomas Tracy
d7d6cd8ad4 Merge pull request #589 from openedx/bilalqamar95/frontend-build-upgrade
Upgraded frontend-build version to v12
2022-09-20 16:13:58 -04:00
Thomas Tracy
4a40868afa chore: rebuild package lock with updated reactifex 2022-09-20 16:09:57 -04:00
Bilal Qamar
22d0f8b688 refactor: updated tests to accommodate jsx-no-constructed-context-values rule 2022-09-20 16:08:15 -04:00
Bilal Qamar
95cffc73f1 refactor: pinned frontend-build version & ignored jsx-no-constructed-context-values for tests 2022-09-20 16:08:11 -04:00
Bilal Qamar
759428dd3e refactor: resolved eslint issues after master branch merge 2022-09-20 16:07:50 -04:00
Bilal Qamar
8bb7dd7430 refactor: updated frontend-build to 12.0.3 2022-09-20 16:07:46 -04:00
Bilal Qamar
3733497ecb refactor: resolved eslint issues 2022-09-20 16:06:40 -04:00
Bilal Qamar
1b5f8ee732 refactor: updated frontend-build to v12.0.2 2022-09-20 16:06:35 -04:00
Bilal Qamar
8fa5bf57b0 refactor: upgraded frontend-build version to v12 2022-09-20 16:05:54 -04:00
Thomas Tracy
011c4ef356 Merge pull request #599 from openedx/renovate/edx-reactifex-2.x
chore(deps): update dependency @edx/reactifex to v2
2022-09-20 14:24:51 -04:00
Thomas Tracy
43a58961f3 Merge pull request #604 from openedx/abdullahwaheed/transifex-languages-list-update
Supported Transifex languages in Makefile
2022-09-20 14:23:22 -04:00
Thomas Tracy
939c18c765 Merge pull request #602 from openedx/abdullahwaheed/renovate-bot-edx-packages-auto-update
Renovate config to automate @edx namespaced minor/patch version upgrades
2022-09-20 14:22:23 -04:00
Thomas Tracy
c68ef187ee Merge pull request #590 from openedx/dependabot/npm_and_yarn/terser-4.8.1
build(deps): bump terser from 4.8.0 to 4.8.1
2022-09-20 14:21:44 -04:00
Thomas Tracy
50289e3f52 Merge pull request #605 from openedx/tcril/fix-gh-org-url
Fix github url strings (org edx -> openedx)
2022-09-20 14:20:51 -04:00
renovate[bot]
188e29f6e9 chore(deps): update dependency @edx/reactifex to v2 2022-09-16 19:49:18 +00:00
Sarina Canelake
7d11b73997 fix: update path to .github workflows to read from openedx org 2022-09-14 09:42:46 -04:00
Sarina Canelake
f1b7c86f88 fix: fix github url strings (org edx -> openedx) 2022-09-14 09:42:46 -04:00
Abdullah Waheed
ab62a2d231 feat: added new translations in Makefile and updated all the translations 2022-09-06 15:11:57 +05:00
Abdullah Waheed
728fd3f232 refactor: updated renovate config to auto update minor and patch versions of edx dependencies 2022-08-23 15:01:30 +05:00
Muhammad Abdullah Waheed
7503e6c5cb Paragon form component deprecations (#596)
* refactor: removed ValidationFormGroup deprecations

* refactor: updated unit tests

* fix: linting issue

* refactor: added unit tests for some uncovered code
2022-08-18 10:41:50 +05:00
edx-semantic-release
8363307cb4 chore(i18n): update translations 2022-08-14 16:39:20 -04:00
Muhammad Abdullah Waheed
34a9caa0bb fix: Paragon StatusAlert deprecation (#574)
* refactor: migrated StatusAlert deprecated package to Alert in AgeMessage component

* refactor: migrated StatusAlert deprecated package to Alert for remaining components

* refactor: changed snapshot to unit test to fix ci issue

* fix: updated unit test scrip to make it consistent to timezone differences and fixed snapshot issue

* feat: added unit tests of SocialLinks component to fix ci issue and improve coverage

* refactor: used aria-labelledby in place of ID as suggested in PR

* fix: unnecessary removal of coverage from test script

* fix: typo
2022-08-11 08:20:50 -04:00
edx-semantic-release
392167e554 chore(i18n): update translations 2022-08-07 16:39:27 -04:00
renovate[bot]
a087f4e983 fix(deps): update dependency core-js to v3.24.1 2022-08-01 17:21:30 +00:00
dependabot[bot]
1ffd5275bc build(deps): bump terser from 4.8.0 to 4.8.1
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 14:25:27 +00:00
renovate[bot]
87374a045d fix(deps): update dependency core-js to v3.23.5 2022-07-18 10:23:13 +00:00
Thomas Tracy
fbe9d9bb1c Merge pull request #585 from openedx/revert-580-ttracy/cookie-policy-banner-test
Revert "feat: Add cookie banner to profile for testing"
2022-07-11 15:04:42 -04:00
Thomas Tracy
a0b49a7a1c Revert "feat: Add cookie banner to profile for testing" 2022-07-11 14:54:11 -04:00
renovate[bot]
a2215044f3 fix(deps): update react-router monorepo to v5.3.3 2022-07-11 11:09:11 +00:00
renovate[bot]
c6c4951890 fix(deps): update dependency core-js to v3.23.4 2022-07-11 11:02:12 +00:00
Jawayria
f603f433d4 Merge pull request #542 from openedx/jenkins/drop-node-12-c50b401
chore!: Dropped support for Node 12
2022-07-01 12:36:35 +05:00
Maman Khan
3195e199a1 Merge pull request #566 from openedx/maman/update-vulnerable-packages
Update dependencies node-forge & minimist
2022-06-29 13:26:23 +05:00
Maman Naveed Khan
fd5bc50a37 fix: snapshots timezone issue 2022-06-29 13:00:25 +05:00
Maman Naveed Khan
aedb698133 fix: sync package and package-lock 2022-06-29 12:52:26 +05:00
Maman Naveed Khan
a941e6f073 fix: package lock updated 2022-06-29 12:46:37 +05:00
Maman Naveed Khan
84ea38de77 fix: updated snapshots 2022-06-29 12:44:36 +05:00
Maman Naveed Khan
3460734ff7 Merge branch 'master' into maman/update-vulnerable-packages 2022-06-29 12:39:25 +05:00
Thomas Tracy
2e9c124ced Merge pull request #580 from openedx/ttracy/cookie-policy-banner-test
feat: Add cookie banner to profile for testing
2022-06-28 14:01:21 -04:00
tj-tracy
7b61520544 feat: Add cookie banner to profile for testing 2022-06-28 17:33:38 +00:00
renovate[bot]
077f8d5b84 fix(deps): update dependency prop-types to v15.8.1 2022-06-27 11:40:07 +00:00
renovate[bot]
a1606709b2 fix(deps): update dependency core-js to v3.23.3 2022-06-27 11:33:45 +00:00
renovate[bot]
d8b0ab3442 fix(deps): update dependency reselect to v4.1.6 2022-06-20 16:20:34 +00:00
renovate[bot]
694165312c fix(deps): update dependency @edx/paragon to v19.25.3 2022-06-20 12:49:19 +00:00
edx-semantic-release
2b0dff352d chore(i18n): update translations 2022-06-12 16:40:36 -04:00
Renovate Bot
23e61bdf72 fix(deps): update dependency core-js to v3.22.8 2022-06-06 15:31:37 +00:00
Renovate Bot
bbfcb61ef3 fix(deps): update dependency @edx/paragon to v19.25.1 2022-06-06 12:59:03 +00:00
edx-semantic-release
547ce30879 chore(i18n): update translations 2022-06-03 13:17:32 -04:00
maman
a4d0f276be fix: updated vulnerable packages in package lock 2022-06-03 16:06:00 +05:00
maman
8f36e976e7 Merge branch 'master' into maman/update-vulnerable-packages 2022-06-03 15:49:55 +05:00
Renovate Bot
fa602f566f fix(deps): update dependency core-js to v3.22.7 2022-05-30 12:34:11 +00:00
Renovate Bot
7842ec56d2 fix(deps): update dependency @edx/paragon to v19.25.0 2022-05-30 09:59:48 +00:00
Diana Catalina Olarte
1acc1d0262 fix: show site name instead edX 2022-05-23 14:36:49 +01:00
Renovate Bot
b69dc2d10a fix(deps): update dependency @edx/paragon to v19.23.1 2022-05-23 12:50:56 +00:00
Renovate Bot
4cb73e0851 fix(deps): update dependency @edx/frontend-component-header to v2.6.1 2022-05-23 10:52:32 +00:00
Renovate Bot
016e6bf184 fix(deps): update dependency @edx/frontend-component-footer to v10.3.0 2022-05-16 13:52:25 +00:00
Renovate Bot
e877d0d749 chore(deps): update dependency glob to v7.2.3 2022-05-16 10:41:58 +00:00
Renovate Bot
2e1cd607d5 fix(deps): update dependency @edx/paragon to v19.21.2 2022-05-11 00:32:40 +00:00
David Joy
e4033037f2 build: adding nvmrc, bumping paragon to latest (#557)
* build: adding nvmrc, bumping paragon to latest

Adding .nvmrc is a nicety. Bumping paragon to latest is necessary to ensure compatiblity with the edX override header (frontend-component-header-edx).

* test: snapshot needed updating to account for new data-testid

This is the result of upgrading to the latest paragon.  Presumably some test IDs were added.
2022-05-09 16:15:48 -04:00
Renovate Bot
9a730117fb fix(deps): update dependency @edx/frontend-component-header to v2.5.0 2022-05-09 12:16:45 +00:00
Jawayria
7a59c32660 Merge pull request #552 from openedx/jenkins/version-check-33ed66e
feat: Add package-lock file version check
2022-05-06 15:53:33 +05:00
Renovate Bot
bfcfe35530 chore(deps): update dependency @edx/reactifex to v1.1.0 2022-05-02 16:04:48 +00:00
Renovate Bot
cf9bd36eb4 chore(deps): update dependency @edx/frontend-build to v9.2.2 2022-05-02 12:49:29 +00:00
edX requirements bot
af34fc4079 feat: Add package-lock file version check 2022-04-29 08:45:54 -04:00
Renovate Bot
33ed66e916 fix(deps): update dependency react-redux to v7.2.8 2022-04-25 15:57:32 +00:00
Renovate Bot
4982e2768d fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.18 2022-04-25 12:06:20 +00:00
Renovate Bot
26ba34e648 fix(deps): update dependency @edx/frontend-platform to v1.15.6 2022-04-18 18:46:39 +00:00
Renovate Bot
6e71b7281e fix(deps): update dependency @edx/frontend-component-header to v2.4.6 2022-04-18 14:24:03 +00:00
Renovate Bot
5f9675a8a7 fix(deps): update dependency @edx/frontend-component-footer to v10.2.4 2022-04-11 16:23:38 +00:00
Renovate Bot
95155df409 chore(deps): update dependency @edx/frontend-build to v9.1.4 2022-04-11 13:41:03 +00:00
Renovate Bot
ed97f0db72 chore(deps): update dependency node-forge [security] 2022-04-04 14:42:03 +00:00
Renovate Bot
abce0a5387 chore(deps): pin dependency @edx/reactifex to v 2022-04-04 14:40:51 +00:00
edX requirements bot
ba3388dee8 chore!: Dropped support for Node 12 2022-04-04 08:04:42 -04:00
Usama Sadiq
c50b401c14 Merge pull request #541 from openedx/usamasadiq/update-pull-translations-command
build: update transifex pull translations command
2022-04-04 16:22:46 +05:00
UsamaSadiq
0c50bce43d build: update transifex pull translations command 2022-04-04 14:47:17 +05:00
Usama Sadiq
e56914eb80 Merge pull request #535 from openedx/jenkins/transifex-client-migration-ead9180
fix: transifex migration to new client
2022-04-04 14:09:02 +05:00
edX requirements bot
918aa91e49 feat: Added support for node v16 (#530)
Co-authored-by: Mohammad Ahtasham ul Hassan <ahthassan74@gmail.com>
2022-03-25 14:51:14 +05:00
David Joy
87230613c5 build: Delete CODEOWNERS (#537) 2022-03-18 10:25:02 -04:00
Ali Adnan
e2dfde2432 Merge pull request #534 from openedx/aadnan/migrate-reactifex
feat: migrate translations to reactifex
2022-03-18 14:01:31 +05:00
edX requirements bot
75ea16103a fix: transifex migration to new client 2022-03-17 08:51:00 -04:00
aliadnan
f5a6c483e2 feat: migrate translations to reactifex 2022-03-17 17:43:51 +05:00
Sarina Canelake
ead91806e6 Merge DEPR automation workflow
Add DEPR workflow automation
2022-02-24 15:21:46 -05:00
Sarina Canelake
f5e46741d2 build: add DEPR workflow automation 2022-02-23 14:36:56 -05:00
Renovate Bot
9cc77ddc1b fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.17 2022-01-31 08:21:25 +00:00
Renovate Bot
2e0549a859 fix(deps): update dependency core-js to v3.20.3 2022-01-17 09:51:23 +00:00
Renovate Bot
cb515e81fc fix(deps): update dependency @edx/frontend-platform to v1.14.9 2022-01-17 09:24:30 +00:00
Renovate Bot
f8520ca2dc fix(deps): update dependency @edx/frontend-component-header to v2.4.3 2021-12-27 09:49:05 +00:00
Renovate Bot
cce3146fed fix(deps): update dependency core-js to v3.20.0 2021-12-20 10:02:18 +00:00
Renovate Bot
1e48a55029 fix(deps): update dependency @edx/frontend-component-header to v2.4.2 2021-12-20 09:42:31 +00:00
Renovate Bot
9d4d6ee2a1 chore(deps): update dependency @edx/frontend-build to v8.2.0 2021-12-13 12:38:12 +00:00
Renovate Bot
b9e4fdaf64 fix(deps): update dependency @edx/frontend-platform to v1.14.4 2021-12-13 10:52:54 +00:00
Renovate Bot
7b14eeb42c fix(deps): update dependency core-js to v3.19.3 2021-12-06 09:10:22 +00:00
Renovate Bot
2b2a94f78c fix(deps): update dependency reselect to v4.1.5 2021-12-06 08:57:31 +00:00
Renovate Bot
5e94fa62ed fix(deps): update dependency redux-thunk to v2.4.1 2021-11-29 08:53:00 +00:00
Renovate Bot
f610c5bc70 fix(deps): update dependency @edx/frontend-platform to v1.14.1 2021-11-29 08:39:18 +00:00
Renovate Bot
5922947843 fix(deps): update dependency reselect to v4.1.4 2021-11-22 10:27:21 +00:00
Renovate Bot
02da9797b4 fix(deps): update dependency redux-thunk to v2.4.0 2021-11-22 10:13:32 +00:00
Renovate Bot
8cf5b82a78 fix(deps): update dependency core-js to v3.19.1 2021-11-15 12:54:15 +00:00
Renovate Bot
c265d57ea5 chore(deps): update dependency @edx/frontend-build to v8.1.6 2021-11-15 11:00:20 +00:00
edX Transifex Bot
1069f23239 chore(i18n): update translations 2021-11-15 01:40:52 +05:00
Renovate Bot
718400dcd1 fix(deps): update dependency @edx/frontend-platform to v1.14.0 2021-11-08 10:59:03 +00:00
Renovate Bot
59e112205d chore(deps): update dependency @edx/frontend-build to v8.1.3 2021-11-08 10:43:06 +00:00
Renovate Bot
7948812a78 fix(deps): update dependency redux to v4.1.2 2021-11-01 09:16:29 +00:00
Renovate Bot
3da88dd557 fix(deps): update dependency react-redux to v7.2.6 2021-11-01 09:06:12 +00:00
edX Transifex Bot
7181950081 chore(i18n): update translations 2021-11-01 01:40:48 +05:00
Waheed Ahmed
8fbedf008c Merge pull request #488 from edx/remove-age-banner
feat: add feature flag to toggle age banner
2021-10-25 17:13:18 +05:00
uzairr
ac912e5ffc feat: add feature flag to toggle age banner
Based on the requirement for COPPA,users under the age of 13 are
not be informed to update the age information.

Fixes: VAN-753
2021-10-25 17:10:03 +05:00
Renovate Bot
299cbbea6c fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.16 2021-10-25 09:05:53 +00:00
Renovate Bot
3f904fe8f6 chore(deps): update dependency @edx/frontend-build to v8.0.6 2021-10-25 08:57:34 +00:00
118 changed files with 35319 additions and 23709 deletions

12
.env
View File

@@ -10,6 +10,8 @@ LOGIN_URL=''
LOGOUT_URL=''
MARKETING_SITE_BASE_URL=''
ORDER_HISTORY_URL=''
ACCOUNT_SETTINGS_URL=''
ACCOUNT_PROFILE_URL=''
REFRESH_ACCESS_TOKEN_ENDPOINT=''
SEGMENT_KEY=''
SITE_NAME=''
@@ -22,5 +24,11 @@ LOGO_URL=''
LOGO_TRADEMARK_URL=''
LOGO_WHITE_URL=''
FAVICON_URL=''
ENABLE_LEARNER_RECORD_MFE=''
LEARNER_RECORD_MFE_BASE_URL=''
COLLECT_YEAR_OF_BIRTH=true
APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL=''
ENABLE_SKILLS_BUILDER_PROFILE=''
# Fallback in local style files
PARAGON_THEME_URLS={}
DISABLE_VISIBILITY_EDITING=''

View File

@@ -3,7 +3,9 @@ PORT=1995
ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload'
BASE_URL='localhost:1995'
CREDENTIALS_BASE_URL='http://localhost:18150'
ACCOUNT_SETTINGS_URL=http://localhost:1997
CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
ACCOUNT_PROFILE_URL=http://localhost:1995
ECOMMERCE_BASE_URL='http://localhost:18130'
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
LMS_BASE_URL='http://localhost:18000'
@@ -23,5 +25,11 @@ LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
ENABLE_LEARNER_RECORD_MFE=''
LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true
APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL='http://localhost:18000/courses'
ENABLE_SKILLS_BUILDER_PROFILE=''
# Fallback in local style files
PARAGON_THEME_URLS={}
DISABLE_VISIBILITY_EDITING=''

View File

@@ -5,6 +5,8 @@ CSRF_TOKEN_API_PATH='/csrf/api/v1/token'
ECOMMERCE_BASE_URL='http://localhost:18130'
LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference'
LMS_BASE_URL='http://localhost:18000'
ACCOUNT_SETTINGS_URL='http://localhost:1997'
ACCOUNT_PROFILE_URL='http://localhost:1995'
LOGIN_URL='http://localhost:18000/login'
LOGOUT_URL='http://localhost:18000/logout'
MARKETING_SITE_BASE_URL='http://localhost:18000'
@@ -18,4 +20,10 @@ LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
ENABLE_LEARNER_RECORD_MFE=''
ENABLE_SKILLS_BUILDER_PROFILE=''
LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true
APP_ID=''
MFE_CONFIG_API_URL=''
PARAGON_THEME_URLS={}
DISABLE_VISIBILITY_EDITING=''

View File

@@ -1,3 +1,4 @@
const { createConfig } = require('@edx/frontend-build');
// eslint-disable-next-line import/no-extraneous-dependencies
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('eslint');
module.exports = createConfig('eslint');

1
.github/CODEOWNERS vendored
View File

@@ -1 +0,0 @@
* @edx/community-engineering

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
# Adding new check for github-actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

24
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,24 @@
### Description
Include a description of your changes here, along with a link to any relevant Jira tickets and/or GitHub issues.
#### How Has This Been Tested?
Please describe in detail how you tested your changes.
#### Screenshots/sandbox (optional):
Include a link to the sandbox for design changes or screenshot for before and after. **Remove this section if it's not applicable.**
|Before|After|
|-------|-----|
| | |
#### Merge Checklist
* [ ] If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Sandbox, if applicable.
* [ ] Is there adequate test coverage for your changes?
#### Post-merge Checklist
* [ ] Deploy the changes to prod after verifying on stage or ask **@openedx/2u-infinity** to do it.
* [ ] 🎉 🙌 Celebrate! Thanks for your contribution.

View File

@@ -0,0 +1,19 @@
# Run the workflow that adds new tickets that are either:
# - labelled "DEPR"
# - title starts with "[DEPR]"
# - body starts with "Proposal Date" (this is the first template field)
# to the org-wide DEPR project board
name: Add newly created DEPR issues to the DEPR project board
on:
issues:
types: [opened]
jobs:
routeissue:
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
secrets:
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}

View File

@@ -0,0 +1,20 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "label: " it tries to apply
# the label indicated in rest of comment.
# If the comment starts with "remove label: ", it tries
# to remove the indicated label.
# Note: Labels are allowed to have spaces and this script does
# not parse spaces (as often a space is legitimate), so the command
# "label: really long lots of words label" will apply the
# label "really long lots of words label"
name: Allows for the adding and removing of labels via comment
on:
issue_comment:
types: [created]
jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

View File

@@ -1,4 +1,3 @@
---
name: ci
on:
push:
@@ -6,27 +5,25 @@ on:
- master
pull_request:
jobs:
build:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12
npm-test:
- i18n_extract
- is-es5
- lint
- test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm@6
node-version-file: '.nvmrc'
- run: make requirements
- run: make test NPM_TESTS=build
- run: make test NPM_TESTS=${{ matrix.npm-test }}
- name: upload coverage
uses: codecov/codecov-action@v2
- name: Coverage
if: ${{ matrix.npm-test == 'test' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

View File

@@ -7,4 +7,4 @@ on:
jobs:
commitlint:
uses: edx/.github/.github/workflows/commitlint.yml@master
uses: openedx/.github/.github/workflows/commitlint.yml@master

View File

@@ -0,0 +1,13 @@
#check package-lock file version
name: Lockfile Version check
on:
push:
branches:
- master
pull_request:
jobs:
version-check:
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master

12
.github/workflows/self-assign-issue.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "assign me" it assigns the author to the
# ticket (case insensitive)
name: Assign comment author to ticket if they say "assign me"
on:
issue_comment:
types: [created]
jobs:
self_assign_by_comment:
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master

View File

@@ -0,0 +1,12 @@
name: Update Browserslist DB
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
update-browserslist:
uses: openedx/.github/.github/workflows/update-browserslist-db.yml@master
secrets:
requirements_bot_github_token: ${{ secrets.requirements_bot_github_token }}

1
.gitignore vendored
View File

@@ -17,3 +17,4 @@ temp/babel-plugin-react-intl
/temp
/.vscode
/module.config.js
src/i18n/messages

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
24

View File

@@ -1,8 +0,0 @@
[main]
host = https://www.transifex.com
[edx-platform.frontend-app-profile]
file_filter = src/i18n/messages/<lang>.json
source_file = src/i18n/transifex_input.json
source_lang = en
type = KEYVALUEJSON

35
Makefile Executable file → Normal file
View File

@@ -1,16 +1,11 @@
transifex_resource = frontend-app-profile
transifex_langs = "ar,fr,es_419,zh_CN"
intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json
tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/translation/en/strings/
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/source/
# This directory must match .babelrc .
transifex_temp = ./temp/babel-plugin-react-intl
transifex_temp = ./temp/babel-plugin-formatjs
NPM_TESTS=build i18n_extract lint test is-es5
NPM_TESTS=build i18n_extract lint test
.PHONY: test
test: $(addprefix test.npm.,$(NPM_TESTS)) ## validate ci suite
@@ -40,20 +35,18 @@ detect_changed_source_translations:
# Checking for changed translations...
git diff --exit-code $(i18n)
# Pushes translations to Transifex. You must run make extract_translations first.
push_translations:
# Pushing strings to Transifex...
tx push -s
# Fetching hashes from Transifex...
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
# Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments
# Pushing comments to Transifex...
./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
# Pulls translations from Transifex.
pull_translations:
tx pull -f --mode reviewed --language=$(transifex_langs)
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
&& atlas pull $(ATLAS_OPTIONS) \
translations/frontend-platform/src/i18n/messages:frontend-platform \
translations/paragon/src/i18n/messages:paragon \
translations/frontend-component-header/src/i18n/messages:frontend-component-header \
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
translations/frontend-app-profile/src/i18n/messages:frontend-app-profile
$(intl_imports) frontend-platform paragon frontend-component-header frontend-component-footer frontend-app-profile
# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:

View File

@@ -1,57 +1,153 @@
|Build Status| |Codecov| |license|
#####################
frontend-app-profile
====================
#####################
This is a micro-frontend application responsible for the display and updating of user profiles. Please tag **@edx/arch-fed** on any PRs or issues.
|license-badge| |status-badge| |ci-badge| |codecov-badge|
.. |license-badge| image:: https://img.shields.io/github/license/openedx/frontend-app-profile.svg
:target: https://github.com/openedx/frontend-app-profile/blob/main/LICENSE
:alt: License
.. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
.. |ci-badge| image:: https://github.com/openedx/frontend-app-profile/actions/workflows/ci.yml/badge.svg
:target: https://github.com/openedx/frontend-app-profile/actions/workflows/ci.yml
:alt: Continuous Integration
.. |codecov-badge| image:: https://codecov.io/github/openedx/frontend-app-profile/coverage.svg?branch=main
:target: https://codecov.io/github/openedx/frontend-app-profile?branch=main
:alt: Codecov
********
Purpose
********
This is a micro-frontend application responsible for the display and updating of user profiles.
When a user views their own profile, they're given fields to edit their full name, location, primary spoken language, education, social links, and bio. Each field also has a dropdown to select the visibility of that field - i.e., whether it can be viewed by other learners.
When a user views someone else's profile, they see all those fields that that user set as public.
----------
***************
Getting Started
***************
Development
-----------
Installation
============
Start Devstack
^^^^^^^^^^^^^^
Follow these steps to provision, run, and enable an instance of the
Profile MFE for local development via the `devstack`_.
To use this application `devstack <https://github.com/edx/devstack>`__ must be running and you must be logged into it.
.. _devstack: https://github.com/openedx/devstack#getting-started
- Start devstack
- Log in (http://localhost:18000/login)
#. To use this application, `devstack <https://github.com/openedx/devstack>`__ must be running and you must be logged into it.
Start the development server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Start devstack
* Log in (http://localhost:18000/login)
In this project, install requirements and start the development server by running:
#. To run Profile, install requirements and start the development server by running:
.. code:: bash
.. code-block::
npm install
npm start # The server will run on port 1995
1. Clone your new repo:
Once the dev server is up visit http://localhost:1995/u/staff.
``git clone https://github.com/openedx/frontend-app-profile.git``
----------
2. Use node v18.x.
Configuration and Deployment
----------------------------
The current version of the micro-frontend build scripts support node 18.
Using other major versions of node *may* work, but this is unsupported. For
convenience, this repository includes an .nvmrc file to help in setting the
correct node version via `nvm <https://github.com/nvm-sh/nvm>`_.
3. Install npm dependencies:
``cd frontend-app-profile && npm ci``
4. Start the dev server:
``npm start``
The server will run on port 1995
Once the dev server is up, visit http://localhost:1995/u/staff.
Plugins
=======
This MFE can be customized using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
The parts of this MFE that can be customized in that manner are documented `here </src/plugin-slots>`_.
Configuration
=============
This MFE is configured via node environment variables supplied at build time. See the .env file for the list of required environment variables. Example build syntax with a single environment variable:
.. code:: bash
.. code-block::
NODE_ENV=production ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' npm run build
Getting Help
============
For more information see the document: `Micro-frontend applications in Open
edX <https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/micro-frontends-in-open-edx.html>`__.
If you're having trouble, we have discussion forums at
https://discuss.openedx.org where you can connect with others in the community.
.. |Build Status| image:: https://api.travis-ci.org/edx/frontend-app-profile.svg?branch=master
:target: https://travis-ci.org/edx/frontend-app-profile
.. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-app-profile
:target: https://codecov.io/gh/edx/frontend-app-profile
.. |license| image:: https://img.shields.io/npm/l/@edx/frontend-app-profile.svg
:target: @edx/frontend-app-profile
Our real-time conversations are on Slack. You can request a `Slack
invitation`_, then join our `community Slack workspace`_. Because this is a
frontend repository, the best place to discuss it would be in the `#wg-frontend
channel`_.
For anything non-trivial, the best path is to open an issue in this repository
with as many details about the issue you are facing as you can provide. Please tag **@openedx/2u-infinity** on any PRs or issues.
https://github.com/openedx/frontend-app-profile/issues
For more information about these options, see the `Getting Help`_ page.
.. _Slack invitation: https://openedx.org/slack
.. _community Slack workspace: https://openedx.slack.com/
.. _#wg-frontend channel: https://openedx.slack.com/archives/C04BM6YC7A6
.. _Getting Help: https://openedx.org/getting-help
License
=======
The code in this repository is licensed under the AGPLv3 unless otherwise
noted.
Please see `LICENSE <LICENSE>`_ for details.
Contributing
============
Contributions are very welcome. Please read `How To Contribute`_ for details.
.. _How To Contribute: https://openedx.org/r/how-to-contribute
This project is currently accepting all types of contributions, bug fixes,
security fixes, maintenance work, or new features. However, please make sure
to have a discussion about your new feature idea with the maintainers prior to
beginning development to maximize the chances of your change being accepted.
You can start a conversation by creating a new issue on this repo summarizing
your idea.
The Open edX Code of Conduct
============================
All community members are expected to follow the `Open edX Code of Conduct`_.
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
People
======
The assigned maintainers for this component and other project details may be
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
file in this repo.
.. _Backstage: https://backstage.herokuapp.com/catalog/default/component/frontend-app-profile
Reporting Security Issues
=========================
Please do not report security issues in public. Email security@openedx.org instead.

25
catalog-info.yaml Normal file
View File

@@ -0,0 +1,25 @@
# This file records information about this repo. Its use is described in OEP-55:
# https://open-edx-proposals.readthedocs.io/en/latest/processes/oep-0055-proc-project-maintainers.html
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: 'frontend-app-profile'
description: 'This is a micro-frontend application responsible for displaying and updating the user profiles.'
links:
- url: 'https://github.com/openedx/frontend-app-profile/blob/master/README.rst'
title: 'Documentation'
icon: 'Article'
annotations:
# (Optional) Annotation keys and values can be whatever you want.
# We use it in Open edX repos to have a comma-separated list of GitHub user
# names that might be interested in changes to the architecture of this
# component.
openedx.org/arch-interest-groups: ""
# This can be multiple comma-separated projects.
openedx.org/add-to-projects: "openedx:23"
openedx.org/release: "master"
spec:
owner: group:2u-infinity
type: 'service'
lifecycle: 'production'
# (Optional) An array of different components or resources.

View File

@@ -1,7 +1,7 @@
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('jest', {
setupFiles: [
setupFilesAfterEnv: [
'<rootDir>/src/setupTest.js',
],
});

View File

@@ -1,6 +0,0 @@
# This file describes this Open edX repo, as described in OEP-2:
# https://open-edx-proposals.readthedocs.io/en/latest/oep-0002-bp-repo-metadata.html#specification
nick: prof
oeps: {}
openedx-release: {ref: master}

46930
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,71 +6,73 @@
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "git+https://github.com/edx/frontend-app-profile.git"
"url": "git+https://github.com/openedx/frontend-app-profile.git"
},
"scripts": {
"build": "fedx-scripts webpack",
"i18n_extract": "BABEL_ENV=i18n fedx-scripts babel src --quiet > /dev/null",
"is-es5": "es-check es5 ./dist/*.js",
"i18n_extract": "fedx-scripts formatjs extract",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"test": "fedx-scripts jest --coverage --passWithNoTests"
"dev": "PUBLIC_PATH=/profile/ MFE_CONFIG_API_URL='http://localhost:8000/api/mfe_config/v1' fedx-scripts webpack-dev-server --progress --host apps.local.openedx.io",
"test": "TZ=UTC fedx-scripts jest --coverage --passWithNoTests",
"stubs": "pact-stub-service ./src/pacts/frontend-app-profile-edx-platform.json --port 18000"
},
"bugs": {
"url": "https://github.com/edx/frontend-app-profile/issues"
"url": "https://github.com/openedx/frontend-app-profile/issues"
},
"homepage": "https://github.com/edx/frontend-app-profile#readme",
"homepage": "https://github.com/openedx/frontend-app-profile#readme",
"publishConfig": {
"access": "public"
},
"browserslist": [
"last 2 versions",
"ie 11"
"extends @edx/browserslist-config"
],
"dependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/frontend-component-footer": "10.1.6",
"@edx/frontend-component-header": "2.3.0",
"@edx/frontend-platform": "1.12.7",
"@edx/paragon": "16.6.1",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-brands-svg-icons": "5.15.4",
"@fortawesome/free-regular-svg-icons": "5.15.4",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"classnames": "2.3.1",
"core-js": "3.18.2",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-footer": "^14.6.0",
"@edx/frontend-component-header": "^6.2.0",
"@edx/frontend-platform": "^8.3.1",
"@edx/openedx-atlas": "^0.7.0",
"@fortawesome/fontawesome-svg-core": "6.7.2",
"@fortawesome/free-brands-svg-icons": "6.7.2",
"@fortawesome/free-regular-svg-icons": "6.7.2",
"@fortawesome/free-solid-svg-icons": "6.7.2",
"@fortawesome/react-fontawesome": "0.2.6",
"@openedx/frontend-plugin-framework": "^1.7.0",
"@openedx/paragon": "^23.4.5",
"@pact-foundation/pact": "^11.0.2",
"@redux-devtools/extension": "3.3.0",
"classnames": "2.5.1",
"core-js": "3.46.0",
"history": "5.3.0",
"lodash.camelcase": "4.3.0",
"lodash.get": "4.4.2",
"lodash.pick": "4.4.0",
"lodash.snakecase": "4.1.1",
"prop-types": "15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-redux": "7.2.5",
"react-router": "5.2.1",
"react-router-dom": "5.3.0",
"redux": "4.1.1",
"redux-devtools-extension": "2.13.9",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-helmet": "6.1.0",
"react-redux": "7.2.9",
"react-router": "6.30.1",
"react-router-dom": "6.30.1",
"redux": "4.2.1",
"redux-logger": "3.0.6",
"redux-saga": "1.1.3",
"redux-thunk": "2.3.0",
"regenerator-runtime": "0.13.9",
"reselect": "4.0.0",
"universal-cookie": "3.1.0"
"redux-saga": "1.3.0",
"redux-thunk": "2.4.2",
"regenerator-runtime": "0.14.1",
"reselect": "5.1.1",
"universal-cookie": "4.0.4"
},
"devDependencies": {
"@commitlint/cli": "13.2.1",
"@commitlint/config-angular": "13.2.0",
"@edx/frontend-build": "8.0.4",
"codecov": "3.8.3",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"es-check": "5.2.4",
"glob": "7.2.0",
"react-test-renderer": "16.14.0",
"reactifex": "1.1.1",
"redux-mock-store": "1.5.4"
"@commitlint/cli": "19.8.1",
"@commitlint/config-angular": "19.8.1",
"@edx/browserslist-config": "^1.1.1",
"@openedx/frontend-build": "^14.6.2",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "14.3.1",
"glob": "11.0.3",
"redux-mock-store": "1.5.5"
}
}

View File

@@ -22,6 +22,11 @@
"pin"
],
"automerge": true
},
{
"matchPackagePatterns": ["@edx", "@openedx"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"timezone": "America/New_York"

View File

@@ -1,7 +1,7 @@
import { getConfig } from '@edx/frontend-platform';
import { applyMiddleware, createStore, compose } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';
import { composeWithDevTools } from '@redux-devtools/extension';
import { createLogger } from 'redux-logger';
import createSagaMiddleware from 'redux-saga';

View File

@@ -1,9 +1,9 @@
import { combineReducers } from 'redux';
import { reducer as profilePage } from '../profile';
import { reducer as profilePageReducer } from '../profile';
const createRootReducer = () => combineReducers({
profilePage,
profilePage: profilePageReducer,
});
export default createRootReducer;

View File

@@ -1,5 +1,4 @@
import { all } from 'redux-saga/effects';
import { saga as profileSaga } from '../profile';
export default function* rootSaga() {

26
src/head/Head.jsx Normal file
View File

@@ -0,0 +1,26 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { useIntl } from '@edx/frontend-platform/i18n';
import { getConfig } from '@edx/frontend-platform';
import messages from './messages';
const Head = () => {
const intl = useIntl();
return (
<Helmet>
<title>
{intl.formatMessage(messages['profile.page.title'], {
siteName: getConfig().SITE_NAME,
})}
</title>
<link
rel="shortcut icon"
href={getConfig().FAVICON_URL}
type="image/x-icon"
/>
</Helmet>
);
};
export default Head;

17
src/head/Head.test.jsx Normal file
View File

@@ -0,0 +1,17 @@
import React from 'react';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import { Helmet } from 'react-helmet';
import { render } from '@testing-library/react';
import { getConfig } from '@edx/frontend-platform';
import Head from './Head';
describe('Head', () => {
const props = {};
it('should match render title tag and favicon with the site configuration values', () => {
render(<IntlProvider locale="en"><Head {...props} /></IntlProvider>);
const helmet = Helmet.peek();
expect(helmet.title).toEqual(`Profile | ${getConfig().SITE_NAME}`);
expect(helmet.linkTags[0].rel).toEqual('shortcut icon');
expect(helmet.linkTags[0].href).toEqual(getConfig().FAVICON_URL);
});
});

11
src/head/messages.js Normal file
View File

@@ -0,0 +1,11 @@
import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'profile.page.title': {
id: 'profile.page.title',
defaultMessage: 'Profile | {siteName}',
description: 'Title tag',
},
});
export default messages;

1
src/i18n/index.js Normal file
View File

@@ -0,0 +1 @@
export default [];

View File

@@ -1,32 +0,0 @@
import arMessages from './messages/ar.json';
import caMessages from './messages/ca.json';
// no need to import en messages-- they are in the defaultMessage field
import es419Messages from './messages/es_419.json';
import frMessages from './messages/fr.json';
import zhcnMessages from './messages/zh_CN.json';
import heMessages from './messages/he.json';
import idMessages from './messages/id.json';
import kokrMessages from './messages/ko_kr.json';
import plMessages from './messages/pl.json';
import ptbrMessages from './messages/pt_br.json';
import ruMessages from './messages/ru.json';
import thMessages from './messages/th.json';
import ukMessages from './messages/uk.json';
const messages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'zh-cn': zhcnMessages,
ca: caMessages,
he: heMessages,
id: idMessages,
'ko-kr': kokrMessages,
pl: plMessages,
'pt-br': ptbrMessages,
ru: ruMessages,
th: thMessages,
uk: ukMessages,
};
export default messages;

View File

@@ -1,51 +0,0 @@
{
"profile.age.headline": "لا يمكن مشاركة ملفك الشخصي",
"profile.age.details": "لمشاركة ملفك الشخصي مع متعلمي edX الآخرين يجب التحقق من أن يكون عمرك أكثر من ١٣ سنة",
"profile.age.set.date": "اضبط تاريخ ميلاك",
"profile.datejoined.member.since": "عضو منذُ {year}",
"profile.bio.empty": "أضف نبذة قصيرة",
"profile.bio.about.me": "نبذة عنّي",
"profile.certificate.organization.label": "من",
"profile.certificate.completion.date.label": "مكتمل في",
"profile.no.certificates": "لم تحصل على أية شهادات حتى الآن.",
"profile.certificates.my.certificates": "شهاداتي",
"profile.certificates.view.certificate": "معاينة الشهادة",
"profile.certificates.types.verified": "شهادة موثقة",
"profile.certificates.types.professional": "شهادة مهنية",
"profile.certificates.types.unknown": "شهادة",
"profile.country.label": "الموقع",
"profile.country.empty": "أضف موقعًا",
"profile.education.empty": "أضف مؤهلًا تعليميًا",
"profile.education.education": "المستوى التعليمي",
"profile.education.levels.p": "شهادة دكتوراه",
"profile.education.levels.m": "ماجستير أو شهادة مهنيّة",
"profile.education.levels.b": "درجة البكالوريوس",
"profile.education.levels.a": "درجة الزمالة",
"profile.education.levels.hs": "شهادة الثانوية العامة",
"profile.education.levels.jhs": "شهادة الثانوية الصغرى/الإعدادية/المرحلة المتوسّطة",
"profile.education.levels.el": "شهادة المدرسة الابتدائية",
"profile.education.levels.none": "لا يوجد تعليم رسمي",
"profile.education.levels.o": "نوع آخر من التعليم",
"profile.editbutton.edit": "تحرير",
"profile.formcontrols.who.can.see": "من يمكنه مشاهدة هذا:",
"profile.formcontrols.button.cancel": "إلغاء",
"profile.formcontrols.button.save": "حفظ",
"profile.formcontrols.button.saving": "جاري الحفظ",
"profile.formcontrols.button.saved": "تم الحفظ",
"profile.visibility.who.just.me": "أنا فقط",
"profile.visibility.who.everyone": "جميع أعضاء edX",
"profile.name.full.name": "الاسم الكامل",
"profile.name.details": "هذا هو الاسم الذي سيظهر في حسابك وفي شهاداتك",
"profile.name.empty": "إضافة اسم",
"profile.preferredlanguage.empty": "إضافة اللغة",
"profile.preferredlanguage.label": "لغة التحدث الأم",
"profile.profileavatar.upload-button": "تحميل صورة",
"profile.profileavatar.remove.button": "حذف",
"profile.image.alt.attribute": "صورة عرض الملف الشخصي",
"profile.profileavatar.change-button": "تغيير",
"profile.sociallinks.add": "إضافة {network}",
"profile.sociallinks.social.links": "روابط قنوات التواصل الاجتماعي",
"profile.notfound.message": "الصفحة التي تبحث عنها غير متوفرة أو هناك خطأ في نص الرابط. الرجاء التحقق من الرابط والمحاولة مجددا.",
"profile.viewMyRecords": "عرض سجلّاتي",
"profile.loading": "جاري تحميل الملف الشخصي ..."
}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1,51 +0,0 @@
{
"profile.age.headline": "Tu perfil no puede ser compartido.",
"profile.age.details": "Para compartir tu perfil con otros estudiantes de edX, debes confirmar que tienes más de 13 años.",
"profile.age.set.date": "Establece tu fecha de nacimiento",
"profile.datejoined.member.since": "Miembro desde {year}",
"profile.bio.empty": "Añade una breve biografía",
"profile.bio.about.me": "Sobre Mí",
"profile.certificate.organization.label": "Desde",
"profile.certificate.completion.date.label": "Completado el {date}",
"profile.no.certificates": "Todavía no ha obtenido ningún certificado.",
"profile.certificates.my.certificates": "Mis Certificados",
"profile.certificates.view.certificate": "Ver Certificado",
"profile.certificates.types.verified": "Certificado verificado",
"profile.certificates.types.professional": "Certificado profesional",
"profile.certificates.types.unknown": "Certificado",
"profile.country.label": "Ubicación",
"profile.country.empty": "Añade ubicación",
"profile.education.empty": "Añade Educación",
"profile.education.education": "Educación",
"profile.education.levels.p": "Doctorado",
"profile.education.levels.m": "Master o magíster",
"profile.education.levels.b": "Pregrado o Licenciatura",
"profile.education.levels.a": "Grado técnico - tecnológico",
"profile.education.levels.hs": "Enseñanza secundaria",
"profile.education.levels.jhs": "Formación media",
"profile.education.levels.el": "Enseñanza primaria",
"profile.education.levels.none": "Ninguna educación formal",
"profile.education.levels.o": "Otra educación",
"profile.editbutton.edit": "Editar",
"profile.formcontrols.who.can.see": "Quién puede ver esto:",
"profile.formcontrols.button.cancel": "Cancelar",
"profile.formcontrols.button.save": "Guardar",
"profile.formcontrols.button.saving": "Guardando",
"profile.formcontrols.button.saved": "Guardado",
"profile.visibility.who.just.me": "Solo yo",
"profile.visibility.who.everyone": "Todos en edX",
"profile.name.full.name": "Nombre completo",
"profile.name.details": "Este es el nombre que aparecerá en tu cuenta y en tus certificados.",
"profile.name.empty": "Añade nombre",
"profile.preferredlanguage.empty": "Añadir idioma",
"profile.preferredlanguage.label": "Idioma principal que hablas",
"profile.profileavatar.upload-button": "Subir foto",
"profile.profileavatar.remove.button": "Eliminar",
"profile.image.alt.attribute": "avatar del perfil",
"profile.profileavatar.change-button": "Cambiar",
"profile.sociallinks.add": "Añade {network}",
"profile.sociallinks.social.links": "Enlaces De Redes Sociales",
"profile.notfound.message": "La página que estas buscando no está disponible o hay un error en la URL. Por favor, comprueba la URL y vuelve a intentarlo.",
"profile.viewMyRecords": "Ver mis registros",
"profile.loading": "Cargando perfil..."
}

View File

@@ -1,51 +0,0 @@
{
"profile.age.headline": "Votre profil ne peut pas être partagé.",
"profile.age.details": "Pour partager votre profil avec d'autres apprenants edX, vous devez confirmer que vous avez plus de 13 ans.",
"profile.age.set.date": "Définissez votre date de naissance",
"profile.datejoined.member.since": "Membre depuis {year}",
"profile.bio.empty": "Ajouter une courte biographie",
"profile.bio.about.me": "À propos de moi",
"profile.certificate.organization.label": "De",
"profile.certificate.completion.date.label": "Terminé le {date}",
"profile.no.certificates": "Vous n'avez pas encore de certificats.",
"profile.certificates.my.certificates": "Mes certificats",
"profile.certificates.view.certificate": "Voir le certificat",
"profile.certificates.types.verified": "Certificat vérifié",
"profile.certificates.types.professional": "Certificat professionnel",
"profile.certificates.types.unknown": "Certificat",
"profile.country.label": "Localisation",
"profile.country.empty": "Ajouter localisation",
"profile.education.empty": "Ajouter une éducation",
"profile.education.education": "Education",
"profile.education.levels.p": "Doctorat",
"profile.education.levels.m": "Master ou diplôme professionnel",
"profile.education.levels.b": "Diplôme de licence",
"profile.education.levels.a": "Grade de l'associé",
"profile.education.levels.hs": "Lycée / enseignement secondaire",
"profile.education.levels.jhs": "Collège / enseignement secondaire inférieur",
"profile.education.levels.el": "Enseignement primaire",
"profile.education.levels.none": "Sans diplôme",
"profile.education.levels.o": "Autre niveau d'étude",
"profile.editbutton.edit": "Modifier",
"profile.formcontrols.who.can.see": "Qui peut voir ça :",
"profile.formcontrols.button.cancel": "Annuler",
"profile.formcontrols.button.save": "Enregistrer",
"profile.formcontrols.button.saving": "Enregistrement",
"profile.formcontrols.button.saved": "Enregistré",
"profile.visibility.who.just.me": "Juste moi",
"profile.visibility.who.everyone": "Tout le monde sur edX",
"profile.name.full.name": "Nom complet",
"profile.name.details": "C'est le nom qui apparaît dans votre compte et sur vos certificats.",
"profile.name.empty": "Ajouter un nom",
"profile.preferredlanguage.empty": "Ajouter une langue",
"profile.preferredlanguage.label": "Langue principale parlée",
"profile.profileavatar.upload-button": "Envoyer la photo",
"profile.profileavatar.remove.button": "Supprimer",
"profile.image.alt.attribute": "Profil avatar",
"profile.profileavatar.change-button": "Modifier",
"profile.sociallinks.add": "Ajouter {network}",
"profile.sociallinks.social.links": "Liens vers les réseaux sociaux",
"profile.notfound.message": "La page que vous recherchez n'est pas disponible ou il y a une erreur dans l'URL. Veuillez vérifier l'URL et réessayer.",
"profile.viewMyRecords": "Voir mes succès",
"profile.loading": "Chargement du profil...."
}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1,51 +0,0 @@
{
"profile.age.headline": "Your profile cannot be shared.",
"profile.age.details": "To share your profile with other edX learners, you must confirm that you are over the age of 13.",
"profile.age.set.date": "Set your date of birth",
"profile.datejoined.member.since": "Member since {year}",
"profile.bio.empty": "Add a short bio",
"profile.bio.about.me": "About Me",
"profile.certificate.organization.label": "From",
"profile.certificate.completion.date.label": "Completed on {date}",
"profile.no.certificates": "You don't have any certificates yet.",
"profile.certificates.my.certificates": "My Certificates",
"profile.certificates.view.certificate": "View Certificate",
"profile.certificates.types.verified": "Verified Certificate",
"profile.certificates.types.professional": "Professional Certificate",
"profile.certificates.types.unknown": "Certificate",
"profile.country.label": "Location",
"profile.country.empty": "Add location",
"profile.education.empty": "Add education",
"profile.education.education": "Education",
"profile.education.levels.p": "Doctorate",
"profile.education.levels.m": "Master's or professional degree",
"profile.education.levels.b": "Bachelor's Degree",
"profile.education.levels.a": "Associate's degree",
"profile.education.levels.hs": "Secondary/high school",
"profile.education.levels.jhs": "Junior secondary/junior high/middle school",
"profile.education.levels.el": "Elementary/primary school",
"profile.education.levels.none": "No formal education",
"profile.education.levels.o": "Other education",
"profile.editbutton.edit": "Edit",
"profile.formcontrols.who.can.see": "Who can see this:",
"profile.formcontrols.button.cancel": "Cancel",
"profile.formcontrols.button.save": "Save",
"profile.formcontrols.button.saving": "Saving",
"profile.formcontrols.button.saved": "Saved",
"profile.visibility.who.just.me": "Just me",
"profile.visibility.who.everyone": "Everyone on edX",
"profile.name.full.name": "Full Name",
"profile.name.details": "This is the name that appears in your account and on your certificates.",
"profile.name.empty": "Add name",
"profile.preferredlanguage.empty": "Add language",
"profile.preferredlanguage.label": "Primary Language Spoken",
"profile.profileavatar.upload-button": "Upload Photo",
"profile.profileavatar.remove.button": "Remove",
"profile.image.alt.attribute": "profile avatar",
"profile.profileavatar.change-button": "Change",
"profile.sociallinks.add": "Add {network}",
"profile.sociallinks.social.links": "Social Links",
"profile.notfound.message": "The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.",
"profile.viewMyRecords": "View My Records",
"profile.loading": "Profile loading..."
}

View File

@@ -14,52 +14,49 @@ import {
} from '@edx/frontend-platform/react';
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Switch } from 'react-router-dom';
// eslint-disable-next-line import/no-unresolved
import { createRoot } from 'react-dom/client';
import Header, { messages as headerMessages } from '@edx/frontend-component-header';
import Footer, { messages as footerMessages } from '@edx/frontend-component-footer';
import Header from '@edx/frontend-component-header';
import { FooterSlot } from '@edx/frontend-component-footer';
import appMessages from './i18n';
import { ProfilePage, NotFoundPage } from './profile';
import messages from './i18n';
import configureStore from './data/configureStore';
import Head from './head/Head';
import AppRoutes from './routes/AppRoutes';
import './index.scss';
subscribe(APP_READY, () => {
ReactDOM.render(
const rootNode = createRoot(document.getElementById('root'));
subscribe(APP_READY, async () => {
rootNode.render(
<AppProvider store={configureStore()}>
<Head />
<Header />
<main>
<Switch>
<Route path="/u/:username" component={ProfilePage} />
<Route path="/notfound" component={NotFoundPage} />
<Route path="*" component={NotFoundPage} />
</Switch>
<main id="main">
<AppRoutes />
</main>
<Footer />
<FooterSlot />
</AppProvider>,
document.getElementById('root'),
);
});
subscribe(APP_INIT_ERROR, (error) => {
ReactDOM.render(<ErrorPage message={error.message} />, document.getElementById('root'));
rootNode.render(<ErrorPage message={error.message} />, document.getElementById('root'));
});
initialize({
messages: [
appMessages,
headerMessages,
footerMessages,
],
requireAuthenticatedUser: true,
messages,
hydrateAuthenticatedUser: true,
handlers: {
config: () => {
mergeConfig({
ENABLE_LEARNER_RECORD_MFE: (process.env.ENABLE_LEARNER_RECORD_MFE || false),
LEARNER_RECORD_MFE_BASE_URL: process.env.LEARNER_RECORD_MFE_BASE_URL,
COLLECT_YEAR_OF_BIRTH: process.env.COLLECT_YEAR_OF_BIRTH,
ENABLE_SKILLS_BUILDER_PROFILE: process.env.ENABLE_SKILLS_BUILDER_PROFILE,
DISABLE_VISIBILITY_EDITING: process.env.DISABLE_VISIBILITY_EDITING,
}, 'App loadConfig override handler');
},
},

View File

@@ -1,8 +1,6 @@
@import "~@edx/brand/paragon/fonts";
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
@import "~@edx/frontend-component-header/dist/index";
@import "~@edx/frontend-component-footer/dist/footer";
@import './profile/index';
@import 'profile/index';

View File

@@ -0,0 +1,81 @@
{
"consumer": {
"name": "frontend-app-profile"
},
"interactions": [
{
"description": "A request for user's basic information",
"providerStates": [
{
"name": "Account and user's information does not exist"
}
],
"request": {
"method": "GET",
"path": "/api/user/v1/accounts/staff_not_found"
},
"response": {
"status": 404
}
},
{
"description": "A request for user's basic information",
"providerStates": [
{
"name": "I have a user's basic information"
}
],
"request": {
"method": "GET",
"path": "/api/user/v1/accounts/staff"
},
"response": {
"body": {
"bio": "This is my bio",
"country": "ME",
"dateJoined": "2017-06-07T00:44:23Z",
"email": "staff@example.com",
"isActive": true,
"languageProficiencies": [],
"levelOfEducation": null,
"name": "Lemon Seltzer",
"profileImage": {},
"socialLinks": [],
"username": "staff",
"yearOfBirth": 1901
},
"headers": {
"Content-Type": "application/json"
},
"matchingRules": {
"body": {
"$": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
}
}
},
"status": 200
}
}
],
"metadata": {
"pact-js": {
"version": "11.0.2"
},
"pactRust": {
"ffi": "0.4.0",
"models": "1.0.4"
},
"pactSpecification": {
"version": "3.0.0"
}
},
"provider": {
"name": "edx-platform"
}
}

View File

@@ -0,0 +1,97 @@
# Additional Profile Fields
### Slot ID: `org.openedx.frontend.profile.additional_profile_fields.v1`
## Description
This slot is used to replace/modify/hide the additional profile fields in the profile page.
## Example
The following `env.config.jsx` will extend the default fields with a additional custom fields through a simple example component.
![Screenshot of Custom Fields](./images/custom_fields.png)
### Using the Additional Fields Component
Create a file named `env.config.jsx` at the MFE root with this:
```jsx
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
import Example from './src/plugin-slots/AdditionalProfileFieldsSlot/example';
const config = {
pluginSlots: {
'org.openedx.frontend.profile.additional_profile_fields.v1': {
plugins: [
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'additional_profile_fields',
type: DIRECT_PLUGIN,
RenderWidget: Example,
},
},
],
},
},
};
export default config;
```
## Plugin Props
When implementing a plugin for this slot, the following props are available:
### `updateUserProfile`
- **Type**: Function
- **Description**: A function for updating the user's profile with new field values. This handles the API call to persist changes to the backend.
- **Usage**: Pass an object containing the field updates to be saved to the user's profile. The function automatically handles the persistence and UI updates.
#### Example
```javascript
updateUserProfile({ extendedProfile: [{ fieldName: 'favorite_color', fieldValue: value }] });
```
### `profileFieldValues`
- **Type**: Array of Objects
- **Description**: Contains the current values of all additional profile fields as an array of objects. Each object has a `fieldName` property (string) and a `fieldValue` property (which can be string, boolean, number, or other data types depending on the field type).
- **Usage**: Access specific field values by finding the object with the matching `fieldName` and reading its `fieldValue` property. Use array methods like `find()` to locate specific fields.
#### Example
```javascript
// Finding a specific field value
const nifField = profileFieldValues.find(field => field.fieldName === 'nif');
const nifValue = nifField ? nifField.fieldValue : null;
// Example data structure:
[
{
"fieldName": "favorite_color",
"fieldValue": "red"
},
{
"fieldName": "employment_situation",
"fieldValue": "Unemployed"
},
]
```
### `profileFieldErrors`
- **Type**: Object
- **Description**: Contains validation errors for profile fields. Each key corresponds to a field name, and the value is the error message.
- **Usage**: Check for field-specific errors to display validation feedback to users.
### `formComponents`
- **Type**: Object
- **Description**: Provides access to reusable form components that are consistent with the rest of the profile page styling and behavior. These components follow the platform's design system and include proper validation and accessibility features.
- **Usage**: Use these components in your custom fields implementation to maintain UI consistency. Available components include `SwitchContent` for managing different UI states, `EmptyContent` for empty states, and `EditableItemHeader` for consistent headers.
### `refreshUserProfile`
- **Type**: Function
- **Description**: A function that triggers a refresh of the user's profile data. This can be used after updating profile fields to ensure the UI reflects the latest data from the server.
- **Usage**: Call this function with the username parameter when you need to manually reload the user profile information. Note that `updateUserProfile` typically handles data refresh automatically.
#### Example
```javascript
refreshUserProfile(username);
```

View File

@@ -0,0 +1,129 @@
import { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { Button } from '@openedx/paragon';
import { getAuthenticatedUser } from '@edx/frontend-platform/auth';
/**
* Straightforward example of how you could use the pluginProps provided by
* the AdditionalProfileFieldsSlot to create a custom profile field.
*
* Here you can set a 'favorite_color' field with radio buttons and
* save it to the user's profile, especifically to their `meta` in
* the user's model. For more information, see the documentation:
*
* https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/user_api/README.rst#persisting-optional-user-metadata
*/
const Example = ({
updateUserProfile,
profileFieldValues,
profileFieldErrors,
formComponents: { SwitchContent, EditableItemHeader, EmptyContent } = {},
}) => {
const authenticatedUser = getAuthenticatedUser();
const [formMode, setFormMode] = useState('editable');
// Get current favorite color from profileFieldValues
const currentColorField = profileFieldValues?.find(field => field.fieldName === 'favorite_color');
const currentColor = currentColorField ? currentColorField.fieldValue : '';
const [value, setValue] = useState(currentColor);
const handleChange = e => setValue(e.target.value);
// Get any validation errors for the favorite_color field
const colorFieldError = profileFieldErrors?.favorite_color;
useEffect(() => {
if (!value) { setFormMode('empty'); }
if (colorFieldError) {
setFormMode('editing');
}
}, [colorFieldError, value]);
const handleSubmit = () => {
try {
updateUserProfile(authenticatedUser.username, { extendedProfile: [{ fieldName: 'favorite_color', fieldValue: value }] });
setFormMode('editable');
} catch (error) {
setFormMode('editing');
}
};
return (
<div className="border border-accent-500 p-3 mt-5">
<h3 className="h3">Example Additional Profile Fields Slot</h3>
<SwitchContent
className="pt-40px"
expression={formMode}
cases={{
editing: (
<>
<label className="edit-section-header" htmlFor="favorite_color">
Favorite Color
</label>
<input
className="form-control"
id="favorite_color"
name="favorite_color"
value={value}
onChange={handleChange}
/>
<Button type="button" className="mt-2" onClick={handleSubmit}>
Save
</Button>
</>
),
editable: (
<>
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
Favorite Color
</p>
</div>
<EditableItemHeader
content={value}
showEditButton
onClickEdit={() => setFormMode('editing')}
showVisibility={false}
visibility="private"
/>
</>
),
empty: (
<>
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
Favorite Color
</p>
</div>
<EmptyContent onClick={() => setFormMode('editing')}>
<p className="mb-0">Click to add your favorite color</p>
</EmptyContent>
</>
),
}}
/>
</div>
);
};
Example.propTypes = {
updateUserProfile: PropTypes.func.isRequired,
profileFieldValues: PropTypes.arrayOf(
PropTypes.shape({
fieldName: PropTypes.string.isRequired,
fieldValue: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.number,
]).isRequired,
}),
),
profileFieldErrors: PropTypes.objectOf(PropTypes.string),
formComponents: PropTypes.shape({
SwitchContent: PropTypes.elementType.isRequired,
}),
};
export default Example;

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -0,0 +1,37 @@
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import { useDispatch, useSelector } from 'react-redux';
import { useCallback } from 'react';
import { patchProfile } from '../../profile/data/services';
import { fetchProfile } from '../../profile/data/actions';
import SwitchContent from '../../profile/forms/elements/SwitchContent';
import EmptyContent from '../../profile/forms/elements/EmptyContent';
import EditableItemHeader from '../../profile/forms/elements/EditableItemHeader';
const AdditionalProfileFieldsSlot = () => {
const dispatch = useDispatch();
const extendedProfileValues = useSelector((state) => state.profilePage.account.extendedProfile);
const errors = useSelector((state) => state.profilePage.errors);
const pluginProps = {
refreshUserProfile: useCallback((username) => dispatch(fetchProfile(username)), [dispatch]),
updateUserProfile: patchProfile,
profileFieldValues: extendedProfileValues,
profileFieldErrors: errors,
formComponents: {
SwitchContent,
EmptyContent,
EditableItemHeader,
},
};
return (
<PluginSlot
id="org.openedx.frontend.profile.additional_profile_fields.v1"
pluginProps={pluginProps}
/>
);
};
export default AdditionalProfileFieldsSlot;

View File

@@ -0,0 +1,53 @@
# Footer Slot
### Slot ID: `org.openedx.frontend.layout.footer.v1`
### Slot ID Aliases
* `footer_slot`
## Description
This slot is used to replace/modify/hide the footer.
The implementation of the `FooterSlot` component lives in [the `frontend-component-footer` repository](https://github.com/openedx/frontend-component-footer/).
## Example
The following `env.config.jsx` will replace the default footer.
![Screenshot of Default Footer](./images/default_footer.png)
with a simple custom footer
![Screenshot of Custom Footer](./images/custom_footer.png)
```jsx
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';
const config = {
pluginSlots: {
'org.openedx.frontend.layout.footer.v1': {
plugins: [
{
// Hide the default footer
op: PLUGIN_OPERATIONS.Hide,
widgetId: 'default_contents',
},
{
// Insert a custom footer
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_footer',
type: DIRECT_PLUGIN,
RenderWidget: () => (
<h1 style={{textAlign: 'center'}}>🦶</h1>
),
},
},
]
}
},
}
export default config;
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,3 @@
# `frontend-app-profile` Plugin Slots
* [`org.openedx.frontend.layout.footer.v1`](./FooterSlot/)

View File

@@ -1,43 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StatusAlert } from '@edx/paragon';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
function AgeMessage({ accountSettingsUrl }) {
return (
<StatusAlert
alertType="info"
dialog={(
<>
<FormattedMessage
id="profile.age.headline"
defaultMessage="Your profile cannot be shared."
description="error message"
tagName="h6"
/>
<FormattedMessage
id="profile.age.details"
defaultMessage="To share your profile with other edX learners, you must confirm that you are over the age of 13."
description="error message"
tagName="p"
/>
<a href={accountSettingsUrl}>
<FormattedMessage
id="profile.age.set.date"
defaultMessage="Set your date of birth"
description="label on a link to set birthday"
/>
</a>
</>
)}
dismissible={false}
open
/>
);
}
AgeMessage.propTypes = {
accountSettingsUrl: PropTypes.string.isRequired,
};
export default AgeMessage;

View File

@@ -1,7 +0,0 @@
import React from 'react';
function Banner() {
return <div className="profile-page-bg-banner bg-primary d-none d-md-block p-relative" />;
}
export default Banner;

View File

@@ -0,0 +1,146 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedDate, FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import { Hyperlink } from '@openedx/paragon';
import get from 'lodash.get';
import classNames from 'classnames';
import professionalCertificateSVG from './assets/professional-certificate.svg';
import verifiedCertificateSVG from './assets/verified-certificate.svg';
import messages from './Certificates.messages';
import { useIsOnMobileScreen } from './data/hooks';
const CertificateCard = ({
certificateType,
courseDisplayName,
courseOrganization,
modifiedDate,
downloadUrl,
courseId,
uuid,
}) => {
const intl = useIntl();
const certificateIllustration = {
professional: professionalCertificateSVG,
'no-id-professional': professionalCertificateSVG,
verified: verifiedCertificateSVG,
honor: null,
audit: null,
}[certificateType] || null;
const isMobileView = useIsOnMobileScreen();
return (
<div
key={`${modifiedDate}-${courseId}`}
className="col-auto d-flex align-items-center p-0"
>
<div className="col certificate p-4 border-light-400 bg-light-200 w-100 h-100">
<div
className="certificate-type-illustration"
style={{ backgroundImage: `url(${certificateIllustration})` }}
/>
<div className={classNames(
'd-flex flex-column position-relative p-0',
{ 'max-width-304px': isMobileView },
{ 'width-314px': !isMobileView },
)}
>
<div className="w-100 color-black">
<p className={classNames([
'mb-0 font-weight-normal',
isMobileView ? 'x-small' : 'small',
])}
>
{intl.formatMessage(get(
messages,
`profile.certificates.types.${certificateType}`,
messages['profile.certificates.types.unknown'],
))}
</p>
<p className={classNames([
'm-0 color-black',
isMobileView ? 'h5' : 'h4',
])}
>
{courseDisplayName}
</p>
<p className={classNames([
'mb-0',
isMobileView ? 'x-small' : 'small',
])}
>
<FormattedMessage
id="profile.certificate.organization.label"
defaultMessage="From"
/>
</p>
<h5 className="mb-0 color-black">{courseOrganization}</h5>
<p className={classNames([
'mb-0',
isMobileView ? 'x-small' : 'small',
])}
>
<FormattedMessage
id="profile.certificate.completion.date.label"
defaultMessage="Completed on {date}"
values={{
date: <FormattedDate value={new Date(modifiedDate)} />,
}}
/>
</p>
</div>
<div className="pt-3">
<Hyperlink
destination={downloadUrl}
target="_blank"
showLaunchIcon={false}
className={classNames(
'btn btn-primary font-weight-normal px-4 py-10px',
{ 'btn-sm': isMobileView },
)}
>
{intl.formatMessage(messages['profile.certificates.view.certificate'])}
</Hyperlink>
</div>
<p
className={classNames([
'mb-0 pt-3',
isMobileView ? 'x-small' : 'small',
])}
>
<FormattedMessage
id="profile.certificate.uuid"
defaultMessage="Credential ID {certificate_uuid}"
values={{
certificate_uuid: uuid,
}}
/>
</p>
</div>
</div>
</div>
);
};
CertificateCard.propTypes = {
certificateType: PropTypes.string,
courseDisplayName: PropTypes.string,
courseOrganization: PropTypes.string,
modifiedDate: PropTypes.string,
downloadUrl: PropTypes.string,
courseId: PropTypes.string.isRequired,
uuid: PropTypes.string,
};
CertificateCard.defaultProps = {
certificateType: 'unknown',
courseDisplayName: '',
courseOrganization: '',
modifiedDate: '',
downloadUrl: '',
uuid: '',
};
export default CertificateCard;

View File

@@ -0,0 +1,92 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { connect } from 'react-redux';
import { getConfig } from '@edx/frontend-platform';
import classNames from 'classnames';
import CertificateCard from './CertificateCard';
import { certificatesSelector } from './data/selectors';
import { useIsOnTabletScreen } from './data/hooks';
const Certificates = ({ certificates }) => {
const isTabletView = useIsOnTabletScreen();
return (
<div>
<div className="col justify-content-start align-items-start g-5rem p-0">
<div className="col align-self-stretch height-42px justify-content-start align-items-start p-0">
<p className="font-weight-bold text-primary-500 m-0 h2">
<FormattedMessage
id="profile.your.certificates"
defaultMessage="Your certificates"
description="heading for the certificates section"
/>
</p>
</div>
<div className="col justify-content-start align-items-start pt-2 p-0">
<p className="font-weight-normal text-gray-800 m-0 p-0 p">
<FormattedMessage
id="profile.certificates.description"
defaultMessage="Your learner records information is only visible to you. Only your username and profile image are visible to others on {siteName}."
description="description of the certificates section"
values={{
siteName: getConfig().SITE_NAME,
}}
/>
</p>
</div>
</div>
{certificates?.length > 0 ? (
<div className="col">
<div className={classNames(
'row align-items-center pt-5 g-3rem',
{ 'justify-content-center': isTabletView },
)}
>
{certificates.map(certificate => (
<CertificateCard
key={certificate.courseId}
certificateType={certificate.certificateType}
courseDisplayName={certificate.courseDisplayName}
courseOrganization={certificate.courseOrganization}
modifiedDate={certificate.modifiedDate}
downloadUrl={certificate.downloadUrl}
courseId={certificate.courseId}
uuid={certificate.uuid}
/>
))}
</div>
</div>
) : (
<div className="pt-5">
<FormattedMessage
id="profile.no.certificates"
defaultMessage="You don't have any certificates yet."
description="displays when user has no course completion certificates"
/>
</div>
)}
</div>
);
};
Certificates.propTypes = {
certificates: PropTypes.arrayOf(PropTypes.shape({
certificateType: PropTypes.string,
courseDisplayName: PropTypes.string,
courseOrganization: PropTypes.string,
modifiedDate: PropTypes.string,
downloadUrl: PropTypes.string,
courseId: PropTypes.string.isRequired,
uuid: PropTypes.string,
})),
};
Certificates.defaultProps = {
certificates: [],
};
export default connect(
certificatesSelector,
{},
)(Certificates);

View File

@@ -1,25 +1,23 @@
import React from 'react';
import React, { memo } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, FormattedDate } from '@edx/frontend-platform/i18n';
function DateJoined({ date }) {
if (date == null) {
return null;
}
const DateJoined = ({ date }) => {
if (!date) { return null; }
return (
<p className="mb-0">
<span className="small mb-0 text-gray-800">
<FormattedMessage
id="profile.datejoined.member.since"
defaultMessage="Member since {year}"
description="A label for how long the user has been a member"
values={{
year: <FormattedDate value={new Date(date)} year="numeric" />,
year: <span className="font-weight-bold"> <FormattedDate value={new Date(date)} year="numeric" /> </span>,
}}
/>
</p>
</span>
);
}
};
DateJoined.propTypes = {
date: PropTypes.string,
@@ -28,4 +26,4 @@ DateJoined.defaultProps = {
date: null,
};
export default DateJoined;
export default memo(DateJoined);

View File

@@ -1,16 +1,16 @@
import React from 'react';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
export default function NotFoundPage() {
return (
<div className="container-fluid d-flex py-5 justify-content-center align-items-start text-center">
<p className="my-0 py-5 text-muted" style={{ maxWidth: '32em' }}>
<FormattedMessage
id="profile.notfound.message"
defaultMessage="The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again."
description="error message when a page does not exist"
/>
</p>
</div>
);
}
const NotFoundPage = () => (
<div className="container-fluid d-flex py-5 justify-content-center align-items-start text-center">
<p className="my-0 py-5 text-muted max-width-32em">
<FormattedMessage
id="profile.notfound.message"
defaultMessage="The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again."
description="error message when a page does not exist"
/>
</p>
</div>
);
export default NotFoundPage;

View File

@@ -1,37 +1,18 @@
import React, { Component } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
export default class PageLoading extends Component {
renderSrMessage() {
if (!this.props.srMessage) {
return null;
}
return (
<span className="sr-only">
{this.props.srMessage}
</span>
);
}
render() {
return (
<div>
<div
className="d-flex justify-content-center align-items-center flex-column"
style={{
height: '50vh',
}}
>
<div className="spinner-border text-primary" role="status">
{this.renderSrMessage()}
</div>
</div>
const PageLoading = ({ srMessage }) => (
<div>
<div className="d-flex justify-content-center align-items-center flex-column height-50vh">
<div className="spinner-border text-primary" role="status">
{srMessage && <span className="sr-only">{srMessage}</span>}
</div>
);
}
}
</div>
</div>
);
PageLoading.propTypes = {
srMessage: PropTypes.string.isRequired,
};
export default PageLoading;

View File

@@ -1,14 +1,20 @@
import React from 'react';
import React, {
useEffect, useState, useContext, useCallback,
} from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import { sendTrackingLogEvent } from '@edx/frontend-platform/analytics';
import { ensureConfig, getConfig } from '@edx/frontend-platform';
import { ensureConfig } from '@edx/frontend-platform';
import { AppContext } from '@edx/frontend-platform/react';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { StatusAlert, Hyperlink } from '@edx/paragon';
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import {
Alert, Hyperlink, OverlayTrigger, Tooltip,
} from '@openedx/paragon';
import { InfoOutline } from '@openedx/paragon/icons';
import classNames from 'classnames';
// Actions
import {
fetchProfile,
saveProfile,
@@ -19,7 +25,6 @@ import {
updateDraft,
} from './data/actions';
// Components
import ProfileAvatar from './forms/ProfileAvatar';
import Name from './forms/Name';
import Country from './forms/Country';
@@ -27,304 +32,395 @@ import PreferredLanguage from './forms/PreferredLanguage';
import Education from './forms/Education';
import SocialLinks from './forms/SocialLinks';
import Bio from './forms/Bio';
import Certificates from './forms/Certificates';
import AgeMessage from './AgeMessage';
import DateJoined from './DateJoined';
import UserCertificateSummary from './UserCertificateSummary';
import PageLoading from './PageLoading';
import Banner from './Banner';
import Certificates from './Certificates';
// Selectors
import { profilePageSelector } from './data/selectors';
// i18n
import messages from './ProfilePage.messages';
import withParams from '../utils/hoc';
import { useIsOnMobileScreen, useIsOnTabletScreen } from './data/hooks';
ensureConfig(['CREDENTIALS_BASE_URL', 'LMS_BASE_URL'], 'ProfilePage');
import AdditionalProfileFieldsSlot from '../plugin-slots/AdditionalProfileFieldsSlot';
class ProfilePage extends React.Component {
constructor(props, context) {
super(props, context);
ensureConfig(['CREDENTIALS_BASE_URL', 'LMS_BASE_URL', 'ACCOUNT_SETTINGS_URL'], 'ProfilePage');
const recordsUrl = this.getRecordsUrl(context);
const ProfilePage = ({ params }) => {
const dispatch = useDispatch();
const intl = useIntl();
const context = useContext(AppContext);
const {
dateJoined,
courseCertificates,
name,
visibilityName,
profileImage,
savePhotoState,
isLoadingProfile,
photoUploadError,
country,
visibilityCountry,
levelOfEducation,
visibilityLevelOfEducation,
socialLinks,
draftSocialLinksByPlatform,
visibilitySocialLinks,
languageProficiencies,
visibilityLanguageProficiencies,
bio,
visibilityBio,
saveState,
username,
} = useSelector(profilePageSelector);
this.state = {
viewMyRecordsUrl: recordsUrl,
accountSettingsUrl: `${context.config.LMS_BASE_URL}/account/settings`,
};
const navigate = useNavigate();
const [viewMyRecordsUrl, setViewMyRecordsUrl] = useState(null);
const isMobileView = useIsOnMobileScreen();
const isTabletView = useIsOnTabletScreen();
this.handleSaveProfilePhoto = this.handleSaveProfilePhoto.bind(this);
this.handleDeleteProfilePhoto = this.handleDeleteProfilePhoto.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleChange = this.handleChange.bind(this);
}
componentDidMount() {
this.props.fetchProfile(this.props.match.params.username);
sendTrackingLogEvent('edx.profile.viewed', {
username: this.props.match.params.username,
});
}
getRecordsUrl(context) {
let recordsUrl = null;
if (getConfig().ENABLE_LEARNER_RECORD_MFE) {
recordsUrl = getConfig().LEARNER_RECORD_MFE_BASE_URL;
} else {
const credentialsBaseUrl = context.config.CREDENTIALS_BASE_URL;
recordsUrl = credentialsBaseUrl ? `${credentialsBaseUrl}/records` : null;
useEffect(() => {
const { CREDENTIALS_BASE_URL } = context.config;
if (CREDENTIALS_BASE_URL) {
setViewMyRecordsUrl(`${CREDENTIALS_BASE_URL}/records`);
}
return recordsUrl;
}
dispatch(fetchProfile(params.username));
sendTrackingLogEvent('edx.profile.viewed', {
username: params.username,
});
}, [dispatch, params.username, context.config]);
isAuthenticatedUserProfile() {
return this.props.match.params.username === this.context.authenticatedUser.username;
}
useEffect(() => {
if (!username && saveState === 'error' && navigate) {
navigate('/notfound');
}
}, [username, saveState, navigate]);
handleSaveProfilePhoto(formData) {
this.props.saveProfilePhoto(this.context.authenticatedUser.username, formData);
}
const authenticatedUserName = context.authenticatedUser.username;
handleDeleteProfilePhoto() {
this.props.deleteProfilePhoto(this.context.authenticatedUser.username);
}
const handleSaveProfilePhoto = useCallback((formData) => {
dispatch(saveProfilePhoto(authenticatedUserName, formData));
}, [dispatch, authenticatedUserName]);
handleClose(formId) {
this.props.closeForm(formId);
}
const handleDeleteProfilePhoto = useCallback(() => {
dispatch(deleteProfilePhoto(authenticatedUserName));
}, [dispatch, authenticatedUserName]);
handleOpen(formId) {
this.props.openForm(formId);
}
const handleClose = useCallback((formId) => {
dispatch(closeForm(formId));
}, [dispatch]);
handleSubmit(formId) {
this.props.saveProfile(formId, this.context.authenticatedUser.username);
}
const handleOpen = useCallback((formId) => {
dispatch(openForm(formId));
}, [dispatch]);
handleChange(name, value) {
this.props.updateDraft(name, value);
}
const handleSubmit = useCallback((formId) => {
dispatch(saveProfile(formId, authenticatedUserName));
}, [dispatch, authenticatedUserName]);
// Inserted into the DOM in two places (for responsive layout)
renderViewMyRecordsButton() {
if (!(this.state.viewMyRecordsUrl && this.isAuthenticatedUserProfile())) {
const handleChange = useCallback((fieldName, value) => {
dispatch(updateDraft(fieldName, value));
}, [dispatch]);
const isAuthenticatedUserProfile = () => params.username === authenticatedUserName;
const isBlockVisible = (blockInfo) => isAuthenticatedUserProfile()
|| (!isAuthenticatedUserProfile() && Boolean(blockInfo));
const renderViewMyRecordsButton = () => {
if (!(viewMyRecordsUrl && isAuthenticatedUserProfile())) {
return null;
}
return (
<Hyperlink className="btn btn-primary" destination={this.state.viewMyRecordsUrl} target="_blank">
{this.props.intl.formatMessage(messages['profile.viewMyRecords'])}
<Hyperlink
className={classNames(
'btn btn-brand bg-brand-500 font-weight-normal px-4 py-10px text-nowrap',
{ 'w-100': isMobileView },
)}
target="_blank"
showLaunchIcon={false}
destination={viewMyRecordsUrl}
>
{intl.formatMessage(messages['profile.viewMyRecords'])}
</Hyperlink>
);
}
};
// Inserted into the DOM in two places (for responsive layout)
renderHeadingLockup() {
const { dateJoined } = this.props;
return (
<>
<span data-hj-suppress>
<h1 className="h2 mb-0 font-weight-bold">{this.props.match.params.username}</h1>
<DateJoined date={dateJoined} />
<hr className="d-none d-md-block" />
</span>
</>
);
}
renderPhotoUploadErrorMessage() {
const { photoUploadError } = this.props;
if (photoUploadError === null) {
return null;
}
return (
const renderPhotoUploadErrorMessage = () => (
photoUploadError && (
<div className="row">
<div className="col-md-4 col-lg-3">
<StatusAlert alertType="danger" dialog={photoUploadError.userMessage} dismissible={false} open />
<Alert variant="danger" dismissible={false} show>
{photoUploadError.userMessage}
</Alert>
</div>
</div>
);
}
)
);
renderAgeMessage() {
const { requiresParentalConsent } = this.props;
const shouldShowAgeMessage = requiresParentalConsent && this.isAuthenticatedUserProfile();
const commonFormProps = {
openHandler: handleOpen,
closeHandler: handleClose,
submitHandler: handleSubmit,
changeHandler: handleChange,
};
if (!shouldShowAgeMessage) {
return null;
}
return <AgeMessage accountSettingsUrl={this.state.accountSettingsUrl} />;
}
renderContent() {
const {
profileImage,
name,
visibilityName,
country,
visibilityCountry,
levelOfEducation,
visibilityLevelOfEducation,
socialLinks,
draftSocialLinksByPlatform,
visibilitySocialLinks,
languageProficiencies,
visibilityLanguageProficiencies,
visibilityCourseCertificates,
bio,
visibilityBio,
requiresParentalConsent,
isLoadingProfile,
} = this.props;
if (isLoadingProfile) {
return <PageLoading srMessage={this.props.intl.formatMessage(messages['profile.loading'])} />;
}
const commonFormProps = {
openHandler: this.handleOpen,
closeHandler: this.handleClose,
submitHandler: this.handleSubmit,
changeHandler: this.handleChange,
};
return (
<div className="container-fluid">
<div className="row align-items-center pt-4 mb-4 pt-md-0 mb-md-0">
<div className="col-auto col-md-4 col-lg-3">
<div className="d-flex align-items-center d-md-block">
<ProfileAvatar
className="mb-md-3"
src={profileImage.src}
isDefault={profileImage.isDefault}
onSave={this.handleSaveProfilePhoto}
onDelete={this.handleDeleteProfilePhoto}
savePhotoState={this.props.savePhotoState}
isEditable={this.isAuthenticatedUserProfile() && !requiresParentalConsent}
/>
return (
<div className="profile-page">
{isLoadingProfile ? (
<PageLoading srMessage={intl.formatMessage(messages['profile.loading'])} />
) : (
<>
<div
className={classNames(
'profile-page-bg-banner bg-primary d-md-block align-items-center h-100 w-100',
{ 'px-3 py-4': isMobileView },
{ 'px-120px py-5.5': !isMobileView },
)}
>
<div
className={classNames([
'col container-fluid w-100 h-100 bg-white py-0 rounded-75',
{
'px-3': isMobileView,
'px-40px': !isMobileView,
},
])}
>
<div
className={classNames([
'col h-100 w-100 px-0 justify-content-start g-15rem',
{
'py-4': isMobileView,
'py-36px': !isMobileView,
},
])}
>
<div
className={classNames([
'row-auto d-flex flex-wrap align-items-center h-100 w-100 justify-content-start g-15rem',
isMobileView || isTabletView ? 'flex-column' : 'flex-row',
])}
>
<ProfileAvatar
className="col p-0"
src={profileImage.src}
isDefault={profileImage.isDefault}
onSave={handleSaveProfilePhoto}
onDelete={handleDeleteProfilePhoto}
savePhotoState={savePhotoState}
isEditable={isAuthenticatedUserProfile()}
/>
<div
className={classNames([
'col h-100 w-100 m-0 p-0',
isMobileView || isTabletView
? 'd-flex flex-column justify-content-center align-items-center'
: 'justify-content-start align-items-start',
])}
>
<p className="row m-0 font-weight-bold text-truncate text-primary-500 h3">
{params.username}
</p>
{isBlockVisible(name) && (
<p className="row pt-2 text-gray-800 font-weight-normal m-0 p">
{name}
</p>
)}
<div className={classNames(
'row pt-2 m-0',
isMobileView
? 'd-flex justify-content-center align-items-center flex-column'
: 'g-1rem',
)}
>
<DateJoined date={dateJoined} />
<UserCertificateSummary count={courseCertificates?.length || 0} />
</div>
</div>
<div className={classNames([
'p-0 ',
isMobileView || isTabletView ? 'col d-flex justify-content-center' : 'col-auto',
])}
>
{renderViewMyRecordsButton()}
</div>
</div>
</div>
<div className="ml-auto">
{renderPhotoUploadErrorMessage()}
</div>
</div>
</div>
<div className="col pl-0">
<div className="d-md-none">
{this.renderHeadingLockup()}
</div>
<div className="d-none d-md-block float-right">
{this.renderViewMyRecordsButton()}
<div
className={classNames([
'col d-inline-flex h-100 w-100 align-items-start justify-content-start g-3rem',
isMobileView ? 'py-4 px-3' : 'px-120px py-6',
])}
>
<div className="w-100 p-0">
<div className="col justify-content-start align-items-start p-0">
<div className="col align-self-stretch height-42px justify-content-start align-items-start p-0">
<p className="font-weight-bold text-primary-500 m-0 h2">
{isMobileView ? (
<FormattedMessage
id="profile.profile.information"
defaultMessage="Profile"
description="heading for the editable profile section in mobile view"
/>
)
: (
<FormattedMessage
id="profile.profile.information"
defaultMessage="Profile information"
description="heading for the editable profile section"
/>
)}
</p>
</div>
</div>
<div
className={classNames([
'row m-0 px-0 w-100 d-inline-flex align-items-start justify-content-start',
isMobileView ? 'pt-4' : 'pt-5.5',
])}
>
<div
className={classNames([
'col p-0',
isMobileView ? 'col-12' : 'col-6',
])}
>
<div className="m-0">
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
{intl.formatMessage(messages['profile.username'])}
</p>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.username.tooltip'])}
</p>
</Tooltip>
)}
>
<InfoOutline className="m-0 info-icon" />
</OverlayTrigger>
</div>
<h4 className="edit-section-header text-gray-700">
{params.username}
</h4>
</div>
{isBlockVisible(name) && (
<Name
name={name}
accountSettingsUrl={context.config.ACCOUNT_SETTINGS_URL}
visibilityName={visibilityName}
formId="name"
{...commonFormProps}
/>
)}
{isBlockVisible(country) && (
<Country
country={country}
visibilityCountry={visibilityCountry}
formId="country"
{...commonFormProps}
/>
)}
{isBlockVisible((languageProficiencies || []).length) && (
<PreferredLanguage
languageProficiencies={languageProficiencies || []}
visibilityLanguageProficiencies={visibilityLanguageProficiencies}
formId="languageProficiencies"
{...commonFormProps}
/>
)}
{isBlockVisible(levelOfEducation) && (
<Education
levelOfEducation={levelOfEducation}
visibilityLevelOfEducation={visibilityLevelOfEducation}
formId="levelOfEducation"
{...commonFormProps}
/>
)}
<AdditionalProfileFieldsSlot />
</div>
<div
className={classNames([
'col m-0 pr-0',
isMobileView ? 'pl-0 col-12' : 'pl-40px col-6',
])}
>
{isBlockVisible(bio) && (
<Bio
bio={bio}
visibilityBio={visibilityBio}
formId="bio"
{...commonFormProps}
/>
)}
{isBlockVisible((socialLinks || []).some((link) => link?.socialLink !== null)) && (
<SocialLinks
socialLinks={socialLinks || []}
draftSocialLinksByPlatform={draftSocialLinksByPlatform || {}}
visibilitySocialLinks={visibilitySocialLinks}
formId="socialLinks"
{...commonFormProps}
/>
)}
</div>
</div>
</div>
</div>
</div>
{this.renderPhotoUploadErrorMessage()}
<div className="row">
<div className="col-md-4 col-lg-4">
<div className="d-none d-md-block mb-4">
{this.renderHeadingLockup()}
</div>
<div className="d-md-none mb-4">
{this.renderViewMyRecordsButton()}
</div>
<Name
name={name}
visibilityName={visibilityName}
formId="name"
{...commonFormProps}
/>
<Country
country={country}
visibilityCountry={visibilityCountry}
formId="country"
{...commonFormProps}
/>
<PreferredLanguage
languageProficiencies={languageProficiencies}
visibilityLanguageProficiencies={visibilityLanguageProficiencies}
formId="languageProficiencies"
{...commonFormProps}
/>
<Education
levelOfEducation={levelOfEducation}
visibilityLevelOfEducation={visibilityLevelOfEducation}
formId="levelOfEducation"
{...commonFormProps}
/>
<SocialLinks
socialLinks={socialLinks}
draftSocialLinksByPlatform={draftSocialLinksByPlatform}
visibilitySocialLinks={visibilitySocialLinks}
formId="socialLinks"
{...commonFormProps}
/>
</div>
<div className="pt-md-3 col-md-8 col-lg-7 offset-lg-1">
{this.renderAgeMessage()}
<Bio
bio={bio}
visibilityBio={visibilityBio}
formId="bio"
{...commonFormProps}
/>
<div
className={classNames([
'col container-fluid d-inline-flex bg-color-grey-FBFAF9 h-100 w-100 align-items-start justify-content-start g-3rem',
isMobileView ? 'py-4 px-3' : 'px-120px py-6',
])}
>
{isBlockVisible((courseCertificates || []).length) && (
<Certificates
visibilityCourseCertificates={visibilityCourseCertificates}
certificates={courseCertificates || []}
formId="certificates"
{...commonFormProps}
/>
)}
</div>
</div>
</div>
);
}
render() {
return (
<div className="profile-page">
<Banner />
{this.renderContent()}
</div>
);
}
}
ProfilePage.contextType = AppContext;
</>
)}
</div>
);
};
ProfilePage.propTypes = {
// Account data
params: PropTypes.shape({
username: PropTypes.string.isRequired,
}).isRequired,
requiresParentalConsent: PropTypes.bool,
dateJoined: PropTypes.string,
// Bio form data
username: PropTypes.string,
bio: PropTypes.string,
visibilityBio: PropTypes.string.isRequired,
// Certificates form data
visibilityBio: PropTypes.string,
courseCertificates: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.string,
})),
visibilityCourseCertificates: PropTypes.string.isRequired,
// Country form data
country: PropTypes.string,
visibilityCountry: PropTypes.string.isRequired,
// Education form data
visibilityCountry: PropTypes.string,
levelOfEducation: PropTypes.string,
visibilityLevelOfEducation: PropTypes.string.isRequired,
// Language proficiency form data
visibilityLevelOfEducation: PropTypes.string,
languageProficiencies: PropTypes.arrayOf(PropTypes.shape({
code: PropTypes.string.isRequired,
})),
visibilityLanguageProficiencies: PropTypes.string.isRequired,
// Name form data
visibilityLanguageProficiencies: PropTypes.string,
name: PropTypes.string,
visibilityName: PropTypes.string.isRequired,
// Social links form data
visibilityName: PropTypes.string,
socialLinks: PropTypes.arrayOf(PropTypes.shape({
platform: PropTypes.string,
socialLink: PropTypes.string,
@@ -333,42 +429,20 @@ ProfilePage.propTypes = {
platform: PropTypes.string,
socialLink: PropTypes.string,
})),
visibilitySocialLinks: PropTypes.string.isRequired,
// Other data we need
visibilitySocialLinks: PropTypes.string,
profileImage: PropTypes.shape({
src: PropTypes.string,
isDefault: PropTypes.bool,
}),
saveState: PropTypes.oneOf([null, 'pending', 'complete', 'error']),
savePhotoState: PropTypes.oneOf([null, 'pending', 'complete', 'error']),
isLoadingProfile: PropTypes.bool.isRequired,
// Page state helpers
isLoadingProfile: PropTypes.bool,
photoUploadError: PropTypes.objectOf(PropTypes.string),
// Actions
fetchProfile: PropTypes.func.isRequired,
saveProfile: PropTypes.func.isRequired,
saveProfilePhoto: PropTypes.func.isRequired,
deleteProfilePhoto: PropTypes.func.isRequired,
openForm: PropTypes.func.isRequired,
closeForm: PropTypes.func.isRequired,
updateDraft: PropTypes.func.isRequired,
// Router
match: PropTypes.shape({
params: PropTypes.shape({
username: PropTypes.string.isRequired,
}).isRequired,
}).isRequired,
// i18n
intl: intlShape.isRequired,
};
ProfilePage.defaultProps = {
saveState: null,
username: '',
savePhotoState: null,
photoUploadError: {},
profileImage: {},
@@ -379,20 +453,16 @@ ProfilePage.defaultProps = {
draftSocialLinksByPlatform: {},
bio: null,
languageProficiencies: [],
courseCertificates: null,
courseCertificates: [],
requiresParentalConsent: null,
dateJoined: null,
visibilityName: null,
visibilityCountry: null,
visibilityLevelOfEducation: null,
visibilitySocialLinks: null,
visibilityLanguageProficiencies: null,
visibilityBio: null,
isLoadingProfile: false,
};
export default connect(
profilePageSelector,
{
fetchProfile,
saveProfilePhoto,
deleteProfilePhoto,
saveProfile,
openForm,
closeForm,
updateDraft,
},
)(injectIntl(ProfilePage));
export default withParams(ProfilePage);

View File

@@ -11,6 +11,16 @@ const messages = defineMessages({
defaultMessage: 'Profile loading...',
description: 'Message displayed when the profile data is loading.',
},
'profile.username': {
id: 'profile.username',
defaultMessage: 'Username',
description: 'Label for the username field.',
},
'profile.username.tooltip': {
id: 'profile.username.tooltip',
defaultMessage: 'The name that identifies you on edX. You cannot change your username.',
description: 'Tooltip for the username field.',
},
});
export default messages;

View File

@@ -1,37 +1,45 @@
/* eslint-disable global-require */
import { getConfig } from '@edx/frontend-platform';
import * as analytics from '@edx/frontend-platform/analytics';
import { AppContext } from '@edx/frontend-platform/react';
import { configure as configureI18n, IntlProvider } from '@edx/frontend-platform/i18n';
import { mount } from 'enzyme';
import { render } from '@testing-library/react';
import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import renderer from 'react-test-renderer';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import {
MemoryRouter,
Routes,
Route,
useNavigate,
} from 'react-router-dom';
import messages from '../i18n';
import ProfilePage from './ProfilePage';
import loadingApp from './__mocks__/loadingApp.mockStore';
import viewOwnProfile from './__mocks__/viewOwnProfile.mockStore';
import viewOtherProfile from './__mocks__/viewOtherProfile.mockStore';
import invalidUser from './__mocks__/invalidUser.mockStore';
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: jest.fn(),
}));
const mockStore = configureMockStore([thunk]);
const storeMocks = {
loadingApp: require('./__mocks__/loadingApp.mockStore.js'),
viewOwnProfile: require('./__mocks__/viewOwnProfile.mockStore.js'),
viewOtherProfile: require('./__mocks__/viewOtherProfile.mockStore.js'),
savingEditedBio: require('./__mocks__/savingEditedBio.mockStore.js'),
};
const requiredProfilePageProps = {
fetchUserAccount: () => {},
fetchProfile: () => {},
saveProfile: () => {},
saveProfilePhoto: () => {},
deleteProfilePhoto: () => {},
openField: () => {},
closeField: () => {},
match: { params: { username: 'staff' } },
loadingApp,
viewOwnProfile,
viewOtherProfile,
invalidUser,
};
const requiredProfilePageProps = {
params: { username: 'staff' },
};
// Mock language cookie
Object.defineProperty(global.document, 'cookie', {
writable: true,
value: `${getConfig().LANGUAGE_PREFERENCE_COOKIE_NAME}=en`,
@@ -63,86 +71,110 @@ configureI18n({
beforeEach(() => {
analytics.sendTrackingLogEvent.mockReset();
useNavigate.mockReset();
});
const ProfilePageWrapper = ({
contextValue, store, params,
}) => (
<AppContext.Provider value={contextValue}>
<IntlProvider locale="en">
<Provider store={store}>
<MemoryRouter initialEntries={[`/profile/${params.username}`]}>
<Routes>
<Route
path="/profile/:username"
element={<ProfilePage {...requiredProfilePageProps} params={params} />}
/>
</Routes>
</MemoryRouter>
</Provider>
</IntlProvider>
</AppContext.Provider>
);
ProfilePageWrapper.defaultProps = {
// eslint-disable-next-line react/default-props-match-prop-types
params: { username: 'staff' },
};
ProfilePageWrapper.propTypes = {
contextValue: PropTypes.shape({}).isRequired,
store: PropTypes.shape({}).isRequired,
params: PropTypes.shape({
username: PropTypes.string.isRequired,
}).isRequired,
};
describe('<ProfilePage />', () => {
describe('Renders correctly in various states', () => {
it('app loading', () => {
const contextValue = {
authenticatedUser: { userId: null, username: null, administrator: false },
config: getConfig(),
};
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: null, username: null, administrator: false },
config: getConfig(),
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.loadingApp)}>
<ProfilePage {...requiredProfilePageProps} />
</Provider>
</IntlProvider>
</AppContext.Provider>
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.loadingApp)}
/>
);
const tree = renderer.create(component).toJSON();
const { container: tree } = render(component);
expect(tree).toMatchSnapshot();
});
it('viewing own profile', () => {
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.viewOwnProfile)}>
<ProfilePage {...requiredProfilePageProps} />
</Provider>
</IntlProvider>
</AppContext.Provider>
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.viewOwnProfile)}
/>
);
const tree = renderer.create(component).toJSON();
const { container: tree } = render(component);
expect(tree).toMatchSnapshot();
});
it('viewing other profile', () => {
it('viewing other profile with all fields', () => {
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.viewOtherProfile)}>
<ProfilePage
{...requiredProfilePageProps}
match={{ params: { username: 'verified' } }} // Override default match
/>
</Provider>
</IntlProvider>
</AppContext.Provider>
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore({
...storeMocks.viewOtherProfile,
profilePage: {
...storeMocks.viewOtherProfile.profilePage,
account: {
...storeMocks.viewOtherProfile.profilePage.account,
name: 'Verified User',
country: 'US',
bio: 'About me',
courseCertificates: [{ title: 'Course 1' }],
levelOfEducation: 'bachelors',
languageProficiencies: [{ code: 'en' }],
socialLinks: [{ platform: 'twitter', socialLink: 'https://twitter.com/user' }],
},
preferences: {
...storeMocks.viewOtherProfile.profilePage.preferences,
visibilityName: 'all_users',
visibilityCountry: 'all_users',
visibilityLevelOfEducation: 'all_users',
visibilityLanguageProficiencies: 'all_users',
visibilitySocialLinks: 'all_users',
visibilityBio: 'all_users',
},
},
})}
params={{ username: 'verified' }}
/>
);
const tree = renderer.create(component).toJSON();
expect(tree).toMatchSnapshot();
});
it('while saving an edited bio', () => {
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.savingEditedBio)}>
<ProfilePage {...requiredProfilePageProps} />
</Provider>
</IntlProvider>
</AppContext.Provider>
);
const tree = renderer.create(component).toJSON();
const { container: tree } = render(component);
expect(tree).toMatchSnapshot();
});
@@ -150,52 +182,78 @@ describe('<ProfilePage />', () => {
const config = getConfig();
config.CREDENTIALS_BASE_URL = '';
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config,
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.viewOwnProfile)}>
<ProfilePage {...requiredProfilePageProps} />
</Provider>
</IntlProvider>
</AppContext.Provider>
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.viewOwnProfile)}
/>
);
const tree = renderer.create(component).toJSON();
const { container: tree } = render(component);
expect(tree).toMatchSnapshot();
});
it('successfully redirected to not found page', () => {
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
const navigate = jest.fn();
useNavigate.mockReturnValue(navigate);
const component = (
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.invalidUser)}
params={{ username: 'staffTest' }}
/>
);
const { container: tree } = render(component);
expect(tree).toMatchSnapshot();
expect(navigate).toHaveBeenCalledWith('/notfound');
});
});
describe('handles analytics', () => {
it('calls sendTrackingLogEvent when mounting', () => {
const component = (
<AppContext.Provider
value={{
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
}}
>
<IntlProvider locale="en">
<Provider store={mockStore(storeMocks.loadingApp)}>
<ProfilePage
{...requiredProfilePageProps}
match={{ params: { username: 'test-username' } }}
/>
</Provider>
</IntlProvider>
</AppContext.Provider>
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
render(
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.loadingApp)}
params={{ username: 'test-username' }}
/>,
);
const wrapper = mount(component);
wrapper.update();
expect(analytics.sendTrackingLogEvent.mock.calls.length).toBe(1);
expect(analytics.sendTrackingLogEvent.mock.calls[0][0]).toEqual('edx.profile.viewed');
expect(analytics.sendTrackingLogEvent.mock.calls[0][1]).toEqual({
expect(analytics.sendTrackingLogEvent).toHaveBeenCalledTimes(1);
expect(analytics.sendTrackingLogEvent).toHaveBeenCalledWith('edx.profile.viewed', {
username: 'test-username',
});
});
});
describe('handles navigation', () => {
it('navigates to notfound on save error with no username', () => {
const contextValue = {
authenticatedUser: { userId: 123, username: 'staff', administrator: true },
config: getConfig(),
};
const navigate = jest.fn();
useNavigate.mockReturnValue(navigate);
render(
<ProfilePageWrapper
contextValue={contextValue}
store={mockStore(storeMocks.invalidUser)}
params={{ username: 'staffTest' }}
/>,
);
expect(navigate).toHaveBeenCalledWith('/notfound');
});
});
});

View File

@@ -0,0 +1,27 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
const UserCertificateSummary = ({ count = 0 }) => {
if (count) {
return (
<span className="small m-0 text-gray-800">
<FormattedMessage
id="profile.certificatecount"
defaultMessage="{certificate_count} certifications"
description="A label for many certificates a user has"
values={{
certificate_count: <span className="font-weight-bold">{count}</span>,
}}
/>
</span>
);
}
return null;
};
UserCertificateSummary.propTypes = {
count: PropTypes.number,
};
export default UserCertificateSummary;

View File

@@ -0,0 +1,42 @@
module.exports = {
userAccount: {
loading: false,
error: null,
username: 'staff',
email: null,
bio: null,
name: null,
country: null,
socialLinks: null,
profileImage: {
imageUrlMedium: null,
imageUrlLarge: null
},
levelOfEducation: null,
learningGoal: null
},
profilePage: {
errors: {},
saveState: 'error',
savePhotoState: null,
currentlyEditingField: null,
account: {
username: '',
socialLinks: []
},
preferences: {},
courseCertificates: [],
drafts: {},
isLoadingProfile: false,
isAuthenticatedUserProfile: true,
countriesCodesList: ['US', 'CA', 'GB', 'ME']
},
router: {
location: {
pathname: '/u/staffTest',
search: '',
hash: ''
},
action: 'POP'
}
};

View File

@@ -12,7 +12,8 @@ module.exports = {
imageUrlMedium: null,
imageUrlLarge: null
},
levelOfEducation: null
levelOfEducation: null,
learningGoal: null
},
profilePage: {
errors: {},
@@ -28,6 +29,7 @@ module.exports = {
drafts: {},
isLoadingProfile: true,
isAuthenticatedUserProfile: true,
countriesCodesList: ['US', 'CA', 'GB', 'ME']
},
router: {
location: {

View File

@@ -42,7 +42,8 @@ module.exports = {
secondaryEmail: null,
timeZone: null,
gender: null,
accountPrivacy: 'custom'
accountPrivacy: 'custom',
learningGoal: null,
},
profilePage: {
errors: {},
@@ -91,7 +92,8 @@ module.exports = {
timeZone: null,
levelOfEducation: 'el',
gender: null,
accountPrivacy: 'custom'
accountPrivacy: 'custom',
learningGoal: null,
},
preferences: {
visibilityUserLocation: 'all_users',
@@ -104,7 +106,8 @@ module.exports = {
visibilityName: 'private',
visibilityLanguageProficiencies: 'all_users',
visibilityCountry: 'all_users',
accountPrivacy: 'custom'
accountPrivacy: 'custom',
visibilityLearningGoal: 'private',
},
courseCertificates: [
{
@@ -122,7 +125,8 @@ module.exports = {
}
],
drafts: {},
isLoadingProfile: false
isLoadingProfile: false,
disabledCountries: [],
},
router: {
location: {

View File

@@ -42,7 +42,8 @@ module.exports = {
secondaryEmail: null,
timeZone: null,
gender: null,
accountPrivacy: 'custom'
accountPrivacy: 'custom',
learningGoal: 'advance_career',
},
profilePage: {
errors: {},
@@ -80,10 +81,18 @@ module.exports = {
gender: null,
accountPrivacy: 'private'
},
preferences: {},
preferences: {
visibilityName: 'all_users',
visibilityCountry: 'all_users',
visibilityLevelOfEducation: 'all_users',
visibilityLanguageProficiencies: 'all_users',
visibilitySocialLinks: 'all_users',
visibilityBio: 'all_users'
},
courseCertificates: [],
drafts: {},
isLoadingProfile: false
isLoadingProfile: false,
countriesCodesList: ['US', 'CA', 'GB', 'ME']
},
router: {
location: {

View File

@@ -42,7 +42,8 @@ module.exports = {
secondaryEmail: null,
timeZone: null,
gender: null,
accountPrivacy: 'custom'
accountPrivacy: 'custom',
learningGoal: 'advance_career'
},
profilePage: {
errors: {},
@@ -91,7 +92,8 @@ module.exports = {
timeZone: null,
levelOfEducation: 'el',
gender: null,
accountPrivacy: 'custom'
accountPrivacy: 'custom',
learningGoal: 'advance_career'
},
preferences: {
visibilityUserLocation: 'all_users',
@@ -104,7 +106,8 @@ module.exports = {
visibilityName: 'private',
visibilityLanguageProficiencies: 'all_users',
visibilityCountry: 'all_users',
accountPrivacy: 'custom'
accountPrivacy: 'custom',
visibilityLearningGoal: 'private',
},
courseCertificates: [
{
@@ -122,7 +125,8 @@ module.exports = {
}
],
drafts: {},
isLoadingProfile: false
isLoadingProfile: false,
countriesCodesList: ['US', 'CA', 'GB', 'ME']
},
router: {
location: {

View File

@@ -1,2380 +1,1359 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<ProfilePage /> Renders correctly in various states app loading 1`] = `
<div
className="profile-page"
>
<div>
<div
className="profile-page-bg-banner bg-primary d-none d-md-block p-relative"
/>
<div>
<div
className="d-flex justify-content-center align-items-center flex-column"
style={
Object {
"height": "50vh",
}
}
>
class="profile-page"
>
<div>
<div
className="spinner-border text-primary"
role="status"
class="d-flex justify-content-center align-items-center flex-column height-50vh"
>
<span
className="sr-only"
<div
class="spinner-border text-primary"
role="status"
>
Profile loading...
</span>
<span
class="sr-only"
>
Profile loading...
</span>
</div>
</div>
</div>
</div>
</div>
`;
exports[`<ProfilePage /> Renders correctly in various states viewing other profile 1`] = `
<div
className="profile-page"
>
exports[`<ProfilePage /> Renders correctly in various states successfully redirected to not found page 1`] = `
<div>
<div
className="profile-page-bg-banner bg-primary d-none d-md-block p-relative"
/>
<div
className="container-fluid"
class="profile-page"
>
<div
className="row align-items-center pt-4 mb-4 pt-md-0 mb-md-0"
class="profile-page-bg-banner bg-primary d-md-block align-items-center h-100 w-100 px-120px py-5.5"
>
<div
className="col-auto col-md-4 col-lg-3"
class="col container-fluid w-100 h-100 bg-white py-0 rounded-75 px-40px"
>
<div
className="d-flex align-items-center d-md-block"
class="col h-100 w-100 px-0 justify-content-start g-15rem py-36px"
>
<div
className="profile-avatar-wrap position-relative"
class="row-auto d-flex flex-wrap align-items-center h-100 w-100 justify-content-start g-15rem flex-row"
>
<div
className="profile-avatar rounded-circle bg-light"
class="profile-avatar-wrap position-relative"
>
<IconMock
aria-hidden={true}
className="text-muted"
focusable="false"
role="img"
viewBox="0 0 24 24"
<div
class="profile-avatar rounded-circle bg-light"
>
<div
aria-hidden="true"
class="text-muted"
data-testid="IconMock"
focusable="false"
role="img"
viewbox="0 0 24 24"
/>
</div>
<form
enctype="multipart/form-data"
>
<input
accept=".jpg, .jpeg, .png"
class="d-none form-control-file"
id="photo-file"
name="file"
type="file"
/>
</form>
</div>
<div
class="col h-100 w-100 m-0 p-0 justify-content-start align-items-start"
>
<p
class="row m-0 font-weight-bold text-truncate text-primary-500 h3"
>
staffTest
</p>
<div
class="row pt-2 m-0 g-1rem"
/>
</div>
<form
encType="multipart/form-data"
onSubmit={[Function]}
<div
class="p-0 col-auto"
/>
</div>
</div>
<div
class="ml-auto"
/>
</div>
</div>
<div
class="col d-inline-flex h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div
class="w-100 p-0"
>
<div
class="col justify-content-start align-items-start p-0"
>
<div
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<p
class="font-weight-bold text-primary-500 m-0 h2"
>
<input
accept=".jpg, .jpeg, .png"
className="d-none form-control-file"
id="photo-file"
name="file"
onChange={[Function]}
type="file"
/>
</form>
Profile information
</p>
</div>
</div>
<div
class="row m-0 px-0 w-100 d-inline-flex align-items-start justify-content-start pt-5.5"
>
<div
class="col p-0 col-6"
>
<div
class="m-0"
>
<div
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Username
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<h4
class="edit-section-header text-gray-700"
>
staffTest
</h4>
</div>
</div>
<div
class="col m-0 pr-0 pl-40px col-6"
/>
</div>
</div>
</div>
<div
class="col container-fluid d-inline-flex bg-color-grey-FBFAF9 h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
/>
</div>
</div>
`;
exports[`<ProfilePage /> Renders correctly in various states viewing other profile with all fields 1`] = `
<div>
<div
class="profile-page"
>
<div
class="profile-page-bg-banner bg-primary d-md-block align-items-center h-100 w-100 px-120px py-5.5"
>
<div
class="col container-fluid w-100 h-100 bg-white py-0 rounded-75 px-40px"
>
<div
class="col h-100 w-100 px-0 justify-content-start g-15rem py-36px"
>
<div
class="row-auto d-flex flex-wrap align-items-center h-100 w-100 justify-content-start g-15rem flex-row"
>
<div
class="profile-avatar-wrap position-relative"
>
<div
class="profile-avatar rounded-circle bg-light"
>
<div
aria-hidden="true"
class="text-muted"
data-testid="IconMock"
focusable="false"
role="img"
viewbox="0 0 24 24"
/>
</div>
<form
enctype="multipart/form-data"
>
<input
accept=".jpg, .jpeg, .png"
class="d-none form-control-file"
id="photo-file"
name="file"
type="file"
/>
</form>
</div>
<div
class="col h-100 w-100 m-0 p-0 justify-content-start align-items-start"
>
<p
class="row m-0 font-weight-bold text-truncate text-primary-500 h3"
>
verified
</p>
<p
class="row pt-2 text-gray-800 font-weight-normal m-0 p"
>
Verified User
</p>
<div
class="row pt-2 m-0 g-1rem"
>
<span
class="small mb-0 text-gray-800"
>
Member since
<span
class="font-weight-bold"
>
2017
</span>
</span>
</div>
</div>
<div
class="p-0 col-auto"
/>
</div>
</div>
<div
class="ml-auto"
/>
</div>
</div>
<div
class="col d-inline-flex h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div
class="w-100 p-0"
>
<div
class="col justify-content-start align-items-start p-0"
>
<div
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<p
class="font-weight-bold text-primary-500 m-0 h2"
>
Profile information
</p>
</div>
</div>
<div
class="row m-0 px-0 w-100 d-inline-flex align-items-start justify-content-start pt-5.5"
>
<div
class="col p-0 col-6"
>
<div
class="m-0"
>
<div
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Username
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<h4
class="edit-section-header text-gray-700"
>
verified
</h4>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<div
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Full name
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Verified User
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Country
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
United States of America
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Primary language spoken
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
English
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Education
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Other education
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
</div>
<div
class="col m-0 pr-0 pl-40px col-6"
>
<div
class="pgn-transition-replace-group position-relative pt-0"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Bio
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
About me
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative p-0"
>
<div
style="padding: .1px 0px;"
>
<div>
<div>
<div
class="pt-40px"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
X
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
https://twitter.com/user
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
/>
</div>
<div
class="row m-0 p-0"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
className="col pl-0"
>
<div
className="d-md-none"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
verified
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
/>
</div>
</div>
<div
className="row"
>
<div
className="col-md-4 col-lg-4"
>
<div
className="d-none d-md-block mb-4"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
verified
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
</div>
<div
className="pt-md-3 col-md-8 col-lg-7 offset-lg-1"
>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
/>
<div
className="pgn-transition-replace-group position-relative mb-4"
style={
Object {
"height": null,
}
}
/>
</div>
</div>
class="col container-fluid d-inline-flex bg-color-grey-FBFAF9 h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
/>
</div>
</div>
`;
exports[`<ProfilePage /> Renders correctly in various states viewing own profile 1`] = `
<div
className="profile-page"
>
<div>
<div
className="profile-page-bg-banner bg-primary d-none d-md-block p-relative"
/>
<div
className="container-fluid"
class="profile-page"
>
<div
className="row align-items-center pt-4 mb-4 pt-md-0 mb-md-0"
class="profile-page-bg-banner bg-primary d-md-block align-items-center h-100 w-100 px-120px py-5.5"
>
<div
className="col-auto col-md-4 col-lg-3"
class="col container-fluid w-100 h-100 bg-white py-0 rounded-75 px-40px"
>
<div
className="d-flex align-items-center d-md-block"
class="col h-100 w-100 px-0 justify-content-start g-15rem py-36px"
>
<div
className="profile-avatar-wrap position-relative"
class="row-auto d-flex flex-wrap align-items-center h-100 w-100 justify-content-start g-15rem flex-row"
>
<div
className="profile-avatar rounded-circle bg-light"
class="profile-avatar-wrap position-relative"
>
<div
className="profile-avatar-menu-container"
class="profile-avatar rounded-circle bg-light"
>
<div
className="dropdown"
>
<button
aria-expanded={false}
aria-haspopup={true}
className="dropdown-toggle btn btn-primary"
disabled={false}
onClick={[Function]}
type="button"
>
Change
</button>
</div>
<img
alt="profile avatar"
class="w-100 h-100 d-block rounded-circle overflow-hidden object-fit-cover"
data-hj-suppress="true"
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
/>
</div>
<img
alt="profile avatar"
className="w-100 h-100 d-block rounded-circle overflow-hidden"
data-hj-suppress={true}
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
style={
Object {
"objectFit": "cover",
}
}
/>
</div>
<form
encType="multipart/form-data"
onSubmit={[Function]}
>
<input
accept=".jpg, .jpeg, .png"
className="d-none form-control-file"
id="photo-file"
name="file"
onChange={[Function]}
type="file"
/>
</form>
</div>
</div>
</div>
<div
className="col pl-0"
>
<div
className="d-md-none"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
>
<a
className="btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
</div>
</div>
<div
className="row"
>
<div
className="col-md-4 col-lg-4"
>
<div
className="d-none d-md-block mb-4"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
>
<a
className="btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Full Name
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Lemon Seltzer
</p>
<small
className="form-text text-muted"
>
This is the name that appears in your account and on your certificates.
</small>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Location
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Montenegro
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Primary Language Spoken
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Yoruba
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Education
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Elementary/primary school
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Social Links
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<ul
className="list-unstyled"
>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.twitter.com/ALOHA"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-twitter fa-w-16 mr-2"
data-icon="twitter"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"
fill="currentColor"
style={Object {}}
/>
</svg>
Twitter
</a>
</li>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.facebook.com/aloha"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-facebook fa-w-16 mr-2"
data-icon="facebook"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"
fill="currentColor"
style={Object {}}
/>
</svg>
Facebook
</a>
</li>
<li
className="form-group"
>
<div>
<button
className="pl-0 text-left btn btn-link"
onClick={[Function]}
onKeyDown={[Function]}
tabIndex={0}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-plus fa-w-14 fa-xs mr-2"
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
fill="currentColor"
style={Object {}}
/>
</svg>
Add
LinkedIn
</button>
</div>
</li>
</ul>
</div>
</div>
</div>
<div
className="pt-md-3 col-md-8 col-lg-7 offset-lg-1"
>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
About Me
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="lead"
data-hj-suppress={true}
>
This is my bio
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-4"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
My Certificates
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<div
className="row align-items-stretch"
>
<div
className="col col-sm-6 d-flex align-items-stretch"
class="profile-avatar-button"
>
<div
className="card mb-4 certificate flex-grow-1"
>
<div
className="certificate-type-illustration"
style={
Object {
"backgroundImage": "url(icon/mock/path)",
}
}
/>
<div
className="card-body d-flex flex-column"
>
<div
className="card-title"
>
<p
className="small mb-0"
>
Verified Certificate
</p>
<h4
className="certificate-title"
>
edX Demonstration Course
</h4>
</div>
<p
className="small mb-0"
>
<span>
From
</span>
</p>
<p
className="h6 mb-4"
>
edX
</p>
<div
className="flex-grow-1"
/>
<p
className="small mb-2"
>
<span>
Completed on
<span>
3/4/2019
</span>
</span>
</p>
<div>
<a
className="btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`<ProfilePage /> Renders correctly in various states while saving an edited bio 1`] = `
<div
className="profile-page"
>
<div
className="profile-page-bg-banner bg-primary d-none d-md-block p-relative"
/>
<div
className="container-fluid"
>
<div
className="row align-items-center pt-4 mb-4 pt-md-0 mb-md-0"
>
<div
className="col-auto col-md-4 col-lg-3"
>
<div
className="d-flex align-items-center d-md-block"
>
<div
className="profile-avatar-wrap position-relative"
>
<div
className="profile-avatar rounded-circle bg-light"
>
<div
className="profile-avatar-menu-container"
>
<div
className="dropdown"
class="pgn__dropdown pgn__dropdown-light dropdown"
data-testid="dropdown"
>
<button
aria-expanded={false}
aria-haspopup={true}
className="dropdown-toggle btn btn-primary"
disabled={false}
onClick={[Function]}
aria-expanded="false"
aria-haspopup="true"
class="btn-icon btn-icon-inverse-primary btn-icon-md btn-icon-inverse-primary-active shadow-sm pgn__dropdown-toggle-iconbutton"
id="dropdown-toggle-with-iconbutton"
type="button"
>
Change
</button>
</div>
</div>
<img
alt="profile avatar"
className="w-100 h-100 d-block rounded-circle overflow-hidden"
data-hj-suppress={true}
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
style={
Object {
"objectFit": "cover",
}
}
/>
</div>
<form
encType="multipart/form-data"
onSubmit={[Function]}
>
<input
accept=".jpg, .jpeg, .png"
className="d-none form-control-file"
id="photo-file"
name="file"
onChange={[Function]}
type="file"
/>
</form>
</div>
</div>
</div>
<div
className="col pl-0"
>
<div
className="d-md-none"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
>
<a
className="btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
</div>
</div>
<div
className="row"
>
<div
className="col-md-4 col-lg-4"
>
<div
className="d-none d-md-block mb-4"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
>
<a
className="btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Full Name
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Lemon Seltzer
</p>
<small
className="form-text text-muted"
>
This is the name that appears in your account and on your certificates.
</small>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Location
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Montenegro
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Primary Language Spoken
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Yoruba
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Education
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Elementary/primary school
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Social Links
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<ul
className="list-unstyled"
>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.twitter.com/ALOHA"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-twitter fa-w-16 mr-2"
data-icon="twitter"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"
fill="currentColor"
style={Object {}}
/>
</svg>
Twitter
</a>
</li>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.facebook.com/aloha"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-facebook fa-w-16 mr-2"
data-icon="facebook"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"
fill="currentColor"
style={Object {}}
/>
</svg>
Facebook
</a>
</li>
<li
className="form-group"
>
<div>
<button
className="pl-0 text-left btn btn-link"
onClick={[Function]}
onKeyDown={[Function]}
tabIndex={0}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-plus fa-w-14 fa-xs mr-2"
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
fill="currentColor"
style={Object {}}
/>
</svg>
Add
LinkedIn
</button>
</div>
</li>
</ul>
</div>
</div>
</div>
<div
className="pt-md-3 col-md-8 col-lg-7 offset-lg-1"
>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
aria-labelledby="bio-label"
role="dialog"
>
<form
onSubmit={[Function]}
>
<div
className="form-group"
>
<label
className="edit-section-header"
htmlFor="bio"
>
About Me
</label>
<textarea
aria-describedby=""
className="form-control"
id="bio"
name="bio"
onChange={[Function]}
value="This is my bio"
/>
</div>
<div
className="d-flex flex-row-reverse flex-wrap justify-content-end align-items-center"
>
<div
className="form-group d-flex flex-wrap"
>
<label
className="col-form-label"
htmlFor="visibilityBio"
>
Who can see this:
</label>
<span
className="d-flex align-items-center"
class="btn-icon__icon-container"
>
<span
className="d-inline-block ml-1 mr-2"
style={
Object {
"width": "1.5rem",
}
}
class="pgn__icon btn-icon__icon"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
fill="none"
focusable="false"
height="24"
role="img"
style={Object {}}
viewBox="0 0 576 512"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
fill="currentColor"
/>
<path
d="M9 2 7.17 4H2v16h20V4h-5.17L15 2H9Zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Z"
fill="currentColor"
style={Object {}}
/>
</svg>
</span>
<select
className="d-inline-block w-auto form-control"
id="visibilityBio"
name="visibilityBio"
onChange={[Function]}
type="select"
value="all_users"
>
<option
value="private"
>
Just me
</option>
<option
value="all_users"
>
Everyone on edX
</option>
</select>
</span>
</div>
<div
className="form-group flex-shrink-0 flex-grow-1"
>
<button
aria-disabled={false}
aria-live="assertive"
className="pgn__stateful-btn pgn__stateful-btn-state-pending btn btn-primary"
disabled={false}
onClick={[Function]}
type="submit"
>
<span
className="d-flex align-items-center justify-content-center"
>
<span
className="pgn__stateful-btn-icon"
>
<span
className="pgn__icon icon-spin"
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22 12A10 10 0 116.122 3.91l1.176 1.618A8 8 0 1020 12h2z"
fill="currentColor"
/>
</svg>
</span>
</span>
<span
className=""
>
Saving
</span>
</span>
</button>
<button
className="btn btn-link"
disabled={false}
onClick={[Function]}
type="button"
>
Cancel
</button>
</div>
</button>
</div>
</div>
<form
enctype="multipart/form-data"
>
<input
accept=".jpg, .jpeg, .png"
class="d-none form-control-file"
id="photo-file"
name="file"
type="file"
/>
</form>
</div>
<div
class="col h-100 w-100 m-0 p-0 justify-content-start align-items-start"
>
<p
class="row m-0 font-weight-bold text-truncate text-primary-500 h3"
>
staff
</p>
<p
class="row pt-2 text-gray-800 font-weight-normal m-0 p"
>
Lemon Seltzer
</p>
<div
class="row pt-2 m-0 g-1rem"
>
<span
class="small mb-0 text-gray-800"
>
Member since
<span
class="font-weight-bold"
>
2017
</span>
</span>
<span
class="small m-0 text-gray-800"
>
<span
class="font-weight-bold"
>
1
</span>
certifications
</span>
</div>
</div>
<div
class="p-0 col-auto"
>
<a
class="pgn__hyperlink default-link standalone-link btn btn-brand bg-brand-500 font-weight-normal px-4 py-10px text-nowrap"
href="http://localhost:18150/records"
rel="noopener noreferrer"
target="_blank"
>
View My Records
</a>
</div>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-4"
style={
Object {
"height": null,
}
}
class="ml-auto"
/>
</div>
</div>
<div
class="col d-inline-flex h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div
class="w-100 p-0"
>
<div
class="col justify-content-start align-items-start p-0"
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<p
class="font-weight-bold text-primary-500 m-0 h2"
>
Profile information
</p>
</div>
</div>
<div
class="row m-0 px-0 w-100 d-inline-flex align-items-start justify-content-start pt-5.5"
>
<div
class="col p-0 col-6"
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
My Certificates
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<div
className="row align-items-stretch"
class="m-0"
>
<div
className="col col-sm-6 d-flex align-items-stretch"
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Username
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<h4
class="edit-section-header text-gray-700"
>
staff
</h4>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<div
className="card mb-4 certificate flex-grow-1"
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Full name
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
className="certificate-type-illustration"
style={
Object {
"backgroundImage": "url(icon/mock/path)",
}
}
/>
<div
className="card-body d-flex flex-column"
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Lemon Seltzer
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye-slash "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"
fill="currentColor"
/>
</svg>
Just me
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Country
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Montenegro
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Primary language spoken
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Yoruba
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Education
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Elementary/primary school
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye-slash "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"
fill="currentColor"
/>
</svg>
Just me
</span>
</p>
</div>
</div>
</div>
</div>
<div
class="col m-0 pr-0 pl-40px col-6"
>
<div
class="pgn-transition-replace-group position-relative pt-0"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Bio
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
This is my bio
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative p-0"
>
<div
style="padding: .1px 0px;"
>
<div>
<div>
<div
className="card-title"
class="pt-40px"
>
<p
className="small mb-0"
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Verified Certificate
X
</p>
<h4
className="certificate-title"
<div
class="w-100 overflowWrap-breakWord"
>
edX Demonstration Course
</h4>
</div>
<p
className="small mb-0"
>
<span>
From
</span>
</p>
<p
className="h6 mb-4"
>
edX
</p>
<div
className="flex-grow-1"
/>
<p
className="small mb-2"
>
<span>
Completed on
<span>
3/4/2019
</span>
</span>
</p>
<div>
<a
className="btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
<div
class="m-0 p-0 col-auto"
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
<h4
class="edit-section-header text-gray-700"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
https://www.twitter.com/ALOHA
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pt-40px"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Facebook
</p>
<div
class="w-100 overflowWrap-breakWord"
>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
https://www.facebook.com/aloha
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pt-40px"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
LinkedIn
</p>
<div
class="p-0 m-0"
>
<button
class="p-0 text-left btn btn-link lh-36px"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-plus fa-xs mr-1"
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"
fill="currentColor"
/>
</svg>
Add
LinkedIn
</button>
</div>
</div>
</div>
</div>
@@ -2384,968 +1363,1014 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
</div>
</div>
<div
class="col container-fluid d-inline-flex bg-color-grey-FBFAF9 h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div>
<div
class="col justify-content-start align-items-start g-5rem p-0"
>
<div
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<p
class="font-weight-bold text-primary-500 m-0 h2"
>
Your certificates
</p>
</div>
<div
class="col justify-content-start align-items-start pt-2 p-0"
>
<p
class="font-weight-normal text-gray-800 m-0 p-0 p"
>
Your learner records information is only visible to you. Only your username and profile image are visible to others on localhost.
</p>
</div>
</div>
<div
class="col"
>
<div
class="row align-items-center pt-5 g-3rem"
>
<div
class="col-auto d-flex align-items-center p-0"
>
<div
class="col certificate p-4 border-light-400 bg-light-200 w-100 h-100"
>
<div
class="certificate-type-illustration"
style="background-image: url(icon/mock/path);"
/>
<div
class="d-flex flex-column position-relative p-0 width-314px"
>
<div
class="w-100 color-black"
>
<p
class="mb-0 font-weight-normal small"
>
Verified Certificate
</p>
<p
class="m-0 color-black h4"
>
edX Demonstration Course
</p>
<p
class="mb-0 small"
>
From
</p>
<h5
class="mb-0 color-black"
>
edX
</h5>
<p
class="mb-0 small"
>
Completed on
3/4/2019
</p>
</div>
<div
class="pt-3"
>
<a
class="pgn__hyperlink default-link standalone-link btn btn-primary font-weight-normal px-4 py-10px"
href="http://www.example.com/"
rel="noopener noreferrer"
target="_blank"
>
View Certificate
</a>
</div>
<p
class="mb-0 pt-3 small"
>
Credential ID
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`<ProfilePage /> Renders correctly in various states without credentials service 1`] = `
<div
className="profile-page"
>
<div>
<div
className="profile-page-bg-banner bg-primary d-none d-md-block p-relative"
/>
<div
className="container-fluid"
class="profile-page"
>
<div
className="row align-items-center pt-4 mb-4 pt-md-0 mb-md-0"
class="profile-page-bg-banner bg-primary d-md-block align-items-center h-100 w-100 px-120px py-5.5"
>
<div
className="col-auto col-md-4 col-lg-3"
class="col container-fluid w-100 h-100 bg-white py-0 rounded-75 px-40px"
>
<div
className="d-flex align-items-center d-md-block"
class="col h-100 w-100 px-0 justify-content-start g-15rem py-36px"
>
<div
className="profile-avatar-wrap position-relative"
class="row-auto d-flex flex-wrap align-items-center h-100 w-100 justify-content-start g-15rem flex-row"
>
<div
className="profile-avatar rounded-circle bg-light"
class="profile-avatar-wrap position-relative"
>
<div
className="profile-avatar-menu-container"
class="profile-avatar rounded-circle bg-light"
>
<img
alt="profile avatar"
class="w-100 h-100 d-block rounded-circle overflow-hidden object-fit-cover"
data-hj-suppress="true"
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
/>
</div>
<div
class="profile-avatar-button"
>
<div
className="dropdown"
class="pgn__dropdown pgn__dropdown-light dropdown"
data-testid="dropdown"
>
<button
aria-expanded={false}
aria-haspopup={true}
className="dropdown-toggle btn btn-primary"
disabled={false}
onClick={[Function]}
aria-expanded="false"
aria-haspopup="true"
class="btn-icon btn-icon-inverse-primary btn-icon-md btn-icon-inverse-primary-active shadow-sm pgn__dropdown-toggle-iconbutton"
id="dropdown-toggle-with-iconbutton"
type="button"
>
Change
<span
class="btn-icon__icon-container"
>
<span
class="pgn__icon btn-icon__icon"
>
<svg
aria-hidden="true"
fill="none"
focusable="false"
height="24"
role="img"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
fill="currentColor"
/>
<path
d="M9 2 7.17 4H2v16h20V4h-5.17L15 2H9Zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Z"
fill="currentColor"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<img
alt="profile avatar"
className="w-100 h-100 d-block rounded-circle overflow-hidden"
data-hj-suppress={true}
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
style={
Object {
"objectFit": "cover",
}
}
/>
<form
enctype="multipart/form-data"
>
<input
accept=".jpg, .jpeg, .png"
class="d-none form-control-file"
id="photo-file"
name="file"
type="file"
/>
</form>
</div>
<form
encType="multipart/form-data"
onSubmit={[Function]}
<div
class="col h-100 w-100 m-0 p-0 justify-content-start align-items-start"
>
<input
accept=".jpg, .jpeg, .png"
className="d-none form-control-file"
id="photo-file"
name="file"
onChange={[Function]}
type="file"
/>
</form>
<p
class="row m-0 font-weight-bold text-truncate text-primary-500 h3"
>
staff
</p>
<p
class="row pt-2 text-gray-800 font-weight-normal m-0 p"
>
Lemon Seltzer
</p>
<div
class="row pt-2 m-0 g-1rem"
>
<span
class="small mb-0 text-gray-800"
>
Member since
<span
class="font-weight-bold"
>
2017
</span>
</span>
<span
class="small m-0 text-gray-800"
>
<span
class="font-weight-bold"
>
1
</span>
certifications
</span>
</div>
</div>
<div
class="p-0 col-auto"
/>
</div>
</div>
</div>
<div
className="col pl-0"
>
<div
className="d-md-none"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
class="ml-auto"
/>
</div>
</div>
<div
className="row"
class="col d-inline-flex h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div
className="col-md-4 col-lg-4"
class="w-100 p-0"
>
<div
className="d-none d-md-block mb-4"
>
<span
data-hj-suppress={true}
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<span>
2017
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
/>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
class="col justify-content-start align-items-start p-0"
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Full Name
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
class="font-weight-bold text-primary-500 m-0 h2"
>
Lemon Seltzer
</p>
<small
className="form-text text-muted"
>
This is the name that appears in your account and on your certificates.
</small>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
Location
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Montenegro
Profile information
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
class="row m-0 px-0 w-100 d-inline-flex align-items-start justify-content-start pt-5.5"
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="col p-0 col-6"
>
<div
className="editable-item-header mb-2"
class="m-0"
>
<h2
className="edit-section-header"
id={null}
<div
class="row m-0 pb-1.5 align-items-center"
>
Primary Language Spoken
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
Username
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<h4
class="edit-section-header text-gray-700"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
staff
</h4>
</div>
<p
className="h5"
data-hj-suppress={true}
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
Yoruba
</p>
<div
style="padding: .1px 0px;"
>
<div
class="row m-0 pb-1.5 align-items-center"
>
<p
class="h5 font-weight-bold m-0"
data-hj-suppress="true"
>
Full name
</p>
<svg
class="m-0 info-icon"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M11 7h2v2h-2V7Zm0 4h2v6h-2v-6Zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8Z"
fill="currentColor"
/>
</svg>
</div>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Lemon Seltzer
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye-slash "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"
fill="currentColor"
/>
</svg>
Just me
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Country
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Montenegro
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Primary language spoken
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Yoruba
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pgn-transition-replace-group position-relative pt-40px"
>
<div
style="padding: .1px 0px;"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Education
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
Elementary/primary school
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye-slash "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"
fill="currentColor"
/>
</svg>
Just me
</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="col m-0 pr-0 pl-40px col-6"
>
<div
className="editable-item-header mb-2"
class="pgn-transition-replace-group position-relative pt-0"
>
<h2
className="edit-section-header"
id={null}
<div
style="padding: .1px 0px;"
>
Education
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
Bio
</p>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye-slash fa-w-20 "
data-icon="eye-slash"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 640 512"
xmlns="http://www.w3.org/2000/svg"
<div
class="m-0 p-0 col-auto"
>
<path
d="M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Just me
</span>
</p>
<h4
class="edit-section-header text-gray-700"
>
This is my bio
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<p
className="h5"
data-hj-suppress={true}
>
Elementary/primary school
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
>
<div
style={
Object {
"padding": ".1px 0",
}
}
>
<div
className="editable-item-header mb-2"
class="pgn-transition-replace-group position-relative p-0"
>
<h2
className="edit-section-header"
id={null}
>
Social Links
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<ul
className="list-unstyled"
>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.twitter.com/ALOHA"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-twitter fa-w-16 mr-2"
data-icon="twitter"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"
fill="currentColor"
style={Object {}}
/>
</svg>
Twitter
</a>
</li>
<li
className="form-group"
>
<a
className="font-weight-bold"
href="https://www.facebook.com/aloha"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-facebook fa-w-16 mr-2"
data-icon="facebook"
data-prefix="fab"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"
fill="currentColor"
style={Object {}}
/>
</svg>
Facebook
</a>
</li>
<li
className="form-group"
<div
style="padding: .1px 0px;"
>
<div>
<button
className="pl-0 text-left btn btn-link"
onClick={[Function]}
onKeyDown={[Function]}
tabIndex={0}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-plus fa-w-14 fa-xs mr-2"
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
<div>
<div
class="pt-40px"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
fill="currentColor"
style={Object {}}
/>
</svg>
Add
LinkedIn
</button>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
X
</p>
<div
class="w-100 overflowWrap-breakWord"
>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
https://www.twitter.com/ALOHA
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pt-40px"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
Facebook
</p>
<div
class="w-100 overflowWrap-breakWord"
>
<div
class="row m-0 p-0 d-flex flex-nowrap align-items-center"
>
<div
class="m-0 p-0 col-auto"
>
<h4
class="edit-section-header text-gray-700"
>
https://www.facebook.com/aloha
</h4>
</div>
<div
class="col-auto m-0 p-0 d-flex align-items-center col-auto"
>
<button
class="p-1.5 btn btn-link btn-sm"
type="button"
>
<svg
class="text-gray-700"
fill="none"
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06ZM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29Zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75Z"
fill="currentColor"
/>
</svg>
</button>
</div>
</div>
<div
class="row m-0 p-0"
>
<p
class="mb-0"
>
<span
class="ml-auto small text-muted"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-eye "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"
fill="currentColor"
/>
</svg>
Everyone on localhost
</span>
</p>
</div>
</div>
</div>
<div
class="pt-40px"
>
<p
class="h5 font-weight-bold m-0 pb-1.5"
data-hj-suppress="true"
>
LinkedIn
</p>
<div
class="p-0 m-0"
>
<button
class="p-0 text-left btn btn-link lh-36px"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-plus fa-xs mr-1"
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"
fill="currentColor"
/>
</svg>
Add
LinkedIn
</button>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div
className="pt-md-3 col-md-8 col-lg-7 offset-lg-1"
>
</div>
<div
class="col container-fluid d-inline-flex bg-color-grey-FBFAF9 h-100 w-100 align-items-start justify-content-start g-3rem px-120px py-6"
>
<div>
<div
className="pgn-transition-replace-group position-relative mb-5"
style={
Object {
"height": null,
}
}
class="col justify-content-start align-items-start g-5rem p-0"
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="col align-self-stretch height-42px justify-content-start align-items-start p-0"
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
About Me
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<p
className="lead"
data-hj-suppress={true}
class="font-weight-bold text-primary-500 m-0 h2"
>
This is my bio
Your certificates
</p>
</div>
<div
class="col justify-content-start align-items-start pt-2 p-0"
>
<p
class="font-weight-normal text-gray-800 m-0 p-0 p"
>
Your learner records information is only visible to you. Only your username and profile image are visible to others on localhost.
</p>
</div>
</div>
<div
className="pgn-transition-replace-group position-relative mb-4"
style={
Object {
"height": null,
}
}
class="col"
>
<div
style={
Object {
"padding": ".1px 0",
}
}
class="row align-items-center pt-5 g-3rem"
>
<div
className="editable-item-header mb-2"
>
<h2
className="edit-section-header"
id={null}
>
My Certificates
<button
className="float-right px-0 btn btn-link btn-sm"
disabled={false}
onClick={[Function]}
style={
Object {
"marginTop": "-.35rem",
}
}
type="button"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-pencil-alt fa-w-16 mr-1"
data-icon="pencil-alt"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"
fill="currentColor"
style={Object {}}
/>
</svg>
Edit
</button>
</h2>
<p
className="mb-0"
>
<span
className="ml-auto small text-muted"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-eye fa-w-18 "
data-icon="eye"
data-prefix="far"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 576 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"
fill="currentColor"
style={Object {}}
/>
</svg>
Everyone on edX
</span>
</p>
</div>
<div
className="row align-items-stretch"
class="col-auto d-flex align-items-center p-0"
>
<div
className="col col-sm-6 d-flex align-items-stretch"
class="col certificate p-4 border-light-400 bg-light-200 w-100 h-100"
>
<div
className="card mb-4 certificate flex-grow-1"
class="certificate-type-illustration"
style="background-image: url(icon/mock/path);"
/>
<div
class="d-flex flex-column position-relative p-0 width-314px"
>
<div
className="certificate-type-illustration"
style={
Object {
"backgroundImage": "url(icon/mock/path)",
}
}
/>
<div
className="card-body d-flex flex-column"
class="w-100 color-black"
>
<div
className="card-title"
>
<p
className="small mb-0"
>
Verified Certificate
</p>
<h4
className="certificate-title"
>
edX Demonstration Course
</h4>
</div>
<p
className="small mb-0"
class="mb-0 font-weight-normal small"
>
<span>
From
</span>
Verified Certificate
</p>
<p
className="h6 mb-4"
class="m-0 color-black h4"
>
edX Demonstration Course
</p>
<p
class="mb-0 small"
>
From
</p>
<h5
class="mb-0 color-black"
>
edX
</p>
<div
className="flex-grow-1"
/>
</h5>
<p
className="small mb-2"
class="mb-0 small"
>
<span>
Completed on
<span>
3/4/2019
</span>
</span>
Completed on
3/4/2019
</p>
<div>
<a
className="btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
>
<span
className="pgn__icon"
style={
Object {
"height": "1em",
"width": "1em",
}
}
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M19 19H5V5h7V3H3v18h18v-9h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
fill="currentColor"
/>
</svg>
</span>
</span>
</a>
</div>
</div>
<div
class="pt-3"
>
<a
class="pgn__hyperlink default-link standalone-link btn btn-primary font-weight-normal px-4 py-10px"
href="http://www.example.com/"
rel="noopener noreferrer"
target="_blank"
>
View Certificate
</a>
</div>
<p
class="mb-0 pt-3 small"
>
Credential ID
</p>
</div>
</div>
</div>

View File

@@ -9,8 +9,6 @@ export const CLOSE_FORM = 'CLOSE_FORM';
export const UPDATE_DRAFT = 'UPDATE_DRAFT';
export const RESET_DRAFTS = 'RESET_DRAFTS';
// FETCH PROFILE ACTIONS
export const fetchProfile = username => ({
type: FETCH_PROFILE.BASE,
payload: { username },
@@ -25,20 +23,20 @@ export const fetchProfileSuccess = (
preferences,
courseCertificates,
isAuthenticatedUserProfile,
countriesCodesList,
) => ({
type: FETCH_PROFILE.SUCCESS,
account,
preferences,
courseCertificates,
isAuthenticatedUserProfile,
countriesCodesList,
});
export const fetchProfileReset = () => ({
type: FETCH_PROFILE.RESET,
});
// SAVE PROFILE ACTIONS
export const saveProfile = (formId, username) => ({
type: SAVE_PROFILE.BASE,
payload: {
@@ -68,8 +66,6 @@ export const saveProfileFailure = errors => ({
payload: { errors },
});
// SAVE PROFILE PHOTO ACTIONS
export const saveProfilePhoto = (username, formData) => ({
type: SAVE_PROFILE_PHOTO.BASE,
payload: {
@@ -96,8 +92,6 @@ export const saveProfilePhotoFailure = error => ({
payload: { error },
});
// DELETE PROFILE PHOTO ACTIONS
export const deleteProfilePhoto = username => ({
type: DELETE_PROFILE_PHOTO.BASE,
payload: {
@@ -118,8 +112,6 @@ export const deleteProfilePhotoReset = () => ({
type: DELETE_PROFILE_PHOTO.RESET,
});
// FIELD STATE ACTIONS
export const openForm = formId => ({
type: OPEN_FORM,
payload: {
@@ -134,8 +126,6 @@ export const closeForm = formId => ({
},
});
// FORM STATE ACTIONS
export const updateDraft = (name, value) => ({
type: UPDATE_DRAFT,
payload: {

View File

@@ -1,14 +1,4 @@
import {
openForm,
closeForm,
OPEN_FORM,
CLOSE_FORM,
SAVE_PROFILE,
saveProfileBegin,
saveProfileSuccess,
saveProfileFailure,
saveProfileReset,
saveProfile,
SAVE_PROFILE_PHOTO,
saveProfilePhotoBegin,
saveProfilePhotoSuccess,
@@ -22,76 +12,6 @@ import {
deleteProfilePhoto,
} from './actions';
describe('editable field actions', () => {
it('should create an open action', () => {
const expectedAction = {
type: OPEN_FORM,
payload: {
formId: 'name',
},
};
expect(openForm('name')).toEqual(expectedAction);
});
it('should create a closed action', () => {
const expectedAction = {
type: CLOSE_FORM,
payload: {
formId: 'name',
},
};
expect(closeForm('name')).toEqual(expectedAction);
});
});
describe('SAVE profile actions', () => {
it('should create an action to signal the start of a profile save', () => {
const expectedAction = {
type: SAVE_PROFILE.BASE,
payload: {
formId: 'name',
},
};
expect(saveProfile('name')).toEqual(expectedAction);
});
it('should create an action to signal user profile save success', () => {
const accountData = { name: 'Full Name' };
const preferencesData = { visibility: { name: 'private' } };
const expectedAction = {
type: SAVE_PROFILE.SUCCESS,
payload: {
account: accountData,
preferences: preferencesData,
},
};
expect(saveProfileSuccess(accountData, preferencesData)).toEqual(expectedAction);
});
it('should create an action to signal user profile save beginning', () => {
const expectedAction = {
type: SAVE_PROFILE.BEGIN,
};
expect(saveProfileBegin()).toEqual(expectedAction);
});
it('should create an action to signal user profile save success', () => {
const expectedAction = {
type: SAVE_PROFILE.RESET,
};
expect(saveProfileReset()).toEqual(expectedAction);
});
it('should create an action to signal user account save failure', () => {
const errors = ['Test failure'];
const expectedAction = {
type: SAVE_PROFILE.FAILURE,
payload: { errors },
};
expect(saveProfileFailure(errors)).toEqual(expectedAction);
});
});
describe('SAVE profile photo actions', () => {
it('should create an action to signal the start of a profile photo save', () => {
const formData = 'multipart form data';
@@ -123,7 +43,7 @@ describe('SAVE profile photo actions', () => {
expect(saveProfilePhotoSuccess(newPhotoData)).toEqual(expectedAction);
});
it('should create an action to signal user profile photo save success', () => {
it('should create an action to signal user profile photo save reset', () => {
const expectedAction = {
type: SAVE_PROFILE_PHOTO.RESET,
};
@@ -169,34 +89,10 @@ describe('DELETE profile photo actions', () => {
expect(deleteProfilePhotoSuccess(defaultPhotoData)).toEqual(expectedAction);
});
it('should create an action to signal user profile photo deletion success', () => {
it('should create an action to signal user profile photo deletion reset', () => {
const expectedAction = {
type: DELETE_PROFILE_PHOTO.RESET,
};
expect(deleteProfilePhotoReset()).toEqual(expectedAction);
});
});
describe('Editable field opening and closing actions', () => {
const formId = 'name';
it('should create an action to signal the opening a field', () => {
const expectedAction = {
type: OPEN_FORM,
payload: {
formId,
},
};
expect(openForm(formId)).toEqual(expectedAction);
});
it('should create an action to signal the closing a field', () => {
const expectedAction = {
type: CLOSE_FORM,
payload: {
formId,
},
};
expect(closeForm(formId)).toEqual(expectedAction);
});
});

View File

@@ -7,7 +7,7 @@ const EDUCATION_LEVELS = [
'jhs',
'el',
'none',
'o',
'other',
];
const SOCIAL = {
@@ -22,7 +22,12 @@ const SOCIAL = {
},
};
const FIELD_LABELS = {
COUNTRY: 'country',
};
export {
EDUCATION_LEVELS,
SOCIAL,
FIELD_LABELS,
};

34
src/profile/data/hooks.js Normal file
View File

@@ -0,0 +1,34 @@
import { breakpoints, useWindowSize } from '@openedx/paragon';
import { getConfig } from '@edx/frontend-platform';
export function useIsOnTabletScreen() {
const windowSize = useWindowSize();
return windowSize.width <= breakpoints.medium.minWidth;
}
export function useIsOnMobileScreen() {
const windowSize = useWindowSize();
return windowSize.width <= breakpoints.small.minWidth;
}
export function useIsVisibilityEnabled() {
return getConfig().DISABLE_VISIBILITY_EDITING !== 'true';
}
export function useHandleChange(changeHandler) {
return (e) => {
const { name, value } = e.target;
changeHandler(name, value);
};
}
export function useHandleSubmit(submitHandler, formId) {
return (e) => {
e.preventDefault();
submitHandler(formId);
};
}
export function useCloseOpenHandler(handler, formId) {
return () => handler(formId);
}

View File

@@ -0,0 +1,7 @@
const mockData = {
learningGoal: 'advance_career',
editMode: 'static',
visibilityLearningGoal: 'private',
};
export default mockData;

View File

@@ -0,0 +1,84 @@
// This test file simply creates a contract that defines
// expectations and correct responses from the Pact stub server.
import path from 'path';
import { PactV3, MatchersV3 } from '@pact-foundation/pact';
import { initializeMockApp, getConfig, setConfig } from '@edx/frontend-platform';
import { getAccount } from './services';
const expectedUserInfo200 = {
username: 'staff',
email: 'staff@example.com',
bio: 'This is my bio',
name: 'Lemon Seltzer',
country: 'ME',
dateJoined: '2017-06-07T00:44:23Z',
isActive: true,
yearOfBirth: 1901,
languageProficiencies: [],
levelOfEducation: null,
profileImage: {},
socialLinks: [],
};
const provider = new PactV3({
log: path.resolve(process.cwd(), 'src/pact-logs/pact.log'),
dir: path.resolve(process.cwd(), 'src/pacts'),
consumer: 'frontend-app-profile',
provider: 'edx-platform',
});
describe('getAccount for one username', () => {
beforeAll(async () => {
initializeMockApp();
});
it('returns a HTTP 200 and user information', async () => {
const username200 = 'staff';
await provider.addInteraction({
states: [{ description: "I have a user's basic information" }],
uponReceiving: "A request for user's basic information",
withRequest: {
method: 'GET',
path: `/api/user/v1/accounts/${username200}`,
headers: {},
},
willRespondWith: {
status: 200,
headers: {},
body: MatchersV3.like(expectedUserInfo200),
},
});
return provider.executeTest(async (mockserver) => {
setConfig({
...getConfig(),
LMS_BASE_URL: mockserver.url,
});
const response = await getAccount(username200);
expect(response).toEqual(expectedUserInfo200);
});
});
it('Account does not exist', async () => {
const username404 = 'staff_not_found';
await provider.addInteraction({
states: [{ description: "Account and user's information does not exist" }],
uponReceiving: "A request for user's basic information",
withRequest: {
method: 'GET',
path: `/api/user/v1/accounts/${username404}`,
},
willRespondWith: {
status: 404,
},
});
await provider.executeTest(async (mockserver) => {
setConfig({
...getConfig(),
LMS_BASE_URL: mockserver.url,
});
await expect(getAccount(username404).then((response) => response.data)).rejects.toThrow('Request failed with status code 404');
});
});
});

View File

@@ -16,15 +16,31 @@ export const initialState = {
currentlyEditingField: null,
account: {
socialLinks: [],
languageProficiencies: [],
name: '',
bio: '',
country: '',
levelOfEducation: '',
profileImage: {},
yearOfBirth: '',
},
preferences: {
visibilityName: '',
visibilityBio: '',
visibilityCountry: '',
visibilityLevelOfEducation: '',
visibilitySocialLinks: '',
visibilityLanguageProficiencies: '',
},
preferences: {},
courseCertificates: [],
drafts: {},
isLoadingProfile: true,
isAuthenticatedUserProfile: false,
disabledCountries: ['RU'],
countriesCodesList: [],
};
const profilePage = (state = initialState, action) => {
const profilePage = (state = initialState, action = {}) => {
switch (action.type) {
case FETCH_PROFILE.BEGIN:
return {
@@ -37,11 +53,17 @@ const profilePage = (state = initialState, action) => {
case FETCH_PROFILE.SUCCESS:
return {
...state,
account: action.account,
account: {
...state.account,
...action.account,
socialLinks: action.account.socialLinks || [],
languageProficiencies: action.account.languageProficiencies || [],
},
preferences: action.preferences,
courseCertificates: action.courseCertificates,
courseCertificates: action.courseCertificates || [],
isLoadingProfile: false,
isAuthenticatedUserProfile: action.isAuthenticatedUserProfile,
countriesCodesList: action.countriesCodesList || [],
};
case SAVE_PROFILE.BEGIN:
return {
@@ -54,24 +76,28 @@ const profilePage = (state = initialState, action) => {
...state,
saveState: 'complete',
errors: {},
// Account is always replaced completely.
account: action.payload.account !== null ? action.payload.account : state.account,
// Preferences changes get merged in.
account: action.payload.account !== null ? {
...state.account,
...action.payload.account,
socialLinks: action.payload.account.socialLinks || [],
languageProficiencies: action.payload.account.languageProficiencies || [],
} : state.account,
preferences: { ...state.preferences, ...action.payload.preferences },
};
case SAVE_PROFILE.FAILURE:
return {
...state,
saveState: 'error',
isLoadingProfile: false,
errors: { ...state.errors, ...action.payload.errors },
};
case SAVE_PROFILE.RESET:
return {
...state,
saveState: null,
isLoadingProfile: false,
errors: {},
};
case SAVE_PROFILE_PHOTO.BEGIN:
return {
...state,
@@ -81,7 +107,6 @@ const profilePage = (state = initialState, action) => {
case SAVE_PROFILE_PHOTO.SUCCESS:
return {
...state,
// Merge in new profile image data
account: { ...state.account, profileImage: action.payload.profileImage },
savePhotoState: 'complete',
errors: {},
@@ -98,7 +123,6 @@ const profilePage = (state = initialState, action) => {
savePhotoState: null,
errors: {},
};
case DELETE_PROFILE_PHOTO.BEGIN:
return {
...state,
@@ -108,7 +132,6 @@ const profilePage = (state = initialState, action) => {
case DELETE_PROFILE_PHOTO.SUCCESS:
return {
...state,
// Merge in new profile image data (should be empty or default image)
account: { ...state.account, profileImage: action.payload.profileImage },
savePhotoState: 'complete',
errors: {},
@@ -125,13 +148,11 @@ const profilePage = (state = initialState, action) => {
savePhotoState: null,
errors: {},
};
case UPDATE_DRAFT:
return {
...state,
drafts: { ...state.drafts, [action.payload.name]: action.payload.value },
};
case RESET_DRAFTS:
return {
...state,
@@ -144,7 +165,6 @@ const profilePage = (state = initialState, action) => {
drafts: {},
};
case CLOSE_FORM:
// Only close if the field to close is undefined or matches the field that is currently open
if (action.payload.formId === state.currentlyEditingField) {
return {
...state,

View File

@@ -0,0 +1,309 @@
import profilePage, { initialState } from './reducers';
import {
SAVE_PROFILE,
SAVE_PROFILE_PHOTO,
DELETE_PROFILE_PHOTO,
CLOSE_FORM,
OPEN_FORM,
FETCH_PROFILE,
UPDATE_DRAFT,
RESET_DRAFTS,
} from './actions';
describe('profilePage reducer', () => {
it('should return the initial state by default', () => {
expect(profilePage(undefined, {})).toEqual(initialState);
});
describe('FETCH_PROFILE actions', () => {
it('should handle FETCH_PROFILE.BEGIN', () => {
const action = { type: FETCH_PROFILE.BEGIN };
const expectedState = {
...initialState,
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle FETCH_PROFILE.SUCCESS', () => {
const action = {
type: FETCH_PROFILE.SUCCESS,
account: {
name: 'John Doe',
bio: 'Software Engineer',
country: 'US',
levelOfEducation: 'bachelors',
socialLinks: [{ platform: 'twitter', link: 'twitter.com/johndoe' }],
languageProficiencies: [{ code: 'en', name: 'English' }],
profileImage: { url: 'profile.jpg' },
yearOfBirth: 1990,
},
preferences: {
visibilityName: 'public',
visibilityBio: 'public',
visibilityCountry: 'public',
visibilityLevelOfEducation: 'public',
visibilitySocialLinks: 'public',
visibilityLanguageProficiencies: 'public',
},
courseCertificates: ['cert1', 'cert2'],
isAuthenticatedUserProfile: true,
countriesCodesList: ['US', 'CA'],
};
const expectedState = {
...initialState,
account: {
...initialState.account,
...action.account,
socialLinks: action.account.socialLinks,
languageProficiencies: action.account.languageProficiencies,
},
preferences: action.preferences,
courseCertificates: action.courseCertificates,
isLoadingProfile: false,
isAuthenticatedUserProfile: action.isAuthenticatedUserProfile,
countriesCodesList: action.countriesCodesList,
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
});
describe('SAVE_PROFILE actions', () => {
it('should handle SAVE_PROFILE.BEGIN', () => {
const action = { type: SAVE_PROFILE.BEGIN };
const expectedState = {
...initialState,
saveState: 'pending',
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE.SUCCESS', () => {
const action = {
type: SAVE_PROFILE.SUCCESS,
payload: {
account: {
name: 'Jane Doe',
bio: 'Updated bio',
socialLinks: [{ platform: 'linkedin', link: 'linkedin.com/janedoe' }],
languageProficiencies: [{ code: 'es', name: 'Spanish' }],
},
preferences: {
visibilityName: 'private',
visibilityBio: 'private',
},
},
};
const expectedState = {
...initialState,
saveState: 'complete',
errors: {},
account: {
...initialState.account,
...action.payload.account,
socialLinks: action.payload.account.socialLinks,
languageProficiencies: action.payload.account.languageProficiencies,
},
preferences: {
...initialState.preferences,
...action.payload.preferences,
},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE.FAILURE', () => {
const action = {
type: SAVE_PROFILE.FAILURE,
payload: { errors: { save: 'Failed to save profile' } },
};
const expectedState = {
...initialState,
saveState: 'error',
isLoadingProfile: false,
errors: { save: action.payload.errors.save },
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE.RESET', () => {
const action = { type: SAVE_PROFILE.RESET };
const expectedState = {
...initialState,
saveState: null,
isLoadingProfile: false,
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
});
describe('SAVE_PROFILE_PHOTO actions', () => {
it('should handle SAVE_PROFILE_PHOTO.BEGIN', () => {
const action = { type: SAVE_PROFILE_PHOTO.BEGIN };
const expectedState = {
...initialState,
savePhotoState: 'pending',
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE_PHOTO.SUCCESS', () => {
const action = {
type: SAVE_PROFILE_PHOTO.SUCCESS,
payload: { profileImage: { url: 'new-image-url.jpg' } },
};
const expectedState = {
...initialState,
account: { ...initialState.account, profileImage: action.payload.profileImage },
savePhotoState: 'complete',
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE_PHOTO.FAILURE', () => {
const action = {
type: SAVE_PROFILE_PHOTO.FAILURE,
payload: { error: 'Photo upload failed' },
};
const expectedState = {
...initialState,
savePhotoState: 'error',
errors: { photo: action.payload.error },
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle SAVE_PROFILE_PHOTO.RESET', () => {
const action = { type: SAVE_PROFILE_PHOTO.RESET };
const expectedState = {
...initialState,
savePhotoState: null,
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
});
describe('DELETE_PROFILE_PHOTO actions', () => {
it('should handle DELETE_PROFILE_PHOTO.BEGIN', () => {
const action = { type: DELETE_PROFILE_PHOTO.BEGIN };
const expectedState = {
...initialState,
savePhotoState: 'pending',
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle DELETE_PROFILE_PHOTO.SUCCESS', () => {
const action = {
type: DELETE_PROFILE_PHOTO.SUCCESS,
payload: { profileImage: { url: 'default-image-url.jpg' } },
};
const expectedState = {
...initialState,
account: { ...initialState.account, profileImage: action.payload.profileImage },
savePhotoState: 'complete',
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle DELETE_PROFILE_PHOTO.FAILURE', () => {
const action = {
type: DELETE_PROFILE_PHOTO.FAILURE,
payload: { errors: { delete: 'Failed to delete photo' } },
};
const expectedState = {
...initialState,
savePhotoState: 'error',
errors: { delete: action.payload.errors.delete },
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle DELETE_PROFILE_PHOTO.RESET', () => {
const action = { type: DELETE_PROFILE_PHOTO.RESET };
const expectedState = {
...initialState,
savePhotoState: null,
errors: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
});
describe('Draft and Form actions', () => {
it('should handle UPDATE_DRAFT', () => {
const action = {
type: UPDATE_DRAFT,
payload: { name: 'bio', value: 'New bio draft' },
};
const expectedState = {
...initialState,
drafts: { bio: 'New bio draft' },
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle RESET_DRAFTS', () => {
const initialStateWithDrafts = {
...initialState,
drafts: { bio: 'New bio draft', name: 'New name' },
};
const action = { type: RESET_DRAFTS };
const expectedState = {
...initialStateWithDrafts,
drafts: {},
};
expect(profilePage(initialStateWithDrafts, action)).toEqual(expectedState);
});
it('should handle OPEN_FORM', () => {
const action = {
type: OPEN_FORM,
payload: { formId: 'bioForm' },
};
const expectedState = {
...initialState,
currentlyEditingField: 'bioForm',
drafts: {},
};
expect(profilePage(initialState, action)).toEqual(expectedState);
});
it('should handle CLOSE_FORM when formId matches currentlyEditingField', () => {
const initialStateWithForm = {
...initialState,
currentlyEditingField: 'bioForm',
drafts: { bio: 'New bio draft' },
};
const action = {
type: CLOSE_FORM,
payload: { formId: 'bioForm' },
};
const expectedState = {
...initialStateWithForm,
currentlyEditingField: null,
drafts: {},
};
expect(profilePage(initialStateWithForm, action)).toEqual(expectedState);
});
it('should not handle CLOSE_FORM when formId does not match currentlyEditingField', () => {
const initialStateWithForm = {
...initialState,
currentlyEditingField: 'bioForm',
drafts: { bio: 'New bio draft' },
};
const action = {
type: CLOSE_FORM,
payload: { formId: 'nameForm' },
};
expect(profilePage(initialStateWithForm, action)).toEqual(initialStateWithForm);
});
});
});

View File

@@ -22,13 +22,12 @@ import {
resetDrafts,
saveProfileBegin,
saveProfileFailure,
saveProfilePhotoBegin,
saveProfilePhotoFailure,
saveProfilePhotoReset,
saveProfilePhotoSuccess,
saveProfileReset,
saveProfileSuccess,
SAVE_PROFILE,
saveProfilePhotoBegin,
saveProfilePhotoReset,
saveProfilePhotoSuccess,
SAVE_PROFILE_PHOTO,
} from './actions';
import { handleSaveProfileSelector, userAccountSelector } from './selectors';
@@ -38,39 +37,53 @@ export function* handleFetchProfile(action) {
const { username } = action.payload;
const userAccount = yield select(userAccountSelector);
const isAuthenticatedUserProfile = username === getAuthenticatedUser().username;
// Default our data assuming the account is the current user's account.
let preferences = {};
let account = userAccount;
let courseCertificates = null;
let countriesCodesList = [];
try {
yield put(fetchProfileBegin());
// Depending on which profile we're loading, we need to make different calls.
const calls = [
call(ProfileApiService.getAccount, username),
call(ProfileApiService.getCourseCertificates, username),
call(ProfileApiService.getCountryList),
];
if (isAuthenticatedUserProfile) {
// If the profile is for the current user, get their preferences.
// We don't need them for other users.
calls.push(call(ProfileApiService.getPreferences, username));
}
// Make all the calls in parallel.
const result = yield all(calls);
if (isAuthenticatedUserProfile) {
[account, courseCertificates, preferences] = result;
[account, courseCertificates, countriesCodesList, preferences] = result;
} else {
[account, courseCertificates] = result;
[account, courseCertificates, countriesCodesList] = result;
}
if (isAuthenticatedUserProfile && result[0].accountPrivacy === 'all_users') {
yield call(ProfileApiService.patchPreferences, action.payload.username, {
account_privacy: 'custom',
'visibility.name': 'all_users',
'visibility.bio': 'all_users',
'visibility.course_certificates': 'all_users',
'visibility.country': 'all_users',
'visibility.date_joined': 'all_users',
'visibility.level_of_education': 'all_users',
'visibility.language_proficiencies': 'all_users',
'visibility.social_links': 'all_users',
'visibility.time_zone': 'all_users',
});
}
yield put(fetchProfileSuccess(
account,
preferences,
courseCertificates,
isAuthenticatedUserProfile,
countriesCodesList,
));
yield put(fetchProfileReset());
@@ -89,7 +102,6 @@ export function* handleSaveProfile(action) {
const accountDrafts = pick(drafts, [
'bio',
'courseCertificates',
'country',
'levelOfEducation',
'languageProficiencies',
@@ -99,7 +111,6 @@ export function* handleSaveProfile(action) {
const preferencesDrafts = pick(drafts, [
'visibilityBio',
'visibilityCourseCertificates',
'visibilityCountry',
'visibilityLevelOfEducation',
'visibilityLanguageProficiencies',
@@ -113,7 +124,6 @@ export function* handleSaveProfile(action) {
yield put(saveProfileBegin());
let accountResult = null;
// Build the visibility drafts into a structure the API expects.
if (Object.keys(accountDrafts).length > 0) {
accountResult = yield call(
@@ -123,17 +133,14 @@ export function* handleSaveProfile(action) {
);
}
let preferencesResult = preferences; // assume it hasn't changed.
let preferencesResult = preferences;
if (Object.keys(preferencesDrafts).length > 0) {
yield call(ProfileApiService.patchPreferences, action.payload.username, preferencesDrafts);
// TODO: Temporary deoptimization since the patchPreferences call doesn't return anything.
// Remove this second call once we can get a result from the one above.
preferencesResult = yield call(ProfileApiService.getPreferences, action.payload.username);
}
// The account result is returned from the server.
// The preferences draft is valid if the server didn't complain, so
// pass it through directly.
yield put(saveProfileSuccess(accountResult, preferencesResult));
yield delay(1000);
yield put(closeForm(action.payload.formId));
@@ -159,12 +166,7 @@ export function* handleSaveProfilePhoto(action) {
yield put(saveProfilePhotoSuccess(photoResult));
yield put(saveProfilePhotoReset());
} catch (e) {
if (e.processedData) {
yield put(saveProfilePhotoFailure(e.processedData));
} else {
yield put(saveProfilePhotoReset());
throw e;
}
yield put(saveProfilePhotoReset());
}
}
@@ -178,7 +180,6 @@ export function* handleDeleteProfilePhoto(action) {
yield put(deleteProfilePhotoReset());
} catch (e) {
yield put(deleteProfilePhotoReset());
throw e;
}
}

View File

@@ -19,13 +19,13 @@ jest.mock('./services', () => ({
getPreferences: jest.fn(),
getAccount: jest.fn(),
getCourseCertificates: jest.fn(),
getCountryList: jest.fn(),
}));
jest.mock('@edx/frontend-platform/auth', () => ({
getAuthenticatedUser: jest.fn(),
}));
// RootSaga and ProfileApiService must be imported AFTER the mock above.
/* eslint-disable import/first */
import profileSaga, {
handleFetchProfile,
@@ -68,17 +68,18 @@ describe('RootSaga', () => {
const action = profileActions.fetchProfile('gonzo');
const gen = handleFetchProfile(action);
const result = [userAccount, [1, 2, 3], { preferences: 'stuff' }];
const result = [userAccount, [1, 2, 3], [], { preferences: 'stuff' }];
expect(gen.next().value).toEqual(select(userAccountSelector));
expect(gen.next(selectorData).value).toEqual(put(profileActions.fetchProfileBegin()));
expect(gen.next().value).toEqual(all([
call(ProfileApiService.getAccount, 'gonzo'),
call(ProfileApiService.getCourseCertificates, 'gonzo'),
call(ProfileApiService.getCountryList),
call(ProfileApiService.getPreferences, 'gonzo'),
]));
expect(gen.next(result).value)
.toEqual(put(profileActions.fetchProfileSuccess(userAccount, result[2], result[1], true)));
.toEqual(put(profileActions.fetchProfileSuccess(userAccount, result[3], result[1], true, [])));
expect(gen.next().value).toEqual(put(profileActions.fetchProfileReset()));
expect(gen.next().value).toBeUndefined();
});
@@ -88,6 +89,7 @@ describe('RootSaga', () => {
username: 'gonzo',
other: 'data',
};
const countriesCodesList = [{ code: 'AX' }, { code: 'AL' }];
getAuthenticatedUser.mockReturnValue(userAccount);
const selectorData = {
userAccount,
@@ -96,16 +98,17 @@ describe('RootSaga', () => {
const action = profileActions.fetchProfile('booyah');
const gen = handleFetchProfile(action);
const result = [{}, [1, 2, 3]];
const result = [{}, [1, 2, 3], countriesCodesList];
expect(gen.next().value).toEqual(select(userAccountSelector));
expect(gen.next(selectorData).value).toEqual(put(profileActions.fetchProfileBegin()));
expect(gen.next().value).toEqual(all([
call(ProfileApiService.getAccount, 'booyah'),
call(ProfileApiService.getCourseCertificates, 'booyah'),
call(ProfileApiService.getCountryList),
]));
expect(gen.next(result).value)
.toEqual(put(profileActions.fetchProfileSuccess(result[0], {}, result[1], false)));
.toEqual(put(profileActions.fetchProfileSuccess(result[0], {}, result[1], false, countriesCodesList)));
expect(gen.next().value).toEqual(put(profileActions.fetchProfileReset()));
expect(gen.next().value).toBeUndefined();
});
@@ -132,8 +135,6 @@ describe('RootSaga', () => {
expect(gen.next().value).toEqual(call(ProfileApiService.patchProfile, 'my username', {
name: 'Full Name',
}));
// The library would supply the result of the above call
// as the parameter to the NEXT yield. Here:
expect(gen.next(profile).value).toEqual(put(profileActions.saveProfileSuccess(profile, {})));
expect(gen.next().value).toEqual(delay(1000));
expect(gen.next().value).toEqual(put(profileActions.closeForm('ze form id')));
@@ -162,5 +163,67 @@ describe('RootSaga', () => {
expect(result.value).toEqual(put(profileActions.saveProfileFailure({ uhoh: 'not good' })));
expect(gen.next().value).toBeUndefined();
});
it('should reset profile if error has no processedData', () => {
const action = profileActions.saveProfile('formid', 'user1');
const gen = handleSaveProfile(action);
expect(gen.next().value).toEqual(select(handleSaveProfileSelector));
expect(gen.next(selectorData).value).toEqual(put(profileActions.saveProfileBegin()));
const err = new Error('oops');
const result = gen.throw(err);
expect(result.value).toEqual(put(profileActions.saveProfileReset()));
});
});
describe('handleSaveProfilePhoto', () => {
it('should save profile photo successfully', () => {
const action = profileActions.saveProfilePhoto('user1', { some: 'formdata' });
const gen = handleSaveProfilePhoto(action);
const fakePhoto = { url: 'photo.jpg' };
expect(gen.next().value).toEqual(put(profileActions.saveProfilePhotoBegin()));
expect(gen.next().value).toEqual(call(ProfileApiService.postProfilePhoto, 'user1', { some: 'formdata' }));
expect(gen.next(fakePhoto).value).toEqual(put(profileActions.saveProfilePhotoSuccess(fakePhoto)));
expect(gen.next().value).toEqual(put(profileActions.saveProfilePhotoReset()));
expect(gen.next().value).toBeUndefined();
});
it('should reset photo state on error', () => {
const action = profileActions.saveProfilePhoto('user1', {});
const gen = handleSaveProfilePhoto(action);
expect(gen.next().value).toEqual(put(profileActions.saveProfilePhotoBegin()));
const err = new Error('fail');
expect(gen.throw(err).value).toEqual(put(profileActions.saveProfilePhotoReset()));
expect(gen.next().done).toBe(true);
});
});
describe('handleDeleteProfilePhoto', () => {
it('should delete profile photo successfully', () => {
const action = profileActions.deleteProfilePhoto('user1');
const gen = handleDeleteProfilePhoto(action);
const fakeResult = { ok: true };
expect(gen.next().value).toEqual(put(profileActions.deleteProfilePhotoBegin()));
expect(gen.next().value).toEqual(call(ProfileApiService.deleteProfilePhoto, 'user1'));
expect(gen.next(fakeResult).value).toEqual(put(profileActions.deleteProfilePhotoSuccess(fakeResult)));
expect(gen.next().value).toEqual(put(profileActions.deleteProfilePhotoReset()));
expect(gen.next().value).toBeUndefined();
});
it('should reset photo state on error', () => {
const action = profileActions.saveProfilePhoto('user1', {});
const gen = handleSaveProfilePhoto(action);
expect(gen.next().value).toEqual(put(profileActions.saveProfilePhotoBegin()));
const err = new Error('fail');
expect(gen.throw(err).value).toEqual(put(profileActions.saveProfilePhotoReset()));
expect(gen.next().done).toBe(true);
});
});
});

View File

@@ -5,24 +5,22 @@ import {
getCountryList,
getCountryMessages,
getLanguageMessages,
} from '@edx/frontend-platform/i18n'; // eslint-disable-line
} from '@edx/frontend-platform/i18n';
export const formIdSelector = (state, props) => props.formId;
export const userAccountSelector = state => state.userAccount;
export const profileAccountSelector = state => state.profilePage.account;
export const profileDraftsSelector = state => state.profilePage.drafts;
export const accountPrivacySelector = state => state.profilePage.preferences.accountPrivacy;
export const profilePreferencesSelector = state => state.profilePage.preferences;
export const profileCourseCertificatesSelector = state => state.profilePage.courseCertificates;
export const profileAccountDraftsSelector = state => state.profilePage.accountDrafts;
export const profileVisibilityDraftsSelector = state => state.profilePage.visibilityDrafts;
export const saveStateSelector = state => state.profilePage.saveState;
export const savePhotoStateSelector = state => state.profilePage.savePhotoState;
export const isLoadingProfileSelector = state => state.profilePage.isLoadingProfile;
export const currentlyEditingFieldSelector = state => state.profilePage.currentlyEditingField;
export const accountErrorsSelector = state => state.profilePage.errors;
export const isAuthenticatedUserProfileSelector = state => state.profilePage.isAuthenticatedUserProfile;
export const countriesCodesListSelector = state => state.profilePage.countriesCodesList;
export const editableFormModeSelector = createSelector(
profileAccountSelector,
@@ -31,19 +29,11 @@ export const editableFormModeSelector = createSelector(
formIdSelector,
currentlyEditingFieldSelector,
(account, isAuthenticatedUserProfile, certificates, formId, currentlyEditingField) => {
// If the prop doesn't exist, that means it hasn't been set (for the current user's profile)
// or is being hidden from us (for other users' profiles)
let propExists = account[formId] != null && account[formId].length > 0;
propExists = formId === 'certificates' ? certificates.length > 0 : propExists; // overwrite for certificates
// If this isn't the current user's profile or if
// the current user has no age set / under 13 ...
if (!isAuthenticatedUserProfile || account.requiresParentalConsent) {
// then there are only two options: static or nothing.
// We use 'null' as a return value because the consumers of
// getMode render nothing at all on a mode of null.
return propExists ? 'static' : null;
propExists = formId === 'certificates' ? certificates.length > 0 : propExists;
if (!isAuthenticatedUserProfile) {
return 'static';
}
// Otherwise, if this is the current user's profile...
if (formId === currentlyEditingField) {
return 'editing';
}
@@ -64,12 +54,10 @@ export const accountDraftsFieldSelector = createSelector(
export const visibilityDraftsFieldSelector = createSelector(
formIdSelector,
profileVisibilityDraftsSelector,
(formId, visibilityDrafts) => visibilityDrafts[formId],
profileDraftsSelector,
(formId, drafts) => drafts[`visibility${formId.charAt(0).toUpperCase() + formId.slice(1)}`],
);
// Note: Error messages are delivered from the server
// localized according to a user's account settings
export const formErrorSelector = createSelector(
accountErrorsSelector,
formIdSelector,
@@ -87,11 +75,6 @@ export const editableFormSelector = createSelector(
}),
);
// Because this selector has no input selectors, it will only be evaluated once. This is fine
// for now because we don't allow users to change the locale after page load.
// Once we DO allow this, we should create an actual action which dispatches the locale into redux,
// then we can modify this to get the locale from state rather than from getLocale() directly.
// Once we do that, this will work as expected and be re-evaluated when the locale changes.
export const localeSelector = () => getLocale();
export const countryMessagesSelector = createSelector(
localeSelector,
@@ -109,7 +92,14 @@ export const sortedLanguagesSelector = createSelector(
export const sortedCountriesSelector = createSelector(
localeSelector,
locale => getCountryList(locale),
countriesCodesListSelector,
profileAccountSelector,
(locale, countriesCodesList, profileAccount) => {
const countryList = getCountryList(locale);
const userCountry = profileAccount.country;
return countryList.filter(({ code }) => code === userCountry || countriesCodesList.find(x => x === code));
},
);
export const preferredLanguageSelector = createSelector(
@@ -127,10 +117,14 @@ export const countrySelector = createSelector(
editableFormSelector,
sortedCountriesSelector,
countryMessagesSelector,
(editableForm, sortedCountries, countryMessages) => ({
countriesCodesListSelector,
profileAccountSelector,
(editableForm, translatedCountries, countryMessages, countriesCodesList, account) => ({
...editableForm,
sortedCountries,
translatedCountries,
countryMessages,
countriesCodesList,
committedCountry: account.country,
}),
);
@@ -154,9 +148,6 @@ export const profileImageSelector = createSelector(
: {}),
);
/**
* This is used by a saga to pull out data to process.
*/
export const handleSaveProfileSelector = createSelector(
profileDraftsSelector,
profilePreferencesSelector,
@@ -166,7 +157,6 @@ export const handleSaveProfileSelector = createSelector(
}),
);
// Reformats the social links in a platform-keyed hash.
const socialLinksByPlatformSelector = createSelector(
profileAccountSelector,
(account) => {
@@ -193,24 +183,18 @@ const draftSocialLinksByPlatformSelector = createSelector(
},
);
// Fleshes out our list of existing social links with all the other ones the user can set.
export const formSocialLinksSelector = createSelector(
socialLinksByPlatformSelector,
draftSocialLinksByPlatformSelector,
(linksByPlatform, draftLinksByPlatform) => {
const knownPlatforms = ['twitter', 'facebook', 'linkedin'];
const socialLinks = [];
// For each known platform
knownPlatforms.forEach((platform) => {
// If the link is in our drafts.
if (draftLinksByPlatform[platform] !== undefined) {
// Use the draft one.
socialLinks.push(draftLinksByPlatform[platform]);
} else if (linksByPlatform[platform] !== undefined) {
// Otherwise use the real one.
socialLinks.push(linksByPlatform[platform]);
} else {
// And if it's not in either, use a stub.
socialLinks.push({
platform,
socialLink: null,
@@ -228,18 +212,16 @@ export const visibilitiesSelector = createSelector(
switch (accountPrivacy) {
case 'custom':
return {
visibilityBio: preferences.visibilityBio || 'private',
visibilityCourseCertificates: preferences.visibilityCourseCertificates || 'private',
visibilityCountry: preferences.visibilityCountry || 'private',
visibilityLevelOfEducation: preferences.visibilityLevelOfEducation || 'private',
visibilityLanguageProficiencies: preferences.visibilityLanguageProficiencies || 'private',
visibilityName: preferences.visibilityName || 'private',
visibilitySocialLinks: preferences.visibilitySocialLinks || 'private',
visibilityBio: preferences.visibilityBio || 'all_users',
visibilityCountry: preferences.visibilityCountry || 'all_users',
visibilityLevelOfEducation: preferences.visibilityLevelOfEducation || 'all_users',
visibilityLanguageProficiencies: preferences.visibilityLanguageProficiencies || 'all_users',
visibilityName: preferences.visibilityName || 'all_users',
visibilitySocialLinks: preferences.visibilitySocialLinks || 'all_users',
};
case 'private':
return {
visibilityBio: 'private',
visibilityCourseCertificates: 'private',
visibilityCountry: 'private',
visibilityLevelOfEducation: 'private',
visibilityLanguageProficiencies: 'private',
@@ -248,13 +230,8 @@ export const visibilitiesSelector = createSelector(
};
case 'all_users':
default:
// All users is intended to fall through to default.
// If there is no value for accountPrivacy in perferences, that means it has not been
// explicitly set yet. The server assumes - today - that this means "all_users",
// so we emulate that here in the client.
return {
visibilityBio: 'all_users',
visibilityCourseCertificates: 'all_users',
visibilityCountry: 'all_users',
visibilityLevelOfEducation: 'all_users',
visibilityLanguageProficiencies: 'all_users',
@@ -265,9 +242,6 @@ export const visibilitiesSelector = createSelector(
},
);
/**
* If there's no draft present at all (undefined), use the original committed value.
*/
function chooseFormValue(draft, committed) {
return draft !== undefined ? draft : committed;
}
@@ -282,10 +256,6 @@ export const formValuesSelector = createSelector(
bio: chooseFormValue(drafts.bio, account.bio),
visibilityBio: chooseFormValue(drafts.visibilityBio, visibilities.visibilityBio),
courseCertificates,
visibilityCourseCertificates: chooseFormValue(
drafts.visibilityCourseCertificates,
visibilities.visibilityCourseCertificates,
),
country: chooseFormValue(drafts.country, account.country),
visibilityCountry: chooseFormValue(drafts.visibilityCountry, visibilities.visibilityCountry),
levelOfEducation: chooseFormValue(drafts.levelOfEducation, account.levelOfEducation),
@@ -303,7 +273,7 @@ export const formValuesSelector = createSelector(
),
name: chooseFormValue(drafts.name, account.name),
visibilityName: chooseFormValue(drafts.visibilityName, visibilities.visibilityName),
socialLinks, // Social links is calculated in its own selector, since it's complicated.
socialLinks,
visibilitySocialLinks: chooseFormValue(
drafts.visibilitySocialLinks,
visibilities.visibilitySocialLinks,
@@ -320,6 +290,7 @@ export const profilePageSelector = createSelector(
isLoadingProfileSelector,
draftSocialLinksByPlatformSelector,
accountErrorsSelector,
isAuthenticatedUserProfileSelector,
(
account,
formValues,
@@ -329,46 +300,39 @@ export const profilePageSelector = createSelector(
isLoadingProfile,
draftSocialLinksByPlatform,
errors,
isAuthenticatedUserProfile,
) => ({
// Account data we need
username: account.username,
profileImage,
requiresParentalConsent: account.requiresParentalConsent,
dateJoined: account.dateJoined,
yearOfBirth: account.yearOfBirth,
// Bio form data
bio: formValues.bio,
visibilityBio: formValues.visibilityBio,
// Certificates form data
courseCertificates: formValues.courseCertificates,
visibilityCourseCertificates: formValues.visibilityCourseCertificates,
// Country form data
country: formValues.country,
visibilityCountry: formValues.visibilityCountry,
// Education form data
levelOfEducation: formValues.levelOfEducation,
visibilityLevelOfEducation: formValues.visibilityLevelOfEducation,
// Language proficiency form data
languageProficiencies: formValues.languageProficiencies,
visibilityLanguageProficiencies: formValues.visibilityLanguageProficiencies,
// Name form data
name: formValues.name,
visibilityName: formValues.visibilityName,
// Social links form data
socialLinks: formValues.socialLinks,
visibilitySocialLinks: formValues.visibilitySocialLinks,
draftSocialLinksByPlatform,
// Other data we need
saveState,
savePhotoState,
isLoadingProfile,
photoUploadError: errors.photo || null,
isAuthenticatedUserProfile,
}),
);

View File

@@ -2,11 +2,24 @@ import { ensureConfig, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient as getHttpClient } from '@edx/frontend-platform/auth';
import { logError } from '@edx/frontend-platform/logging';
import { camelCaseObject, convertKeyNames, snakeCaseObject } from '../utils';
import { FIELD_LABELS } from './constants';
ensureConfig(['LMS_BASE_URL'], 'Profile API service');
function processAccountData(data) {
return camelCaseObject(data);
const processedData = camelCaseObject(data);
return {
...processedData,
socialLinks: Array.isArray(processedData.socialLinks) ? processedData.socialLinks : [],
languageProficiencies: Array.isArray(processedData.languageProficiencies)
? processedData.languageProficiencies : [],
name: processedData.name || null,
bio: processedData.bio || null,
country: processedData.country || null,
levelOfEducation: processedData.levelOfEducation || null,
profileImage: processedData.profileImage || {},
yearOfBirth: processedData.yearOfBirth || null,
};
}
function processAndThrowError(error, errorDataProcessor) {
@@ -19,15 +32,12 @@ function processAndThrowError(error, errorDataProcessor) {
}
}
// GET ACCOUNT
export async function getAccount(username) {
const { data } = await getHttpClient().get(`${getConfig().LMS_BASE_URL}/api/user/v1/accounts/${username}`);
// Process response data
return processAccountData(data);
}
// PATCH PROFILE
export async function patchProfile(username, params) {
const processedParams = snakeCaseObject(params);
@@ -41,12 +51,9 @@ export async function patchProfile(username, params) {
processAndThrowError(error, processAccountData);
});
// Process response data
return processAccountData(data);
}
// POST PROFILE PHOTO
export async function postProfilePhoto(username, formData) {
// eslint-disable-next-line no-unused-vars
const { data } = await getHttpClient().post(
@@ -70,8 +77,6 @@ export async function postProfilePhoto(username, formData) {
return updatedData.profileImage;
}
// DELETE PROFILE PHOTO
export async function deleteProfilePhoto(username) {
// eslint-disable-next-line no-unused-vars
const { data } = await getHttpClient().delete(`${getConfig().LMS_BASE_URL}/api/user/v1/accounts/${username}/image`);
@@ -85,14 +90,12 @@ export async function deleteProfilePhoto(username) {
return updatedData.profileImage;
}
// GET PREFERENCES
export async function getPreferences(username) {
const { data } = await getHttpClient().get(`${getConfig().LMS_BASE_URL}/api/user/v1/preferences/${username}`);
return camelCaseObject(data);
}
// PATCH PREFERENCES
export async function patchPreferences(username, params) {
let processedParams = snakeCaseObject(params);
processedParams = convertKeyNames(processedParams, {
@@ -114,8 +117,6 @@ export async function patchPreferences(username, params) {
return params; // TODO: Once the server returns the updated preferences object, return that.
}
// GET COURSE CERTIFICATES
function transformCertificateData(data) {
const transformedData = [];
data.forEach((cert) => {
@@ -147,3 +148,21 @@ export async function getCourseCertificates(username) {
return [];
}
}
function extractCountryList(data) {
return data?.fields
.find(({ name }) => name === FIELD_LABELS.COUNTRY)
?.options?.map(({ value }) => (value)) || [];
}
export async function getCountryList() {
const url = `${getConfig().LMS_BASE_URL}/user_api/v1/account/registration/`;
try {
const { data } = await getHttpClient().get(url);
return extractCountryList(data);
} catch (e) {
logError(e);
return [];
}
}

View File

@@ -0,0 +1,174 @@
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { logError } from '@edx/frontend-platform/logging';
import {
getAccount,
patchProfile,
postProfilePhoto,
deleteProfilePhoto,
getPreferences,
patchPreferences,
getCourseCertificates,
getCountryList,
} from './services';
import { FIELD_LABELS } from './constants';
import { camelCaseObject, snakeCaseObject, convertKeyNames } from '../utils';
// --- Mocks ---
jest.mock('@edx/frontend-platform', () => ({
ensureConfig: jest.fn(),
getConfig: jest.fn(() => ({ LMS_BASE_URL: 'http://fake-lms' })),
}));
jest.mock('@edx/frontend-platform/auth', () => ({
getAuthenticatedHttpClient: jest.fn(),
}));
jest.mock('@edx/frontend-platform/logging', () => ({
logError: jest.fn(),
}));
jest.mock('../utils', () => ({
camelCaseObject: jest.fn((obj) => obj),
snakeCaseObject: jest.fn((obj) => obj),
convertKeyNames: jest.fn((obj) => obj),
}));
const mockHttpClient = {
get: jest.fn(),
patch: jest.fn(),
post: jest.fn(),
delete: jest.fn(),
};
beforeEach(() => {
jest.clearAllMocks();
getAuthenticatedHttpClient.mockReturnValue(mockHttpClient);
});
// --- Tests ---
describe('services', () => {
describe('getAccount', () => {
it('should return processed account data', async () => {
const mockData = { name: 'John Doe', socialLinks: [] };
mockHttpClient.get.mockResolvedValue({ data: mockData });
const result = await getAccount('john');
expect(result).toMatchObject(mockData);
expect(mockHttpClient.get).toHaveBeenCalledWith(
'http://fake-lms/api/user/v1/accounts/john',
);
});
});
describe('patchProfile', () => {
it('should patch and return processed data', async () => {
const mockData = { bio: 'New Bio' };
mockHttpClient.patch.mockResolvedValue({ data: mockData });
const result = await patchProfile('john', { bio: 'New Bio' });
expect(result).toMatchObject(mockData);
expect(snakeCaseObject).toHaveBeenCalledWith({ bio: 'New Bio' });
});
it('should throw processed error on failure', async () => {
const error = { response: { data: { some: 'error' } } };
mockHttpClient.patch.mockRejectedValue(error);
await expect(patchProfile('john', {})).rejects.toMatchObject(error);
});
});
describe('postProfilePhoto', () => {
it('should post photo and return updated profile image', async () => {
mockHttpClient.post.mockResolvedValue({});
mockHttpClient.get.mockResolvedValue({
data: { profileImage: { url: 'img.png' } },
});
const result = await postProfilePhoto('john', new FormData());
expect(result).toEqual({ url: 'img.png' });
});
it('should throw error if API fails', async () => {
const error = { response: { data: { error: 'fail' } } };
mockHttpClient.post.mockRejectedValue(error);
await expect(postProfilePhoto('john', new FormData())).rejects.toMatchObject(error);
});
});
describe('deleteProfilePhoto', () => {
it('should delete photo and return updated profile image', async () => {
mockHttpClient.delete.mockResolvedValue({});
mockHttpClient.get.mockResolvedValue({
data: { profileImage: { url: 'deleted.png' } },
});
const result = await deleteProfilePhoto('john');
expect(result).toEqual({ url: 'deleted.png' });
});
});
describe('getPreferences', () => {
it('should return camelCased preferences', async () => {
mockHttpClient.get.mockResolvedValue({ data: { pref: 1 } });
const result = await getPreferences('john');
expect(result).toMatchObject({ pref: 1 });
expect(camelCaseObject).toHaveBeenCalledWith({ pref: 1 });
});
});
describe('patchPreferences', () => {
it('should patch preferences and return params', async () => {
mockHttpClient.patch.mockResolvedValue({});
const params = { visibility_bio: true };
const result = await patchPreferences('john', params);
expect(result).toBe(params);
expect(snakeCaseObject).toHaveBeenCalledWith(params);
expect(convertKeyNames).toHaveBeenCalled();
});
});
describe('getCourseCertificates', () => {
it('should return transformed certificates', async () => {
mockHttpClient.get.mockResolvedValue({
data: [{ download_url: '/path', certificate_type: 'type' }],
});
const result = await getCourseCertificates('john');
expect(result[0]).toHaveProperty('downloadUrl', 'http://fake-lms/path');
});
it('should log error and return empty array on failure', async () => {
mockHttpClient.get.mockRejectedValue(new Error('fail'));
const result = await getCourseCertificates('john');
expect(result).toEqual([]);
expect(logError).toHaveBeenCalled();
});
});
describe('getCountryList', () => {
it('should extract country list', async () => {
mockHttpClient.get.mockResolvedValue({
data: {
fields: [
{ name: FIELD_LABELS.COUNTRY, options: [{ value: 'US' }, { value: 'CA' }] },
],
},
});
const result = await getCountryList();
expect(result).toEqual(['US', 'CA']);
});
it('should log error and return empty array on failure', async () => {
mockHttpClient.get.mockRejectedValue(new Error('fail'));
const result = await getCountryList();
expect(result).toEqual([]);
expect(logError).toHaveBeenCalled();
});
});
});

View File

@@ -1,145 +1,140 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { ValidationFormGroup } from '@edx/paragon';
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import { Form } from '@openedx/paragon';
import classNames from 'classnames';
import messages from './Bio.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import EmptyContent from './elements/EmptyContent';
import SwitchContent from './elements/SwitchContent';
// Selectors
import { editableFormSelector } from '../data/selectors';
import {
useCloseOpenHandler,
useHandleChange,
useHandleSubmit,
useIsOnMobileScreen,
useIsVisibilityEnabled,
} from '../data/hooks';
class Bio extends React.Component {
constructor(props) {
super(props);
const Bio = ({
formId,
bio,
visibilityBio,
editMode,
saveState,
error,
changeHandler,
submitHandler,
closeHandler,
openHandler,
}) => {
const isMobileView = useIsOnMobileScreen();
const isVisibilityEnabled = useIsVisibilityEnabled();
const intl = useIntl();
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
const handleChange = useHandleChange(changeHandler);
const handleSubmit = useHandleSubmit(submitHandler, formId);
const handleOpen = useCloseOpenHandler(openHandler, formId);
const handleClose = useCloseOpenHandler(closeHandler, formId);
handleChange(e) {
const { name, value } = e.target;
this.props.changeHandler(name, value);
}
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
handleClose() {
this.props.closeHandler(this.props.formId);
}
handleOpen() {
this.props.openHandler(this.props.formId);
}
render() {
const {
formId, bio, visibilityBio, editMode, saveState, error, intl,
} = this.props;
return (
<SwitchContent
className="mb-5"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={this.handleSubmit}>
<ValidationFormGroup
for={formId}
invalid={error !== null}
invalidMessage={error}
>
<label className="edit-section-header" htmlFor={formId}>
{intl.formatMessage(messages['profile.bio.about.me'])}
</label>
<textarea
className="form-control"
id={formId}
name={formId}
value={bio}
onChange={this.handleChange}
/>
</ValidationFormGroup>
<FormControls
visibilityId="visibilityBio"
saveState={saveState}
visibility={visibilityBio}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
return (
<SwitchContent
className={classNames([
isMobileView ? 'pt-40px' : 'pt-0',
])}
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={handleSubmit}>
<Form.Group
controlId={formId}
className="m-0 pb-3"
isInvalid={error !== null}
>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-2.5">
{intl.formatMessage(messages['profile.bio.about.me'])}
</p>
<textarea
className="form-control py-10px"
id={formId}
name={formId}
value={bio}
onChange={handleChange}
/>
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.bio.about.me'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityBio !== null}
{error !== null && (
<Form.Control.Feedback hasIcon={false}>
{error}
</Form.Control.Feedback>
)}
</Form.Group>
<FormControls
visibilityId="visibilityBio"
saveState={saveState}
visibility={visibilityBio}
cancelHandler={handleClose}
changeHandler={handleChange}
/>
<p data-hj-suppress className="lead">{bio}</p>
</>
),
empty: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.bio.about.me'])} />
<EmptyContent onClick={this.handleOpen}>
<FormattedMessage
id="profile.bio.empty"
defaultMessage="Add a short bio"
description="instructions when the user hasn't written an About Me"
/>
</EmptyContent>
</>
),
static: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.bio.about.me'])} />
<p data-hj-suppress className="lead">{bio}</p>
</>
),
}}
/>
);
}
}
</form>
</div>
),
editable: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.bio.about.me'])}
</p>
<EditableItemHeader
content={bio}
showEditButton
onClickEdit={handleOpen}
showVisibility={visibilityBio !== null && isVisibilityEnabled}
visibility={visibilityBio}
/>
</>
),
empty: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.bio.about.me'])}
</p>
<EmptyContent onClick={handleOpen}>
<FormattedMessage
id="profile.bio.empty"
defaultMessage="Add a short bio"
description="instructions when the user hasn't written an About Me"
/>
</EmptyContent>
</>
),
static: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.bio.about.me'])}
</p>
<EditableItemHeader content={bio} />
</>
),
}}
/>
);
};
Bio.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
bio: PropTypes.string,
visibilityBio: PropTypes.oneOf(['private', 'all_users']),
editMode: PropTypes.oneOf(['editing', 'editable', 'empty', 'static']),
saveState: PropTypes.string,
error: PropTypes.string,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
};
Bio.defaultProps = {
@@ -153,4 +148,4 @@ Bio.defaultProps = {
export default connect(
editableFormSelector,
{},
)(injectIntl(Bio));
)(Bio);

View File

@@ -3,7 +3,7 @@ import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'profile.bio.about.me': {
id: 'profile.bio.about.me',
defaultMessage: 'About Me',
defaultMessage: 'Bio',
description: 'A section of a user profile',
},
});

View File

@@ -1,231 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
FormattedDate, FormattedMessage, injectIntl, intlShape,
} from '@edx/frontend-platform/i18n';
import { Hyperlink } from '@edx/paragon';
import { connect } from 'react-redux';
import get from 'lodash.get';
import messages from './Certificates.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import SwitchContent from './elements/SwitchContent';
// Assets
import professionalCertificateSVG from '../assets/professional-certificate.svg';
import verifiedCertificateSVG from '../assets/verified-certificate.svg';
// Selectors
import { certificatesSelector } from '../data/selectors';
class Certificates extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
handleChange(e) {
const { name, value } = e.target;
this.props.changeHandler(name, value);
}
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
handleClose() {
this.props.closeHandler(this.props.formId);
}
handleOpen() {
this.props.openHandler(this.props.formId);
}
renderCertificate({
certificateType, courseDisplayName, courseOrganization, modifiedDate, downloadUrl, courseId,
}) {
const { intl } = this.props;
const certificateIllustration = (() => {
switch (certificateType) {
case 'professional':
case 'no-id-professional':
return professionalCertificateSVG;
case 'verified':
return verifiedCertificateSVG;
case 'honor':
case 'audit':
default:
return null;
}
})();
return (
<div key={`${modifiedDate}-${courseId}`} className="col col-sm-6 d-flex align-items-stretch">
<div className="card mb-4 certificate flex-grow-1">
<div
className="certificate-type-illustration"
style={{ backgroundImage: `url(${certificateIllustration})` }}
/>
<div className="card-body d-flex flex-column">
<div className="card-title">
<p className="small mb-0">
{intl.formatMessage(get(
messages,
`profile.certificates.types.${certificateType}`,
messages['profile.certificates.types.unknown'],
))}
</p>
<h4 className="certificate-title">{courseDisplayName}</h4>
</div>
<p className="small mb-0">
<FormattedMessage
id="profile.certificate.organization.label"
defaultMessage="From"
/>
</p>
<p className="h6 mb-4">{courseOrganization}</p>
<div className="flex-grow-1" />
<p className="small mb-2">
<FormattedMessage
id="profile.certificate.completion.date.label"
defaultMessage="Completed on {date}"
values={{
date: <FormattedDate value={new Date(modifiedDate)} />,
}}
/>
</p>
<div>
<Hyperlink destination={downloadUrl} className="btn btn-outline-primary" target="_blank">
{intl.formatMessage(messages['profile.certificates.view.certificate'])}
</Hyperlink>
</div>
</div>
</div>
</div>
);
}
renderCertificates() {
if (this.props.certificates === null || this.props.certificates.length === 0) {
return (
<FormattedMessage
id="profile.no.certificates"
defaultMessage="You don't have any certificates yet."
description="displays when user has no course completion certificates"
/>
);
}
return (
<div className="row align-items-stretch">{this.props.certificates.map(certificate => this.renderCertificate(certificate))}</div>
);
}
render() {
const {
visibilityCourseCertificates, editMode, saveState, intl,
} = this.props;
return (
<SwitchContent
className="mb-4"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby="course-certificates-label">
<form onSubmit={this.handleSubmit}>
<EditableItemHeader
headingId="course-certificates-label"
content={intl.formatMessage(messages['profile.certificates.my.certificates'])}
/>
<FormControls
visibilityId="visibilityCourseCertificates"
saveState={saveState}
visibility={visibilityCourseCertificates}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
/>
{this.renderCertificates()}
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.certificates.my.certificates'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityCourseCertificates !== null}
visibility={visibilityCourseCertificates}
/>
{this.renderCertificates()}
</>
),
empty: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.certificates.my.certificates'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityCourseCertificates !== null}
visibility={visibilityCourseCertificates}
/>
{this.renderCertificates()}
</>
),
static: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.certificates.my.certificates'])} />
{this.renderCertificates()}
</>
),
}}
/>
);
}
}
Certificates.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
certificates: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.string,
})),
visibilityCourseCertificates: PropTypes.oneOf(['private', 'all_users']),
editMode: PropTypes.oneOf(['editing', 'editable', 'empty', 'static']),
saveState: PropTypes.string,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
};
Certificates.defaultProps = {
editMode: 'static',
saveState: null,
visibilityCourseCertificates: 'private',
certificates: null,
};
export default connect(
certificatesSelector,
{},
)(injectIntl(Certificates));

View File

@@ -1,168 +1,152 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { ValidationFormGroup } from '@edx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Form } from '@openedx/paragon';
import messages from './Country.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import EmptyContent from './elements/EmptyContent';
import SwitchContent from './elements/SwitchContent';
// Selectors
import { countrySelector } from '../data/selectors';
import {
useCloseOpenHandler,
useHandleChange,
useHandleSubmit,
useIsVisibilityEnabled,
} from '../data/hooks';
class Country extends React.Component {
constructor(props) {
super(props);
const Country = ({
formId,
country,
visibilityCountry,
editMode,
saveState,
error,
translatedCountries,
countriesCodesList,
countryMessages,
changeHandler,
submitHandler,
closeHandler,
openHandler,
}) => {
const isVisibilityEnabled = useIsVisibilityEnabled();
const intl = useIntl();
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
const handleChange = useHandleChange(changeHandler);
const handleSubmit = useHandleSubmit(submitHandler, formId);
const handleOpen = useCloseOpenHandler(openHandler, formId);
const handleClose = useCloseOpenHandler(closeHandler, formId);
handleChange(e) {
const {
name,
value,
} = e.target;
this.props.changeHandler(name, value);
}
const isDisabledCountry = (countryCode) => countriesCodesList.length > 0
&& !countriesCodesList.find(code => code === countryCode);
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
handleClose() {
this.props.closeHandler(this.props.formId);
}
handleOpen() {
this.props.openHandler(this.props.formId);
}
render() {
const {
formId,
country,
visibilityCountry,
editMode,
saveState,
error,
intl,
sortedCountries,
countryMessages,
} = this.props;
return (
<SwitchContent
className="mb-5"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={this.handleSubmit}>
<ValidationFormGroup
for={formId}
invalid={error !== null}
invalidMessage={error}
return (
<SwitchContent
className="pt-40px"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={handleSubmit}>
<Form.Group
controlId={formId}
className="m-0 pb-3"
isInvalid={error !== null}
>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-2.5">
{intl.formatMessage(messages['profile.country.label'])}
</p>
<select
data-hj-suppress
className="form-control py-10px"
type="select"
id={formId}
name={formId}
value={country}
onChange={handleChange}
>
<label className="edit-section-header" htmlFor={formId}>
{intl.formatMessage(messages['profile.country.label'])}
</label>
<select
data-hj-suppress
className="form-control"
type="select"
id={formId}
name={formId}
value={country}
onChange={this.handleChange}
>
<option value="">&nbsp;</option>
{sortedCountries.map(({ code, name }) => (
<option key={code} value={code}>{name}</option>
))}
</select>
</ValidationFormGroup>
<FormControls
visibilityId="visibilityCountry"
saveState={saveState}
visibility={visibilityCountry}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
/>
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.country.label'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityCountry !== null}
<option value=""> </option>
{translatedCountries.map(({ code, name }) => (
<option key={code} value={code} disabled={isDisabledCountry(code)}>
{name}
</option>
))}
</select>
{error !== null && (
<Form.Control.Feedback hasIcon={false}>
{error}
</Form.Control.Feedback>
)}
</Form.Group>
<FormControls
visibilityId="visibilityCountry"
saveState={saveState}
visibility={visibilityCountry}
cancelHandler={handleClose}
changeHandler={handleChange}
/>
<p data-hj-suppress className="h5">{countryMessages[country]}</p>
</>
),
empty: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.country.label'])}
/>
<EmptyContent onClick={this.handleOpen}>
{intl.formatMessage(messages['profile.country.empty'])}
</EmptyContent>
</>
),
static: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.country.label'])}
/>
<p data-hj-suppress className="h5">{countryMessages[country]}</p>
</>
),
}}
/>
);
}
}
</form>
</div>
),
editable: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.country.label'])}
</p>
<EditableItemHeader
content={countryMessages[country]}
showEditButton
onClickEdit={handleOpen}
showVisibility={visibilityCountry !== null && isVisibilityEnabled}
visibility={visibilityCountry}
/>
</>
),
empty: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.country.label'])}
</p>
<EmptyContent onClick={handleOpen}>
{intl.formatMessage(messages['profile.country.empty'])}
</EmptyContent>
</>
),
static: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.country.label'])}
</p>
<EditableItemHeader content={countryMessages[country]} />
</>
),
}}
/>
);
};
Country.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
country: PropTypes.string,
visibilityCountry: PropTypes.oneOf(['private', 'all_users']),
editMode: PropTypes.oneOf(['editing', 'editable', 'empty', 'static']),
saveState: PropTypes.string,
error: PropTypes.string,
sortedCountries: PropTypes.arrayOf(PropTypes.shape({
translatedCountries: PropTypes.arrayOf(PropTypes.shape({
code: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
})).isRequired,
countriesCodesList: PropTypes.arrayOf(PropTypes.string).isRequired,
countryMessages: PropTypes.objectOf(PropTypes.string).isRequired,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
};
Country.defaultProps = {
@@ -176,4 +160,4 @@ Country.defaultProps = {
export default connect(
countrySelector,
{},
)(injectIntl(Country));
)(Country);

View File

@@ -3,12 +3,12 @@ import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'profile.country.label': {
id: 'profile.country.label',
defaultMessage: 'Location',
defaultMessage: 'Country',
description: 'The label for a country in a user profile.',
},
'profile.country.empty': {
id: 'profile.country.empty',
defaultMessage: 'Add location',
defaultMessage: 'Add country',
description: 'The affordance to add country location to a users profile.',
},
});

View File

@@ -1,176 +1,160 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import get from 'lodash.get';
import { ValidationFormGroup } from '@edx/paragon';
import { Form } from '@openedx/paragon';
import messages from './Education.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import EmptyContent from './elements/EmptyContent';
import SwitchContent from './elements/SwitchContent';
// Constants
import { EDUCATION_LEVELS } from '../data/constants';
// Selectors
import { editableFormSelector } from '../data/selectors';
import {
useCloseOpenHandler,
useHandleChange,
useHandleSubmit,
useIsVisibilityEnabled,
} from '../data/hooks';
class Education extends React.Component {
constructor(props) {
super(props);
const Education = ({
formId,
levelOfEducation,
visibilityLevelOfEducation,
editMode,
saveState,
error,
changeHandler,
submitHandler,
closeHandler,
openHandler,
}) => {
const isVisibilityEnabled = useIsVisibilityEnabled();
const intl = useIntl();
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
const handleChange = useHandleChange(changeHandler);
const handleSubmit = useHandleSubmit(submitHandler, formId);
const handleOpen = useCloseOpenHandler(openHandler, formId);
const handleClose = useCloseOpenHandler(closeHandler, formId);
handleChange(e) {
const {
name,
value,
} = e.target;
this.props.changeHandler(name, value);
}
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
handleClose() {
this.props.closeHandler(this.props.formId);
}
handleOpen() {
this.props.openHandler(this.props.formId);
}
render() {
const {
formId, levelOfEducation, visibilityLevelOfEducation, editMode, saveState, error, intl,
} = this.props;
return (
<SwitchContent
className="mb-5"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={this.handleSubmit}>
<ValidationFormGroup
for={formId}
invalid={error !== null}
invalidMessage={error}
return (
<SwitchContent
className="pt-40px"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={handleSubmit}>
<Form.Group
controlId={formId}
className="m-0 pb-3"
isInvalid={error !== null}
>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-2.5">
{intl.formatMessage(messages['profile.education.education'])}
</p>
<select
data-hj-suppress
className="form-control py-10px"
id={formId}
name={formId}
value={levelOfEducation}
onChange={handleChange}
>
<label className="edit-section-header" htmlFor={formId}>
{intl.formatMessage(messages['profile.education.education'])}
</label>
<select
data-hj-suppress
className="form-control"
id={formId}
name={formId}
value={levelOfEducation}
onChange={this.handleChange}
>
<option value="">&nbsp;</option>
{EDUCATION_LEVELS.map(level => (
<option key={level} value={level}>
{intl.formatMessage(get(
messages,
`profile.education.levels.${level}`,
messages['profile.education.levels.o'],
))}
</option>
))}
</select>
</ValidationFormGroup>
<FormControls
visibilityId="visibilityLevelOfEducation"
saveState={saveState}
visibility={visibilityLevelOfEducation}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
/>
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.education.education'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityLevelOfEducation !== null}
<option value=""> </option>
{EDUCATION_LEVELS.map(level => (
<option key={level} value={level}>
{intl.formatMessage(get(
messages,
`profile.education.levels.${level}`,
messages['profile.education.levels.o'],
))}
</option>
))}
</select>
{error !== null && (
<Form.Control.Feedback hasIcon={false}>
{error}
</Form.Control.Feedback>
)}
</Form.Group>
<FormControls
visibilityId="visibilityLevelOfEducation"
saveState={saveState}
visibility={visibilityLevelOfEducation}
cancelHandler={handleClose}
changeHandler={handleChange}
/>
<p data-hj-suppress className="h5">
{intl.formatMessage(get(
messages,
`profile.education.levels.${levelOfEducation}`,
messages['profile.education.levels.o'],
))}
</p>
</>
),
empty: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.education.education'])} />
<EmptyContent onClick={this.handleOpen}>
<FormattedMessage
id="profile.education.empty"
defaultMessage="Add education"
description="instructions when the user doesn't have their level of education set"
/>
</EmptyContent>
</>
),
static: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.education.education'])} />
<p data-hj-suppress className="h5">
{intl.formatMessage(get(
messages,
`profile.education.levels.${levelOfEducation}`,
messages['profile.education.levels.o'],
))}
</p>
</>
),
}}
/>
);
}
}
</form>
</div>
),
editable: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.education.education'])}
</p>
<EditableItemHeader
content={intl.formatMessage(get(
messages,
`profile.education.levels.${levelOfEducation}`,
messages['profile.education.levels.o'],
))}
showEditButton
onClickEdit={handleOpen}
showVisibility={visibilityLevelOfEducation !== null && isVisibilityEnabled}
visibility={visibilityLevelOfEducation}
/>
</>
),
empty: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.education.education'])}
</p>
<EmptyContent onClick={handleOpen}>
<FormattedMessage
id="profile.education.empty"
defaultMessage="Add level of education"
description="instructions when the user doesn't have their level of education set"
/>
</EmptyContent>
</>
),
static: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.education.education'])}
</p>
<EditableItemHeader
content={intl.formatMessage(get(
messages,
`profile.education.levels.${levelOfEducation}`,
messages['profile.education.levels.o'],
))}
/>
</>
),
}}
/>
);
};
Education.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
levelOfEducation: PropTypes.string,
visibilityLevelOfEducation: PropTypes.oneOf(['private', 'all_users']),
editMode: PropTypes.oneOf(['editing', 'editable', 'empty', 'static']),
saveState: PropTypes.string,
error: PropTypes.string,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
};
Education.defaultProps = {
@@ -184,4 +168,4 @@ Education.defaultProps = {
export default connect(
editableFormSelector,
{},
)(injectIntl(Education));
)(Education);

View File

@@ -1,147 +1,182 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { useIntl } from '@edx/frontend-platform/i18n';
import { InfoOutline } from '@openedx/paragon/icons';
import { Hyperlink, OverlayTrigger, Tooltip } from '@openedx/paragon';
import messages from './Name.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import EmptyContent from './elements/EmptyContent';
import SwitchContent from './elements/SwitchContent';
// Selectors
import { editableFormSelector } from '../data/selectors';
import {
useCloseOpenHandler,
useHandleChange,
useHandleSubmit,
useIsVisibilityEnabled,
} from '../data/hooks';
class Name extends React.Component {
constructor(props) {
super(props);
const Name = ({
formId,
name,
visibilityName,
editMode,
saveState,
changeHandler,
submitHandler,
closeHandler,
openHandler,
accountSettingsUrl,
}) => {
const isVisibilityEnabled = useIsVisibilityEnabled();
const intl = useIntl();
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
const handleChange = useHandleChange(changeHandler);
const handleSubmit = useHandleSubmit(submitHandler, formId);
const handleOpen = useCloseOpenHandler(openHandler, formId);
const handleClose = useCloseOpenHandler(closeHandler, formId);
handleChange(e) {
const {
name,
value,
} = e.target;
this.props.changeHandler(name, value);
}
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
handleClose() {
this.props.closeHandler(this.props.formId);
}
handleOpen() {
this.props.openHandler(this.props.formId);
}
render() {
const {
formId, name, visibilityName, editMode, saveState, intl,
} = this.props;
return (
<SwitchContent
className="mb-5"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={this.handleSubmit}>
<div className="form-group">
<EditableItemHeader content={intl.formatMessage(messages['profile.name.full.name'])} />
{/*
This isn't a mistake - the name field should not be editable. But if it were,
you'd find the original code got deleted in the commit which added this comment.
-djoy
TODO: Relatedly, the plumbing for editing the name field is still in place.
Once we're super sure we don't want it back, you could delete the name props and
such to fully get rid of it.
*/}
<p data-hj-suppress className="h5">{name}</p>
<small className="form-text text-muted" id={`${formId}-help-text`}>
{intl.formatMessage(messages['profile.name.details'])}
</small>
return (
<SwitchContent
className="pt-40px"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={handleSubmit}>
<div className="form-group">
<div className="row m-0 pb-2.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
{intl.formatMessage(messages['profile.name.full.name'])}
</p>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.name.tooltip'])}
</p>
</Tooltip>
)}
>
<InfoOutline className="m-0 info-icon" />
</OverlayTrigger>
</div>
<FormControls
visibilityId="visibilityName"
saveState={saveState}
visibility={visibilityName}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
/>
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.name.full.name'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityName !== null}
<EditableItemHeader content={name} />
<h4 className="font-weight-normal">
<Hyperlink destination={accountSettingsUrl} target="_blank">
{intl.formatMessage(messages['profile.name.redirect'])}
</Hyperlink>
</h4>
</div>
<FormControls
visibilityId="visibilityName"
saveState={saveState}
visibility={visibilityName}
cancelHandler={handleClose}
changeHandler={handleChange}
/>
<p data-hj-suppress className="h5">{name}</p>
<small className="form-text text-muted">
{intl.formatMessage(messages['profile.name.details'])}
</small>
</>
),
empty: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.name.full.name'])} />
<EmptyContent onClick={this.handleOpen}>
{intl.formatMessage(messages['profile.name.empty'])}
</EmptyContent>
<small className="form-text text-muted">
{intl.formatMessage(messages['profile.name.details'])}
</small>
</>
),
static: (
<>
<EditableItemHeader content={intl.formatMessage(messages['profile.name.full.name'])} />
<p data-hj-suppress className="h5">{name}</p>
</>
),
}}
/>
);
}
}
</form>
</div>
),
editable: (
<>
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
{intl.formatMessage(messages['profile.name.full.name'])}
</p>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.name.tooltip'])}
</p>
</Tooltip>
)}
>
<InfoOutline className="m-0 info-icon" />
</OverlayTrigger>
</div>
<EditableItemHeader
content={name}
showEditButton
onClickEdit={handleOpen}
showVisibility={visibilityName !== null && isVisibilityEnabled}
visibility={visibilityName}
/>
</>
),
empty: (
<>
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
{intl.formatMessage(messages['profile.name.full.name'])}
</p>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.name.tooltip'])}
</p>
</Tooltip>
)}
>
<InfoOutline className="m-0 info-icon" />
</OverlayTrigger>
</div>
<EmptyContent onClick={handleOpen}>
{intl.formatMessage(messages['profile.name.empty'])}
</EmptyContent>
</>
),
static: (
<>
<div className="row m-0 pb-1.5 align-items-center">
<p data-hj-suppress className="h5 font-weight-bold m-0">
{intl.formatMessage(messages['profile.name.full.name'])}
</p>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.name.tooltip'])}
</p>
</Tooltip>
)}
>
<InfoOutline className="m-0 info-icon" />
</OverlayTrigger>
</div>
<EditableItemHeader content={name} />
</>
),
}}
/>
);
};
Name.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
name: PropTypes.string,
visibilityName: PropTypes.oneOf(['private', 'all_users']),
editMode: PropTypes.oneOf(['editing', 'editable', 'empty', 'static']),
saveState: PropTypes.string,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
accountSettingsUrl: PropTypes.string.isRequired,
};
Name.defaultProps = {
@@ -154,4 +189,4 @@ Name.defaultProps = {
export default connect(
editableFormSelector,
{},
)(injectIntl(Name));
)(Name);

View File

@@ -3,19 +3,24 @@ import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
'profile.name.full.name': {
id: 'profile.name.full.name',
defaultMessage: 'Full Name',
defaultMessage: 'Full name',
description: 'A section of a user profile',
},
'profile.name.details': {
id: 'profile.name.details',
defaultMessage: 'This is the name that appears in your account and on your certificates.',
description: 'Describes the area for a user to update their name.',
},
'profile.name.empty': {
id: 'profile.name.empty',
defaultMessage: 'Add name',
defaultMessage: 'Add full name',
description: 'The affordance to add a name to a users profile.',
},
'profile.name.tooltip': {
id: 'profile.name.tooltip',
defaultMessage: 'The name that is used for ID verification and that appears on your certificates',
description: 'Tooltip for the full name field.',
},
'profile.name.redirect': {
id: 'profile.name.redirect',
defaultMessage: 'Edit full name from the Accounts page',
description: 'Redirect message for editing the name from the Accounts page.',
},
});
export default messages;

View File

@@ -1,162 +1,140 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { ValidationFormGroup } from '@edx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Form } from '@openedx/paragon';
import messages from './PreferredLanguage.messages';
// Components
import FormControls from './elements/FormControls';
import EditableItemHeader from './elements/EditableItemHeader';
import EmptyContent from './elements/EmptyContent';
import SwitchContent from './elements/SwitchContent';
// Selectors
import { preferredLanguageSelector } from '../data/selectors';
import {
useCloseOpenHandler,
useHandleSubmit,
useIsVisibilityEnabled,
} from '../data/hooks';
class PreferredLanguage extends React.Component {
constructor(props) {
super(props);
const PreferredLanguage = ({
formId,
languageProficiencies,
visibilityLanguageProficiencies,
editMode,
saveState,
error,
sortedLanguages,
languageMessages,
changeHandler,
submitHandler,
closeHandler,
openHandler,
}) => {
const isVisibilityEnabled = useIsVisibilityEnabled();
const intl = useIntl();
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleOpen = this.handleOpen.bind(this);
}
handleChange(e) {
const { name, value } = e.target;
// Restructure the data.
// We deconstruct our value prop in render() so this
// changes our data's shape back to match what came in
if (name === this.props.formId) {
if (value !== '') {
this.props.changeHandler(name, [{ code: value }]);
} else {
this.props.changeHandler(name, []);
}
} else {
this.props.changeHandler(name, value);
const handleChange = ({ target: { name, value } }) => {
let newValue = value;
if (name === formId) {
newValue = value ? [{ code: value }] : [];
}
}
changeHandler(name, newValue);
};
handleSubmit(e) {
e.preventDefault();
this.props.submitHandler(this.props.formId);
}
const handleSubmit = useHandleSubmit(submitHandler, formId);
const handleOpen = useCloseOpenHandler(openHandler, formId);
const handleClose = useCloseOpenHandler(closeHandler, formId);
handleClose() {
this.props.closeHandler(this.props.formId);
}
const value = languageProficiencies.length ? languageProficiencies[0].code : '';
handleOpen() {
this.props.openHandler(this.props.formId);
}
render() {
const {
formId,
languageProficiencies,
visibilityLanguageProficiencies,
editMode,
saveState,
error,
intl,
sortedLanguages,
languageMessages,
} = this.props;
const value = languageProficiencies.length ? languageProficiencies[0].code : '';
return (
<SwitchContent
className="mb-5"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={this.handleSubmit}>
<ValidationFormGroup
for={formId}
invalid={error !== null}
invalidMessage={error}
return (
<SwitchContent
className="pt-40px"
expression={editMode}
cases={{
editing: (
<div role="dialog" aria-labelledby={`${formId}-label`}>
<form onSubmit={handleSubmit}>
<Form.Group
controlId={formId}
className="m-0 pb-3"
isInvalid={error !== null}
>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-2.5">
{intl.formatMessage(messages['profile.preferredlanguage.label'])}
</p>
<select
data-hj-suppress
id={formId}
name={formId}
className="form-control py-10px"
value={value}
onChange={handleChange}
>
<label className="edit-section-header" htmlFor={formId}>
{intl.formatMessage(messages['profile.preferredlanguage.label'])}
</label>
<select
data-hj-suppress
id={formId}
name={formId}
className="form-control"
value={value}
onChange={this.handleChange}
>
<option value="">&nbsp;</option>
{sortedLanguages.map(({ code, name }) => (
<option key={code} value={code}>{name}</option>
))}
</select>
</ValidationFormGroup>
<FormControls
visibilityId="visibilityLanguageProficiencies"
saveState={saveState}
visibility={visibilityLanguageProficiencies}
cancelHandler={this.handleClose}
changeHandler={this.handleChange}
/>
</form>
</div>
),
editable: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.preferredlanguage.label'])}
showEditButton
onClickEdit={this.handleOpen}
showVisibility={visibilityLanguageProficiencies !== null}
<option value=""> </option>
{sortedLanguages.map(({ code, name }) => (
<option key={code} value={code}>{name}</option>
))}
</select>
{error !== null && (
<Form.Control.Feedback hasIcon={false}>
{error}
</Form.Control.Feedback>
)}
</Form.Group>
<FormControls
visibilityId="visibilityLanguageProficiencies"
saveState={saveState}
visibility={visibilityLanguageProficiencies}
cancelHandler={handleClose}
changeHandler={handleChange}
/>
<p data-hj-suppress className="h5">{languageMessages[value]}</p>
</>
),
empty: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.preferredlanguage.label'])}
/>
<EmptyContent onClick={this.handleOpen}>
{intl.formatMessage(messages['profile.preferredlanguage.empty'])}
</EmptyContent>
</>
),
static: (
<>
<EditableItemHeader
content={intl.formatMessage(messages['profile.preferredlanguage.label'])}
/>
<p data-hj-suppress className="h5">{languageMessages[value]}</p>
</>
),
}}
/>
);
}
}
</form>
</div>
),
editable: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.preferredlanguage.label'])}
</p>
<EditableItemHeader
content={languageMessages[value]}
showEditButton
onClickEdit={handleOpen}
showVisibility={visibilityLanguageProficiencies !== null && isVisibilityEnabled}
visibility={visibilityLanguageProficiencies}
/>
</>
),
empty: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.preferredlanguage.label'])}
</p>
<EmptyContent onClick={handleOpen}>
{intl.formatMessage(messages['profile.preferredlanguage.empty'])}
</EmptyContent>
</>
),
static: (
<>
<p data-hj-suppress className="h5 font-weight-bold m-0 pb-1.5">
{intl.formatMessage(messages['profile.preferredlanguage.label'])}
</p>
<EditableItemHeader content={languageMessages[value]} />
</>
),
}}
/>
);
};
PreferredLanguage.propTypes = {
// It'd be nice to just set this as a defaultProps...
// except the class that comes out on the other side of react-redux's
// connect() method won't have it anymore. Static properties won't survive
// through the higher order function.
formId: PropTypes.string.isRequired,
// From Selector
languageProficiencies: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.shape({ code: PropTypes.string })),
// TODO: ProfilePageSelector should supply null values
// instead of empty strings when no value exists
PropTypes.oneOf(['']),
]),
visibilityLanguageProficiencies: PropTypes.oneOf(['private', 'all_users']),
@@ -168,15 +146,10 @@ PreferredLanguage.propTypes = {
name: PropTypes.string.isRequired,
})).isRequired,
languageMessages: PropTypes.objectOf(PropTypes.string).isRequired,
// Actions
changeHandler: PropTypes.func.isRequired,
submitHandler: PropTypes.func.isRequired,
closeHandler: PropTypes.func.isRequired,
openHandler: PropTypes.func.isRequired,
// i18n
intl: intlShape.isRequired,
};
PreferredLanguage.defaultProps = {
@@ -190,4 +163,4 @@ PreferredLanguage.defaultProps = {
export default connect(
preferredLanguageSelector,
{},
)(injectIntl(PreferredLanguage));
)(PreferredLanguage);

View File

@@ -8,7 +8,7 @@ const messages = defineMessages({
},
'profile.preferredlanguage.label': {
id: 'profile.preferredlanguage.label',
defaultMessage: 'Primary Language Spoken',
defaultMessage: 'Primary language spoken',
description: 'The label for a users primary spoken language.',
},
});

View File

@@ -1,158 +1,155 @@
import React from 'react';
import React, { useRef } from 'react';
import PropTypes from 'prop-types';
import { Button, Dropdown } from '@edx/paragon';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import {
Dropdown,
IconButton,
Icon,
Tooltip,
OverlayTrigger,
} from '@openedx/paragon';
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n';
import { PhotoCamera } from '@openedx/paragon/icons';
import { ReactComponent as DefaultAvatar } from '../assets/avatar.svg';
import messages from './ProfileAvatar.messages';
class ProfileAvatar extends React.Component {
constructor(props) {
super(props);
const ProfileAvatar = ({
src,
isDefault,
onSave,
onDelete,
savePhotoState,
isEditable,
}) => {
const intl = useIntl();
const fileInput = useRef(null);
const form = useRef(null);
this.fileInput = React.createRef();
this.form = React.createRef();
const onClickUpload = () => {
fileInput.current.click();
};
this.onClickUpload = this.onClickUpload.bind(this);
this.onClickDelete = this.onClickDelete.bind(this);
this.onChangeInput = this.onChangeInput.bind(this);
this.onSubmit = this.onSubmit.bind(this);
}
const onClickDelete = () => {
onDelete();
};
onClickUpload() {
this.fileInput.current.click();
}
onClickDelete() {
this.props.onDelete();
}
onChangeInput() {
this.onSubmit();
}
onSubmit(e) {
const onSubmit = (e) => {
if (e) {
e.preventDefault();
}
this.props.onSave(new FormData(this.form.current));
this.form.current.reset();
}
onSave(new FormData(form.current));
form.current.reset();
};
renderPending() {
return (
<div
className="position-absolute w-100 h-100 d-flex justify-content-center align-items-center rounded-circle"
style={{ backgroundColor: 'rgba(0,0,0,.65)' }}
>
<div className="spinner-border text-primary" role="status" />
</div>
);
}
const onChangeInput = () => {
onSubmit();
};
renderMenuContent() {
const { intl } = this.props;
const renderPending = () => (
<div
className="position-absolute w-100 h-100 d-flex justify-content-center align-items-center rounded-circle bg-black bg-opacity-65"
>
<div className="spinner-border text-primary" role="status" />
</div>
);
if (this.props.isDefault) {
return (
<Button
variant="link"
size="sm"
className="text-white btn-block"
onClick={this.onClickUpload}
>
<FormattedMessage
id="profile.profileavatar.upload-button"
defaultMessage="Upload Photo"
description="Upload photo button"
/>
</Button>
);
}
return (
<Dropdown>
<Dropdown.Toggle>
{intl.formatMessage(messages['profile.profileavatar.change-button'])}
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item type="button" onClick={this.onClickUpload}>
<FormattedMessage
id="profile.profileavatar.upload-button"
defaultMessage="Upload Photo"
description="Upload photo button"
/>
</Dropdown.Item>
<Dropdown.Item type="button" onClick={this.onClickDelete}>
<FormattedMessage
id="profile.profileavatar.remove.button"
defaultMessage="Remove"
description="Remove photo button"
/>
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
);
}
renderMenu() {
if (!this.props.isEditable) {
const renderEditButton = () => {
if (!isEditable) {
return null;
}
return (
<div className="profile-avatar-menu-container">
{this.renderMenuContent()}
<div className="profile-avatar-button">
<Dropdown>
<OverlayTrigger
key="top"
placement="top"
overlay={(
<Tooltip variant="light" id="tooltip-top">
{!isDefault ? (
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.profileavatar.tooltip.edit'])}
</p>
) : (
<p className="h5 font-weight-normal m-0 p-0">
{intl.formatMessage(messages['profile.profileavatar.tooltip.upload'])}
</p>
)}
</Tooltip>
)}
>
<Dropdown.Toggle
invertColors
isActive
id="dropdown-toggle-with-iconbutton"
as={IconButton}
src={PhotoCamera}
iconAs={Icon}
variant="primary"
className="shadow-sm"
/>
</OverlayTrigger>
<Dropdown.Menu className="min-width-179px p-0 m-0">
<Dropdown.Item type="button" onClick={onClickUpload}>
<FormattedMessage
id="profile.profileavatar.upload-button"
defaultMessage="Upload photo"
description="Upload photo button"
/>
</Dropdown.Item>
{!isDefault && (
<Dropdown.Item type="button" onClick={onClickDelete}>
<FormattedMessage
id="profile.profileavatar.remove.button"
defaultMessage="Remove photo"
description="Remove photo button"
/>
</Dropdown.Item>
)}
</Dropdown.Menu>
</Dropdown>
</div>
);
}
};
renderAvatar() {
const { intl } = this.props;
return this.props.isDefault ? (
const renderAvatar = () => (
isDefault ? (
<DefaultAvatar className="text-muted" role="img" aria-hidden focusable="false" viewBox="0 0 24 24" />
) : (
<img
data-hj-suppress
className="w-100 h-100 d-block rounded-circle overflow-hidden"
style={{ objectFit: 'cover' }}
className="w-100 h-100 d-block rounded-circle overflow-hidden object-fit-cover"
alt={intl.formatMessage(messages['profile.image.alt.attribute'])}
src={this.props.src}
src={src}
/>
);
}
)
);
render() {
return (
<div className="profile-avatar-wrap position-relative">
<div className="profile-avatar rounded-circle bg-light">
{this.props.savePhotoState === 'pending' ? this.renderPending() : this.renderMenu() }
{this.renderAvatar()}
</div>
<form
ref={this.form}
onSubmit={this.onSubmit}
encType="multipart/form-data"
>
{/* The name of this input must be 'file' */}
<input
className="d-none form-control-file"
ref={this.fileInput}
type="file"
name="file"
id="photo-file"
onChange={this.onChangeInput}
accept=".jpg, .jpeg, .png"
/>
</form>
return (
<div className="profile-avatar-wrap position-relative">
<div className="profile-avatar rounded-circle bg-light">
{savePhotoState === 'pending' && renderPending()}
{renderAvatar()}
</div>
);
}
}
export default injectIntl(ProfileAvatar);
{renderEditButton()}
<form
ref={form}
onSubmit={onSubmit}
encType="multipart/form-data"
>
<input
className="d-none form-control-file"
ref={fileInput}
type="file"
name="file"
id="photo-file"
onChange={onChangeInput}
accept=".jpg, .jpeg, .png"
/>
</form>
</div>
);
};
ProfileAvatar.propTypes = {
src: PropTypes.string,
@@ -161,7 +158,6 @@ ProfileAvatar.propTypes = {
onDelete: PropTypes.func.isRequired,
savePhotoState: PropTypes.oneOf([null, 'pending', 'complete', 'error']),
isEditable: PropTypes.bool,
intl: intlShape.isRequired,
};
ProfileAvatar.defaultProps = {
@@ -170,3 +166,5 @@ ProfileAvatar.defaultProps = {
savePhotoState: null,
isEditable: false,
};
export default ProfileAvatar;

View File

@@ -11,6 +11,16 @@ const messages = defineMessages({
defaultMessage: 'Change',
description: 'Change photo button',
},
'profile.profileavatar.tooltip.edit': {
id: 'profile.profileavatar.tooltip.edit',
defaultMessage: 'Edit photo',
description: 'Tooltip for edit photo button',
},
'profile.profileavatar.tooltip.upload': {
id: 'profile.profileavatar.tooltip.upload',
defaultMessage: 'Upload photo',
description: 'Tooltip for upload photo button',
},
});
export default messages;

Some files were not shown because too many files have changed in this diff Show More