Compare commits

...

93 Commits

Author SHA1 Message Date
Kristin Aoki
e2ccd1b56a feat: add studio footer for studio mfes 2023-10-02 10:49:55 -04:00
KristinAoki
c0f4b90505 Merge branch 'master' into KristinAoki/add-studio-footer 2023-10-02 10:30:49 -04:00
Mashal Malik
c3f5a07256 refactor: add @openedx in renovate automate configuration (#342)
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
2023-10-02 19:06:37 +05:00
renovate[bot]
7450b8f061 chore(deps): update dependency @edx/paragon to v21.3.1 2023-10-02 09:25:06 +00:00
renovate[bot]
677d72813e chore(deps): update dependency @edx/frontend-build to v12.9.17 2023-10-02 08:00:58 +00:00
KristinAoki
abe24fb46a fix: remove unnecessary test 2023-09-29 16:10:23 -07:00
KristinAoki
ce5396c9ab fix: remove unused message 2023-09-29 15:25:39 -07:00
KristinAoki
dc0982dfd2 fix: remove unused code 2023-09-29 15:20:37 -07:00
KristinAoki
a9f6ca8b77 feat: add studio footer 2023-09-29 15:14:53 -07:00
renovate[bot]
d2e790ce99 chore(deps): update dependency @edx/paragon to v21.2.0 2023-09-25 12:16:29 +00:00
renovate[bot]
f1bd7d2ec2 chore(deps): update dependency @edx/frontend-platform to v5.4.0 2023-09-25 10:41:58 +00:00
renovate[bot]
425616defe chore(deps): update dependency @edx/paragon to v21 (#335)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-25 11:30:07 +05:00
renovate[bot]
fca4a6bd29 chore(deps): update dependency semantic-release to v21.1.2 2023-09-18 12:03:06 +00:00
renovate[bot]
bdaaa8541f chore(deps): update dependency @edx/frontend-platform to v5.3.2 2023-09-18 11:17:44 +00:00
renovate[bot]
0fce9cd9f7 chore(deps): update dependency @edx/frontend-platform to v5.3.1 2023-09-07 12:42:41 +00:00
Mashal Malik
e4adba4f66 refactor: update lock file version (#331)
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
2023-08-31 12:44:46 +05:00
renovate[bot]
be8529246c chore(deps): update dependency semantic-release to v21.1.1 2023-08-28 13:35:14 +00:00
renovate[bot]
98f818e295 chore(deps): update dependency @edx/paragon to v20.46.2 2023-08-28 10:02:44 +00:00
renovate[bot]
fb869bc008 chore(deps): update dependency @edx/frontend-platform to v5.1.0 2023-08-21 15:37:16 +00:00
renovate[bot]
879f384809 fix(deps): update font awesome to v6.4.2 2023-08-21 14:20:50 +00:00
renovate[bot]
b65a80616b chore(deps): update dependency semantic-release to v21.0.9 2023-08-21 10:34:05 +00:00
renovate[bot]
d5f0bca2b7 chore(deps): update dependency @edx/frontend-build to v12.9.10 2023-08-21 07:38:30 +00:00
Syed Ali Abbas Zaidi
3e6eaa1ded feat: upgrade react router to v6 (#275)
* feat: upgrade react router to v6

* chore: update peer deps
2023-08-16 16:48:10 +05:00
renovate[bot]
48b56df115 chore(deps): update dependency @edx/frontend-platform to v4.6.1 2023-08-14 13:25:28 +00:00
renovate[bot]
1d2bfd8e40 chore(deps): update dependency @edx/frontend-build to v12.9.4 2023-08-14 09:47:01 +00:00
renovate[bot]
197f24a684 chore(deps): update dependency @edx/frontend-build to v12.9.3 2023-07-31 07:48:35 +00:00
renovate[bot]
0d6c99acbc chore(deps): update dependency @edx/frontend-build to v12.9.2 2023-07-24 12:20:51 +00:00
renovate[bot]
8213c3a66a chore(deps): update dependency @edx/paragon to v20.45.5 2023-07-24 09:23:45 +00:00
renovate[bot]
a6ae384f7e chore(deps): update dependency @edx/frontend-build to v12.8.66 2023-07-17 09:34:35 +00:00
renovate[bot]
dd612879e2 chore(deps): update dependency @edx/paragon to v20.45.2 2023-07-17 06:06:51 +00:00
renovate[bot]
248bab9370 chore(deps): update dependency @edx/frontend-build to v12.8.65 (#318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 10:05:15 +05:00
renovate[bot]
92c879bf8f chore(deps): update dependency @edx/paragon to v20.45.1 2023-07-14 17:20:12 +00:00
Bilal Qamar
16275a2ecc fix: updated frontend-build to resolve word-wrap ReDoS vulnerability (#316) 2023-07-11 18:02:41 +05:00
renovate[bot]
970ca113e9 chore(deps): update dependency semantic-release to v21.0.7 2023-07-10 10:51:17 +00:00
renovate[bot]
65c459c53e chore(deps): update dependency @edx/frontend-build to v12.8.60 2023-07-10 06:09:06 +00:00
Bilal Qamar
961faafd3a fix: updated frontend-build to bump eslint version (#312)
* chore: updated frontend-build to bump eslint version

* refactor: updated package-lock
2023-07-06 18:12:51 +05:00
Bilal Qamar
16b468bdcc feat: update react & react-dom to v17 (#300)
* feat: update react & react-dom to v17

* build: update lock file

* build: update paragon version

* refactor: updated frontend-platform

---------

Co-authored-by: mashal-m <mashal.malik@arbisoft.com>
2023-07-05 12:09:22 +05:00
renovate[bot]
91d6ea6572 chore(deps): update dependency @edx/reactifex to v2.2.0 2023-07-03 14:20:16 +00:00
renovate[bot]
e13c7a6349 chore(deps): update dependency @edx/paragon to v20.45.0 2023-07-03 09:03:40 +00:00
renovate[bot]
ec288a6430 chore(deps): update dependency semantic-release to v21.0.6 2023-07-03 06:01:09 +00:00
renovate[bot]
10335c8075 chore(deps): update dependency @edx/frontend-build to v12.8.57 2023-06-26 07:55:51 +00:00
renovate[bot]
e09f1af861 chore(deps): update dependency @edx/browserslist-config to v1.2.0 2023-06-19 16:48:07 +00:00
renovate[bot]
c1e5885ecb chore(deps): update dependency @edx/frontend-build to v12.8.54 2023-06-19 10:14:52 +00:00
renovate[bot]
7849899658 chore(deps): update dependency semantic-release to v21.0.5 2023-06-12 12:46:28 +00:00
renovate[bot]
c508632126 chore(deps): update dependency @edx/frontend-build to v12.8.51 2023-06-12 09:04:04 +00:00
renovate[bot]
ef148e8d35 chore(deps): update dependency semantic-release to v21.0.3 2023-06-05 17:33:49 +00:00
renovate[bot]
b8a162f9c9 chore(deps): update dependency @edx/frontend-platform to v4.5.1 2023-06-05 12:33:51 +00:00
renovate[bot]
5643296f04 chore(deps): update dependency @edx/frontend-build to v12.8.40 2023-06-05 07:35:03 +00:00
renovate[bot]
5cf89420b3 chore(deps): update dependency @edx/frontend-platform to v4.5.0 2023-05-29 10:24:44 +00:00
renovate[bot]
176eb22711 chore(deps): update dependency @edx/frontend-build to v12.8.38 2023-05-29 08:07:48 +00:00
renovate[bot]
4380dd2a14 chore(deps): update dependency @edx/frontend-build to v12.8.27 2023-05-08 07:03:09 +00:00
renovate[bot]
a0080cd4ef chore(deps): update dependency semantic-release to v21.0.2 2023-05-01 12:16:03 +00:00
renovate[bot]
1f80f98acc chore(deps): update dependency @edx/frontend-build to v12.8.16 2023-05-01 08:21:01 +00:00
Bilal Qamar
d7ed4bfaf2 feat!: upgraded to node v18, added .nvmrc and updated workflows (#290)
BREAKING CHANGE: Ending support of @edx/frontend-platform v2 and v3 and now only support v4 with
2023-04-20 19:06:00 +05:00
Bilal Qamar
898e23d4bd fix: reverted node v18 upgrade in favor of major release (#289) 2023-04-20 16:53:03 +05:00
Brian Smith
7c07480f31 fix: release frontend-platform version update 2023-04-19 13:07:00 -04:00
renovate[bot]
f956c0ac93 chore(deps): update dependency semantic-release to v21 (#282)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 13:21:07 +05:00
renovate[bot]
d625329324 chore(deps): update dependency @edx/frontend-build to v12.8.10 (#287)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 12:13:43 +05:00
Omar Al-Ithawi
01ccaa6988 chore(deps): update frontend-platform version (#286)
Adds the intl-imports.js script for FC-0012 OEP-58.
2023-04-13 16:57:17 -04:00
Mashal Malik
c0dd43ce4a fix: update http-cache-semantics to 4.1.1 (#285) 2023-04-11 12:34:58 +05:00
Mashal Malik
56469df0b5 chore: Update peer dependency for react and react-dom (#284)
* refactor: remove react16 from peer dependency

* fix: update lock file and fix lint

* refactor: add 17 support of react in peerDep
2023-04-05 16:24:48 +05:00
renovate[bot]
0de4ad621e fix(deps): update font awesome to v6.4.0 2023-04-03 10:56:21 +00:00
Bilal Qamar
5d50e59672 feat: upgraded to node v18, added .nvmrc and updated workflows (#274)
* feat: upgraded to node v18, added .nvmrc and updated workflows

* refactor: upgraded frontend-build & frontend-platform
2023-03-29 16:44:40 +05:00
renovate[bot]
c715f0c4d4 chore(deps): update dependency @edx/paragon to v20.29.0 2023-03-27 06:46:26 +00:00
renovate[bot]
a62124ddf2 chore(deps): update dependency @edx/frontend-build to v12.7.0 2023-03-27 04:56:09 +00:00
renovate[bot]
8c222ddb0a chore(deps): update dependency @edx/frontend-build to v12.6.2 2023-03-24 09:02:39 +00:00
renovate[bot]
b4031ce345 chore(deps): update dependency @edx/paragon to v20.28.5 2023-03-20 11:42:17 +00:00
renovate[bot]
b787f5ecfe chore(deps): update dependency @edx/frontend-platform to v3.6.0 2023-03-20 08:47:07 +00:00
Yoiber
f87d47f42d chore(i18n): add more languages (#270)
* chore(i18n): add more languages

* chore(i18n): Pylint fixes
2023-03-14 20:25:36 +05:00
Mashal Malik
818ed5d179 chore: update transifex api from v2 to v3 (#272)
* chore: Update transifex api from v2 to v3

* refactor: remove duplicate line
2023-03-06 17:57:21 +05:00
Feanil Patel
07eb5892da Merge pull request #271 from openedx/repo_checks/ensure_workflows
Update standard workflow files.
2023-02-24 11:44:53 -05:00
Feanil Patel
3b8b18051f 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:02:05 -05:00
Feanil Patel
1c719d63cb 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:02:04 -05:00
Feanil Patel
dc7d2fadff 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:02:03 -05:00
renovate[bot]
b710800b2a fix(deps): update font awesome to v6.3.0 2023-02-13 13:41:53 +00:00
renovate[bot]
74ff35ae9a chore(deps): update dependency husky to v8 (#249)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-01 15:07:15 +05:00
renovate[bot]
e6835f9c56 fix(deps): update font awesome to v6 (#258)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2023-02-01 15:00:03 +05:00
renovate[bot]
a0c19faa92 chore(deps): update dependency redux to v4.2.1 2023-01-30 12:55:34 +00:00
Bilal Qamar
fa37ebb828 chore: update dependency @edx/frontend-build to v12.4.19 (#266) 2023-01-26 11:40:08 +05:00
Muhammad Abdullah Waheed
a24972b64f Revert "chore(deps): update dependency semantic-release to v20 (#263)" (#264)
This reverts commit abb22a82ba.
2023-01-20 12:26:36 +05:00
renovate[bot]
abb22a82ba chore(deps): update dependency semantic-release to v20 (#263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-20 12:20:04 +05:00
dependabot[bot]
1df0b94a8c build(deps): bump json5 from 1.0.1 to 1.0.2 (#261)
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 18:38:59 +05:00
renovate[bot]
d563e2f444 chore(deps): update dependency @edx/brand to v1.2.0 2023-01-09 10:14:23 +00:00
renovate[bot]
92a210f81d chore(deps): update dependency @edx/frontend-build to v12.4.15 2022-12-22 01:03:46 +00:00
Bilal Qamar
1b92a3c505 feat: updated paragon to v20 (#254)
* feat: updated paragon to v20
2022-12-08 17:18:26 +05:00
edX requirements bot
f88d47275b fix: -t flag added in pull translation command (#256) 2022-11-30 16:47:10 +05:00
renovate[bot]
26f3900602 chore(deps): update dependency @edx/frontend-build to v12.4.0 2022-11-28 08:28:51 +00:00
Muhammad Abdullah Waheed
a9db712240 Merge pull request #253 from openedx/bilalqamar95/dependabot-issues-resolution
refactor: bumped minimatch, recursive-readdir & loader-utils
2022-11-23 14:31:26 +05:00
Bilal Qamar
739cce6c50 refactor: bumped minimatch, recursive-readdir & loader-utils 2022-11-22 15:51:17 +05:00
renovate[bot]
3a19e219bb chore(deps): update actions/setup-node action to v3 (#209)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-15 19:06:09 +05:00
julianajlk
12511689e8 fix: Change frontend-platform peer dependency to v2 or v3 range 2022-11-14 20:19:15 +00:00
renovate[bot]
f084393cc9 chore(deps): update dependency semantic-release to v19.0.5 2022-11-14 07:58:10 +00:00
renovate[bot]
4035ff122c chore(deps): update dependency react-router-dom to v5.3.4 2022-11-14 07:52:15 +00:00
22 changed files with 17313 additions and 41152 deletions

View File

@@ -8,6 +8,11 @@ LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/login
MARKETING_SITE_BASE_URL=http://localhost:18000
TERMS_OF_SERVICE_URL=null
PRIVACY_POLICY_URL=null
SUPPORT_EMAIL=null
STUDIO_BASE_URL=http://localhost:18010
SHOW_ACCESSIBILITY_PAGE=false
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=null

View File

@@ -16,4 +16,4 @@ jobs:
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 }}
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

@@ -9,18 +9,17 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: ${{ env.NODE_VER }}
- name: Install dependencies
run: npm ci
- name: Validate package-lock.json changes

View File

@@ -10,4 +10,4 @@ on:
jobs:
version-check:
uses: openedx/.github/.github/workflows/lockfileversion-check.yml@master
uses: openedx/.github/.github/workflows/lockfile-check.yml@master

View File

@@ -12,10 +12,12 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ env.NODE_VER }}
- name: Install dependencies
run: npm ci
- name: Validate package-lock.json changes

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

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
18

14
Makefile Executable file → Normal file
View File

@@ -1,11 +1,9 @@
transifex_resource = frontend-component-footer
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA"
export TRANSIFEX_RESOURCE = frontend-component-footer
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA,it_IT,pt_PT,de_DE"
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
@@ -42,15 +40,15 @@ push_translations:
# Pushing strings to Transifex...
tx push -s
# Fetching hashes from Transifex...
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh
# Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path
# Pushing comments to Transifex...
./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh
# Pulls translations from Transifex.
pull_translations:
tx pull -f --mode reviewed --languages=$(transifex_langs)
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:

58001
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -33,34 +33,38 @@
},
"homepage": "https://github.com/openedx/frontend-component-footer#readme",
"devDependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/frontend-build": "12.3.0",
"@edx/frontend-platform": "^3.0.1",
"@edx/paragon": "19.25.3",
"@edx/brand": "npm:@edx/brand-openedx@1.2.0",
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-build": "12.9.17",
"@edx/frontend-platform": "5.4.0",
"@edx/reactifex": "^2.1.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.1",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"husky": "7.0.4",
"husky": "8.0.3",
"prop-types": "15.8.1",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-redux": "7.2.9",
"react-router-dom": "5.3.3",
"react-test-renderer": "16.14.0",
"reactifex": "1.1.1",
"redux": "4.2.0",
"semantic-release": "19.0.3"
"react-router-dom": "6.15.0",
"react-test-renderer": "17.0.2",
"redux": "4.2.1",
"semantic-release": "21.1.2"
},
"dependencies": {
"@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.2.0"
"@edx/paragon": "^21.3.1",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-brands-svg-icons": "6.4.2",
"@fortawesome/free-regular-svg-icons": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
"@fortawesome/react-fontawesome": "0.2.0",
"lodash": "^4.17.21"
},
"peerDependencies": {
"@edx/frontend-platform": "^3.0.0",
"@edx/frontend-platform": "^4.0.0 || ^5.0.0",
"prop-types": "^15.5.10",
"react": "^16.9.0",
"react-dom": "^16.9.0"
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
}
}

View File

@@ -24,7 +24,7 @@
"automerge": true
},
{
"matchPackagePatterns": ["@edx"],
"matchPackagePatterns": ["@edx", "@openedx"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}

View File

@@ -0,0 +1,146 @@
import React, { useContext, useState } from 'react';
import _ from 'lodash';
import { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import { ensureConfig } from '@edx/frontend-platform';
import { AppContext } from '@edx/frontend-platform/react';
import {
ActionRow,
Button,
Container,
Hyperlink,
Image,
TransitionReplace,
} from '@edx/paragon';
import { ExpandLess, ExpandMore, Help } from '@edx/paragon/icons';
import messages from './messages';
ensureConfig([
'LMS_BASE_URL',
'MARKETING_SITE_BASE_URL',
'TERMS_OF_SERVICE_URL',
'PRIVACY_POLICY_URL',
'SUPPORT_EMAIL',
'SITE_NAME',
'STUDIO_BASE_URL',
'SHOW_ACCESSIBILITY_PAGE',
], 'Studio Footer component');
const StudioFooter = ({
// injected
intl,
}) => {
const [isOpen, setIsOpen] = useState(false);
const { config } = useContext(AppContext);
return (
<>
<div className="m-0 mt-6 row align-items-center justify-content-center">
<div className="col border-top mr-2" />
<Button
data-testid="helpToggleButton"
variant="outline-primary"
onClick={() => setIsOpen(!isOpen)}
iconBefore={Help}
iconAfter={isOpen ? ExpandLess : ExpandMore}
size="sm"
>
{isOpen ? intl.formatMessage(messages.closeHelpButtonLabel)
: intl.formatMessage(messages.openHelpButtonLabel)}
</Button>
<div className="col border-top ml-2" />
</div>
<Container size="xl" className="px-4">
<TransitionReplace>
{isOpen ? (
<ActionRow key="help-link-button-row" className="py-4" data-testid="helpButtonRow">
<ActionRow.Spacer />
<Button as="a" href="https://docs.edx.org/" size="sm">
<FormattedMessage {...messages.edxDocumentationButtonLabel} />
</Button>
<Button
as="a"
href="https://open.edx.org/"
size="sm"
data-testid="openEdXPortalButton"
>
<FormattedMessage {...messages.openEdxPortalButtonLabel} />
</Button>
<Button
as="a"
href="https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1"
size="sm"
>
<FormattedMessage {...messages.edx101ButtonLabel} />
</Button>
<Button
as="a"
href="https://www.edx.org/course/studiox-creating-a-course-with-edx-studio"
size="sm"
>
<FormattedMessage {...messages.studioXButtonLabel} />
</Button>
{!_.isEmpty(config.SUPPORT_EMAIL) && (
<Button
as="a"
href={`mailto:${config.SUPPORT_EMAIL}`}
size="sm"
data-testid="contactUsButton"
>
<FormattedMessage {...messages.contactUsButtonLabel} />
</Button>
)}
<ActionRow.Spacer />
</ActionRow>
) : null}
</TransitionReplace>
<ActionRow className="pt-3 m-0 x-small">
© {new Date().getFullYear()} <Hyperlink destination={config.MARKETING_BASE_URL} target="_blank" className="ml-2">{config.SITE_NAME}</Hyperlink>
<ActionRow.Spacer />
{!_.isEmpty(config.TERMS_OF_SERVICE_URL) && (
<Hyperlink destination={config.TERMS_OF_SERVICE_URL} data-testid="termsOfService">
{intl.formatMessage(messages.termsOfServiceLinkLabel)}
</Hyperlink>
)}{!_.isEmpty(config.PRIVACY_POLICY_URL) && (
<Hyperlink destination={config.PRIVACY_POLICY_URL} data-testid="privacyPolicy">
{intl.formatMessage(messages.privacyPolicyLinkLabel)}
</Hyperlink>
)}
{config.SHOW_ACCESSIBILITY_PAGE === 'true' && (
<Hyperlink
destination={`${config.STUDIO_BASE_URL}/accessibility`}
data-testid="accessibilityRequest"
>
{intl.formatMessage(messages.accessibilityRequestLinkLabel)}
</Hyperlink>
)}
<Hyperlink destination={config.LMS_BASE_URL}>LMS</Hyperlink>
</ActionRow>
<ActionRow className="mt-3 pb-4 x-small">
{/*
Site operators: Please do not remove this paragraph! this attributes back to edX and
makes your acknowledgement of edX's trademarks clear.
Translators: 'edX' and 'Open edX' are trademarks of 'edX Inc.'. Please do not translate
any of these trademarks and company names.
*/}
<FormattedMessage {...messages.trademarkMessage} />
<Hyperlink className="ml-1" destination="https://www.edx.org">edX Inc</Hyperlink>.
<ActionRow.Spacer />
<Hyperlink destination="https://open.edx.org" className="float-right">
<Image
width="120px"
alt="Powered by Open edX"
src="https://logos.openedx.org/open-edx-logo-tag.png"
/>
</Hyperlink>
</ActionRow>
</Container>
</>
);
};
StudioFooter.propTypes = {
// injected
intl: intlShape.isRequired,
};
export default injectIntl(StudioFooter);

View File

@@ -0,0 +1,121 @@
/* eslint-disable react/prop-types */
import React, { useMemo } from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import { AppContext } from '@edx/frontend-platform/react';
import StudioFooter from './StudioFooter';
import messages from './messages';
const config = {
LMS_BASE_URL: process.env.LMS_BASE_URL,
MARKETING_SITE_BASE_URL: process.env.MARKETING_SITE_BASE_URL,
TERMS_OF_SERVICE_URL: process.env.TERMS_OF_SERVICE_URL,
PRIVACY_POLICY_URL: process.env.PRIVACY_POLICY_URL,
SUPPORT_EMAIL: process.env.SUPPORT_EMAIL,
SITE_NAME: process.env.SITE_NAME,
STUDIO_BASE_URL: process.env.STUDIO_BASE_URL,
SHOW_ACCESSIBILITY_PAGE: process.env.SHOW_ACCESSIBILITY_PAGE,
};
let currentConfig = config;
const Component = ({ updateVariable }) => {
if (updateVariable) {
const [variable, value] = updateVariable;
currentConfig = {
...config,
[variable]: value,
};
}
const contextValue = useMemo(() => ({
authenticatedUser: null,
config: currentConfig,
}), []);
return (
<IntlProvider locale="en">
<AppContext.Provider value={contextValue}>
<StudioFooter />
</AppContext.Provider>
</IntlProvider>
);
};
jest.unmock('@edx/paragon');
describe('Footer', () => {
describe('help section default view', () => {
it('help button should read Looking for help with Studio?', () => {
render(<Component />);
expect(screen.getByText(messages.openHelpButtonLabel.defaultMessage))
.toBeVisible();
});
it('help button link row should not be visible', () => {
render(<Component />);
expect(screen.queryByTestId('helpButtonRow')).toBeNull();
});
});
describe('help section expanded view', () => {
it('help button should read Hide Studio help', () => {
render(<Component />);
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
fireEvent.click(helpToggleButton);
expect(screen.getByText(messages.closeHelpButtonLabel.defaultMessage))
.toBeVisible();
});
it('help button link row should be visible', () => {
render(<Component />);
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
fireEvent.click(helpToggleButton);
expect(screen.getByTestId('helpButtonRow')).toBeVisible();
});
it('Open edX portal button should be visible', () => {
render(<Component />);
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
fireEvent.click(helpToggleButton);
expect(screen.getByTestId('openEdXPortalButton')).toBeVisible();
});
it('should not show contact us button', () => {
render(<Component />);
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
fireEvent.click(helpToggleButton);
expect(screen.queryByTestId('contactUsButton')).toBeNull();
});
it('should show contact us button', () => {
render(<Component updateVariable={['SUPPORT_EMAIL', 'support@email.com']} />);
const helpToggleButton = screen.getByText(messages.openHelpButtonLabel.defaultMessage);
fireEvent.click(helpToggleButton);
expect(screen.getByTestId('contactUsButton')).toBeVisible();
});
});
describe('policy link row', () => {
it('should only show LMS link', () => {
render(<Component />);
expect(screen.getByText('LMS')).toBeVisible();
expect(screen.queryByTestId('termsOfService')).toBeNull();
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
});
it('should show terms of service link', () => {
render(<Component updateVariable={['TERMS_OF_SERVICE_URL', 'termsofserviceurl']} />);
expect(screen.getByText('LMS')).toBeVisible();
expect(screen.queryByTestId('termsOfService')).toBeVisible();
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
});
it('should show privacy policy link', () => {
render(<Component updateVariable={['PRIVACY_POLICY_URL', 'privacypolicyurl']} />);
expect(screen.getByText('LMS')).toBeVisible();
expect(screen.queryByTestId('termsOfService')).toBeNull();
expect(screen.queryByTestId('privacyPolicy')).toBeVisible();
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
});
it('should show accessibilty request link', () => {
render(<Component updateVariable={['SHOW_ACCESSIBILITY_PAGE', 'true']} />);
expect(screen.getByText('LMS')).toBeVisible();
expect(screen.queryByTestId('termsOfService')).toBeNull();
expect(screen.queryByTestId('privacyPolicy')).toBeNull();
expect(screen.queryByTestId('accessibilityRequest')).toBeVisible();
});
});
});

View File

@@ -0,0 +1,3 @@
import StudioFooter from './StudioFooter';
export default StudioFooter;

View File

@@ -0,0 +1,61 @@
import { defineMessages } from '@edx/frontend-platform/i18n';
const messages = defineMessages({
openHelpButtonLabel: {
id: 'authoring.footer.help.openHelp.button.label',
defaultMessage: 'Looking for help with Studio?',
description: 'Label for button that opens the collapsed section with help buttons',
},
closeHelpButtonLabel: {
id: 'authoring.footer.help.closeHelp.button.label',
defaultMessage: 'Hide Studio help',
description: 'Label for button that closes the collapsed section with help buttons',
},
edxDocumentationButtonLabel: {
id: 'authoring.footer.help.edxDocumentation.button.label',
defaultMessage: 'edX documentation',
description: 'Label for button that links to the edX documentation site',
},
openEdxPortalButtonLabel: {
id: 'authoring.footer.help.openEdxPortal.button.label',
defaultMessage: 'Open edX portal',
description: 'Label for button that links to the Open edX portal',
},
edx101ButtonLabel: {
id: 'authoring.footer.help.edx101.button.label',
defaultMessage: 'Enroll in edX 101',
description: 'Label for button that links to the edX 101 course',
},
studioXButtonLabel: {
id: 'authoring.footer.help.studioX.button.label',
defaultMessage: 'Enroll in StudioX',
description: 'Label for button that links to the edX StudioX course',
},
contactUsButtonLabel: {
id: 'authoring.footer.help.contactUs.button.label',
defaultMessage: 'Contact us',
description: 'Label for button that links to the email for partner support',
},
termsOfServiceLinkLabel: {
id: 'authoring.footer.termsOfService.link.label',
defaultMessage: 'Terms of Service',
description: 'Label for button that links to the terms of service page',
},
privacyPolicyLinkLabel: {
id: 'authoring.footer.privacyPolicy.link.label',
defaultMessage: 'Privacy Policy',
description: 'Label for button that links to the privacy policy page',
},
accessibilityRequestLinkLabel: {
id: 'authoring.footer.accessibilityRequest.link.label',
defaultMessage: 'Accessibility Accomodation Request',
description: 'Label for button that links to the accessibility accomodation requests page',
},
trademarkMessage: {
id: 'authoring.footer.trademark.message',
defaultMessage: 'edX and Open edX, and the edX and Open edX logos are registered trademarks of',
description: 'Message about the use of logos and names edX and Open edX',
},
});
export default messages;

View File

@@ -9,6 +9,9 @@ import deMessages from './messages/de.json';
import ruMessages from './messages/ru.json';
import hiMessages from './messages/hi.json';
import frCAMessages from './messages/fr_CA.json';
import dedeCAMessages from './messages/de_DE.json';
import ititCAMessages from './messages/it_IT.json';
import ptptCAMessages from './messages/pt_PT.json';
// no need to import en messages-- they are in the defaultMessage field
const messages = {
@@ -23,6 +26,9 @@ const messages = {
'fr-ca': frCAMessages,
ru: ruMessages,
uk: ukMessages,
'de-de': dedeCAMessages,
'it-it': ititCAMessages,
'pt-pt': ptptCAMessages,
};
export default messages;

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
import Footer, { EVENT_NAMES } from './components/Footer';
import messages from './i18n/index';
import StudioFooter from './components/studio-footer';
export default Footer;
export { messages, EVENT_NAMES };
export { messages, EVENT_NAMES, StudioFooter };

View File

@@ -1,5 +1,5 @@
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Enzyme.configure({ adapter: new Adapter() });