From e4d23d366b8b8fd1d0ac73b9e56fd71f5fa3fcf0 Mon Sep 17 00:00:00 2001 From: Jeff Chaves <58956521+chavesj@users.noreply.github.com> Date: Mon, 30 Nov 2020 14:00:26 -0500 Subject: [PATCH] feat: upgrading deps, retheme with from @edx/brand, pull logo from config settings (#104) * feat: upgrading deps, use logo from @edx/brand * feat: upgrading peer deps * feat: pr feedback * update snapshots and example app * pull config from AppContext Co-authored-by: Adam Stankiewicz --- .env.development | 19 + .eslintignore | 1 + .gitignore | 1 + example/index.jsx | 45 +- example/index.scss | 8 +- package-lock.json | 14296 ++++++++++------ package.json | 14 +- src/components/Footer.jsx | 22 +- src/components/Footer.test.jsx | 69 +- src/components/LanguageSelector.jsx | 5 +- .../__snapshots__/Footer.test.jsx.snap | 24 +- src/edx-openedx-logo-tag.png | Bin 12801 -> 0 bytes src/setupTest.js | 22 + webpack.dev.config.js | 5 + 14 files changed, 8936 insertions(+), 5595 deletions(-) create mode 100644 .env.development delete mode 100644 src/edx-openedx-logo-tag.png diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..303bf9ed --- /dev/null +++ b/.env.development @@ -0,0 +1,19 @@ +ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload +BASE_URL=localhost:8080 +CREDENTIALS_BASE_URL=http://localhost:18150 +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 +LOGIN_URL=http://localhost:18000/login +LOGOUT_URL=http://localhost:18000/login +MARKETING_SITE_BASE_URL=http://localhost:18000 +ORDER_HISTORY_URL=localhost:1996/orders +REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh +SEGMENT_KEY=null +SITE_NAME=Open edX +USER_INFO_COOKIE_NAME=edx-user-info +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 diff --git a/.eslintignore b/.eslintignore index 18f2b36d..a71f29e0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ coverage dist +example node_modules diff --git a/.gitignore b/.gitignore index d3fc2665..6ea14ab0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ temp src/i18n/transifex_input.json temp/babel-plugin-react-intl /.vscode +module.config.js diff --git a/example/index.jsx b/example/index.jsx index fcd93c81..580fccc1 100644 --- a/example/index.jsx +++ b/example/index.jsx @@ -1,22 +1,33 @@ +import 'babel-polyfill'; + import React from 'react'; -import { render } from 'react-dom'; -import { IntlProvider } from '@edx/frontend-platform/i18n'; +import ReactDOM from 'react-dom'; +import { initialize, getConfig, subscribe, APP_READY } from '@edx/frontend-platform'; +import { AppContext, AppProvider } from '@edx/frontend-platform/react'; +import Footer from '@edx/frontend-component-footer'; import './index.scss'; -import Footer from '../src'; -const App = () => ( -
- -
{}} - supportedLanguages={[ - { label: 'English', value: 'en' }, - { label: 'Español', value: 'es' }, - ]} - /> - -
-); +subscribe(APP_READY, () => { + ReactDOM.render( + + +