Compare commits

...

10 Commits

6 changed files with 6158 additions and 7595 deletions

View File

@@ -9,17 +9,18 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
node-version: ${{ matrix.node }}
- 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/lockfile-check.yml@master
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master

2
.nvmrc
View File

@@ -1 +1 @@
18
20

13709
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -38,9 +38,9 @@
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-platform": "8.1.1",
"@edx/reactifex": "^2.1.1",
"@openedx/frontend-build": "14.1.0",
"@openedx/frontend-build": "14.1.5",
"@openedx/frontend-plugin-framework": "^1.1.2",
"@openedx/paragon": "22.7.0",
"@openedx/paragon": "^22.8.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.1",
"husky": "8.0.3",
@@ -48,7 +48,7 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"react-redux": "7.2.9",
"react-router-dom": "6.26.1",
"react-router-dom": "6.26.2",
"react-test-renderer": "17.0.2",
"redux": "4.2.1",
"semantic-release": "21.1.2"
@@ -59,6 +59,7 @@
"@fortawesome/free-regular-svg-icons": "6.6.0",
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "0.2.2",
"classnames": "^2.5.1",
"jest-environment-jsdom": "^29.7.0",
"lodash": "^4.17.21",
"ts-jest": "^29.1.2"

View File

@@ -1,6 +1,6 @@
import React, { useContext, useState } from 'react';
import _ from 'lodash';
import { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import { ensureConfig } from '@edx/frontend-platform';
import { AppContext } from '@edx/frontend-platform/react';
import {
@@ -12,6 +12,9 @@ import {
TransitionReplace,
} from '@openedx/paragon';
import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import messages from './messages';
ensureConfig([
@@ -26,12 +29,14 @@ ensureConfig([
], 'Studio Footer component');
const StudioFooter = ({
// injected
intl,
containerProps,
}) => {
const intl = useIntl();
const [isOpen, setIsOpen] = useState(false);
const { config } = useContext(AppContext);
const { containerClassName, ...restContainerProps } = containerProps || {};
return (
<>
<div className="m-0 mt-6 row align-items-center justify-content-center">
@@ -49,7 +54,11 @@ const StudioFooter = ({
</Button>
<div className="col border-top ml-2" />
</div>
<Container size="xl" className="px-4">
<Container
size="xl"
className={classNames('px-4', containerClassName)}
{...restContainerProps}
>
<TransitionReplace>
{isOpen ? (
<ActionRow key="help-link-button-row" className="py-4" data-testid="helpButtonRow">
@@ -139,8 +148,11 @@ const StudioFooter = ({
};
StudioFooter.propTypes = {
// injected
intl: intlShape.isRequired,
containerProps: PropTypes.shape(Container.propTypes),
};
export default injectIntl(StudioFooter);
StudioFooter.defaultProps = {
containerProps: {},
};
export default StudioFooter;