Compare commits

...

18 Commits

Author SHA1 Message Date
Renovate Bot
37e9ef0434 fix(deps): update dependency react-responsive to v8.2.0 2021-06-04 00:24:39 +00:00
Renovate Bot
df1b6ff941 chore(deps): update react monorepo to v16.14.0 2021-06-04 00:13:10 +00:00
Renovate Bot
52b8b7ca11 chore(deps): update dependency redux to v4.1.0 2021-06-04 00:00:12 +00:00
Renovate Bot
9ed0af96ca chore(deps): update dependency react-router-dom to v5.2.0 2021-06-03 23:46:01 +00:00
Renovate Bot
8d0bd0ca05 chore(deps): update dependency react-redux to v7.2.4 2021-06-03 23:30:28 +00:00
Renovate Bot
de83d5f20f chore(deps): update dependency husky to v3.1.0 2021-06-03 23:12:56 +00:00
Renovate Bot
54ff71b0ec chore(deps): update dependency enzyme-adapter-react-16 to v1.15.6 2021-06-03 22:54:19 +00:00
Renovate Bot
a8347625ae chore(deps): update dependency enzyme to v3.11.0 2021-06-03 22:34:36 +00:00
Renovate Bot
305ae120c6 chore(deps): update dependency codecov to v3.8.2 2021-06-03 22:14:04 +00:00
Renovate Bot
e1468b5396 chore(deps): update dependency @edx/paragon to v12.8.0 2021-06-03 21:52:33 +00:00
Renovate Bot
10767bdaac chore(deps): update dependency @edx/frontend-platform to v1.11.0 2021-06-03 21:27:30 +00:00
Renovate Bot
484d6af4d9 chore(deps): update dependency @edx/frontend-build to v5.6.14 2021-06-03 21:01:01 +00:00
Renovate Bot
8ba7153806 chore(deps): update commitlint monorepo 2021-06-03 20:31:27 +00:00
stvn
334bdb34f3 merge(#103): build/renovate
commits
=======
- build(renovate): be more liberal about what automerges
2021-06-03 11:18:13 -07:00
stvn
12b63c5583 build(renovate): be more liberal about what automerges
based on https://github.com/edx/frontend-app-account .
2021-06-03 11:00:58 -07:00
stvn
3726792df2 merge: stvn/own/code 2021-05-26 13:42:44 -07:00
stvn
cc252e32e6 build: add CODEOWNERS; edx/community-engineering
Background
==========
As part of our Squad-based ownership, we should stay on top of what
happens in these repositories. However, due to the number of
repositories (and subsequently pull requests) across the edX ecosystem,
it is challenging to stay on top of notifications, separating the
'signal' from the 'noise'. Email filters can go a long way to taming
Inbox notifications, but this is manual and requires maintenance as
Squad ownership changes. It also fails to account for Github-specific behavior.

Proposal
========
By leveraging Github support for `CODEOWNERS` files [1],
we can ensure that our team is at least CCed explicitly, here,
in the form a requested review. This request is just that, a request,
not a requirement; we are not enacting any new merge requirements
at this time.

- [1] https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
2021-05-26 12:16:05 -07:00
David Joy
0c58362b49 docs: Updating README with repository details. (#101)
* docs: fleshing out the readme

Making it consistent with frontend-component-footer and much more detailed.

* fix: Removing unused variable, siteName

Also fixing logout URL in development.  (We fixed this in a number of other repositories already, but somehow this one snuck through)
2021-05-13 14:57:25 -04:00
7 changed files with 4265 additions and 3956 deletions

View File

@@ -6,7 +6,7 @@ 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
LOGOUT_URL=http://localhost:18000/logout
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh

1
.github/CODEOWNERS vendored Normal file
View File

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

View File

@@ -1,11 +1,75 @@
#########################
frontend-component-header
=========================
#########################
|Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release|
This is the standard Open edX header for use in React applications. It has two exports:
- **default**: The Header Component
- **messages**: for i18n in the form of ``{ locale: { key: translatedString } }``
********
Overview
********
A generic header for Open edX micro-frontend applications.
************
Requirements
************
This component uses ``@edx/frontend-platform`` services such as i18n, analytics, configuration, and the ``AppContext`` React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via ``@edx/frontend-platform``'s ``initialize`` function. `Please visit the frontend template application to see an example. <https://github.com/edx/frontend-template-application/blob/master/src/index.jsx>`_
Environment Variables
=====================
* ``LMS_BASE_URL`` - The URL of the LMS of your Open edX instance.
* ``LOGOUT_URL`` - The URL of the API endpoint which performs a user logout.
* ``LOGIN_URL`` - The URL of the login page where a user can sign into their account.
* ``SITE_NAME`` - The user-facing name of the site, used as `alt` text on the logo in the header.
Defaults to "localhost" in development.
* ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header.
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
menu items when truthy. This is intended to be used in micro-frontends like
frontend-app-authentication in which these menus are considered distractions from the user's task.
************
Installation
************
To install this header into your Open edX micro-frontend, run the following command in your MFE:
``npm i --save @edx/frontend-component-header``
This will make the component available to be imported into your application.
*****
Usage
*****
This library has the following exports:
* ``(default)``: The header as a React component.
* ``messages``: Internationalization messages suitable for use with `@edx/frontend-platform/i18n <https://edx.github.io/frontend-platform/module-Internationalization.html>`_
* ``dist/index.scss``: A SASS file which contains style information for the component. It should be imported into the micro-frontend's own SCSS file.
Examples
========
* `An example of component and messages usage. <https://github.com/edx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L21>`_
* `An example of SCSS file usage. <https://github.com/edx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L8>`_
***********
Development
***********
Install dependencies::
npm i
Start the development server::
npm start
Build a production distribution::
npm run build
.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-header.svg?branch=master
:target: https://travis-ci.com/edx/frontend-component-header

8087
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -34,31 +34,31 @@
},
"homepage": "https://github.com/edx/frontend-component-header#readme",
"devDependencies": {
"@commitlint/cli": "8.2.0",
"@commitlint/config-angular": "8.2.0",
"@commitlint/prompt": "8.2.0",
"@commitlint/prompt-cli": "8.2.0",
"@commitlint/cli": "8.3.5",
"@commitlint/config-angular": "8.3.4",
"@commitlint/prompt": "8.3.5",
"@commitlint/prompt-cli": "8.3.5",
"@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/frontend-build": "5.4.0",
"@edx/frontend-platform": "1.8.4",
"@edx/paragon": "12.0.5",
"codecov": "3.7.2",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"husky": "3.0.9",
"@edx/frontend-build": "5.6.14",
"@edx/frontend-platform": "1.11.0",
"@edx/paragon": "12.8.0",
"codecov": "3.8.2",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"husky": "3.1.0",
"prop-types": "15.7.2",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-redux": "7.1.3",
"react-router-dom": "5.1.2",
"react-test-renderer": "16.9.0",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-redux": "7.2.4",
"react-router-dom": "5.2.0",
"react-test-renderer": "16.14.0",
"reactifex": "1.1.1",
"redux": "4.0.5",
"redux": "4.1.0",
"redux-saga": "1.1.3"
},
"dependencies": {
"babel-polyfill": "6.26.0",
"react-responsive": "8.0.3",
"react-responsive": "8.2.0",
"react-transition-group": "4.3.0"
},
"peerDependencies": {

View File

@@ -1,9 +1,21 @@
{
"extends": [
"config:base"
"config:base",
"schedule:weekly",
":automergeMinor",
":enableVulnerabilityAlerts",
":rebaseStalePrs",
":semanticCommits",
":updateNotScheduled"
],
"patch": {
"automerge": true
},
"rebaseStalePrs": true
"packageRules": [
{
"matchDepTypes": [
"devDependencies",
"lockFileMaintenance"
],
"automerge": true
}
],
"timezone": "America/New_York"
}

View File

@@ -79,7 +79,6 @@ function Header({ intl }) {
const props = {
logo: config.LOGO_URL,
logoAltText: config.SITE_NAME,
siteName: config.SITE_NAME,
logoDestination: `${config.LMS_BASE_URL}/dashboard`,
loggedIn: authenticatedUser !== null,
username: authenticatedUser !== null ? authenticatedUser.username : null,