From 23fc60e132de7644bb041f80813c0dc59caa6105 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 30 Nov 2020 14:09:42 -0500 Subject: [PATCH] feat: retheme with @edx/brand and pull logo from config settings (#56) * feat: retheme with @edx/brand and pull logo from config settings * style fixes * update test snapshots --- .env.development | 7 +- .env.test | 7 +- .eslintignore | 1 + .gitignore | 1 + example/index.jsx | 47 +- example/index.scss | 9 +- package-lock.json | 14497 ++++++++++------ package.json | 13 +- public/index.html | 4 +- src/components/Footer.jsx | 36 +- src/components/Footer.test.jsx | 103 +- src/components/LanguageSelector.jsx | 13 +- src/components/LinkList.jsx | 4 +- src/components/SocialIconLinks.jsx | 2 +- .../__snapshots__/Footer.test.jsx.snap | 36 +- src/edx-footer.png | Bin 3091 -> 0 bytes src/setupTest.js | 22 + webpack.dev.config.js | 5 + 18 files changed, 9119 insertions(+), 5688 deletions(-) delete mode 100644 src/edx-footer.png diff --git a/.env.development b/.env.development index a2a59acc..905f8b7e 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,3 @@ -EXAMPLE_VAR=Example Value ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload BASE_URL=localhost:8080 CREDENTIALS_BASE_URL=http://localhost:18150 @@ -11,6 +10,10 @@ 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=test +SEGMENT_KEY=null SITE_NAME=Open edX USER_INFO_COOKIE_NAME=edx-user-info +LOGO_URL=https://edx-cdn.org/v3/prod/logo.svg +LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/prod/logo-trademark.svg +LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg +FAVICON_URL=https://edx-cdn.org/v3/prod/favicon.ico diff --git a/.env.test b/.env.test index a2a59acc..905f8b7e 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,3 @@ -EXAMPLE_VAR=Example Value ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload BASE_URL=localhost:8080 CREDENTIALS_BASE_URL=http://localhost:18150 @@ -11,6 +10,10 @@ 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=test +SEGMENT_KEY=null SITE_NAME=Open edX USER_INFO_COOKIE_NAME=edx-user-info +LOGO_URL=https://edx-cdn.org/v3/prod/logo.svg +LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/prod/logo-trademark.svg +LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg +FAVICON_URL=https://edx-cdn.org/v3/prod/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 5c4411ee..9b170989 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,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..1da990b6 100644 --- a/example/index.jsx +++ b/example/index.jsx @@ -1,22 +1,35 @@ +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( + + +