Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a distribution release #4

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Default CI
on:
push:
branches:
- 'master'
- 'nau/*.master'
pull_request:
branches:
- '**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release CI
on:
push:
branches:
- master
- nau/*.master
jobs:
release:
name: Release
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"branch": "master",
"branch": "nau/*.master",
"tagFormat": "v${version}",
"verifyConditions": [
"@semantic-release/npm",
Expand Down
28 changes: 27 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ Environment Variables
* ``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.
* ``ENABLE_ORG_LOGO`` - A boolean flag to enable the display of the org logo on the center of the
header nav bar. Defaults to **false**

************
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``
``npm i --save @nauedu/frontend-component-header``

This will make the component available to be imported into your application.

Expand Down Expand Up @@ -73,6 +75,30 @@ Build a production distribution::

npm run build

***********
Publishing to npmjs.com
***********

Any changes to this library have to be pushed to npmjs.com to be reflected on the build.

Publish to npm::

npm publish


***********
Deploy in production
***********
To replace the default edx header with the new one, use one of the following instructions:

Add the necessary settings to the mfe_brand plugin::

RUN npm install '@edx/frontend-component-header@npm:@nauedu/frontend-component-header'

Alternatively, you can specify the version::

RUN npm install '@edx/frontend-component-header@npm:@nauedu/[email protected]'

.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-header.svg?branch=master
:target: https://travis-ci.com/edx/frontend-component-header
.. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-component-header
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@edx/frontend-component-header",
"version": "1.0.0-semantically-released",
"description": "The standard header for Open edX",
"name": "@nauedu/frontend-component-header",
"version": "14.0.0-semantically-released",
"description": "NAU header for Open edX",
"main": "dist/index.js",
"publishConfig": {
"access": "public"
Expand All @@ -24,23 +24,28 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/edx/frontend-component-header.git"
"url": "git+https://github.com/fccn/frontend-component-header-nau.git"
},
"author": "edX",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/edx/frontend-component-header/issues"
"url": "https://github.com/fccn/frontend-component-header-nau/issues"
},
"homepage": "https://github.com/edx/frontend-component-header#readme",
"homepage": "https://github.com/fccn/frontend-component-header-nau#readme",
"devDependencies": {
"@edx/brand": "npm:@edx/[email protected]",
"@edx/frontend-build": "9.1.1",
"@edx/frontend-platform": "1.15.1",
"@edx/paragon": "19.6.0",
"@testing-library/dom": "7.31.2",
"@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "10.4.9",
"codecov": "3.8.3",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"husky": "7.0.4",
"jest": "27.5.0",
"jest-chain": "1.1.5",
"prop-types": "15.8.1",
"react": "16.14.0",
"react-dom": "16.14.0",
Expand All @@ -49,22 +54,17 @@
"react-test-renderer": "16.14.0",
"reactifex": "1.1.1",
"redux": "4.1.2",
"redux-saga": "1.1.3",
"@testing-library/dom": "7.31.2",
"@testing-library/jest-dom": "5.16.2",
"jest": "27.5.0",
"jest-chain": "1.1.5",
"@testing-library/react": "10.4.9"
"redux-saga": "1.1.3"
},
"dependencies": {
"babel-polyfill": "6.26.0",
"react-responsive": "8.2.0",
"react-transition-group": "4.4.2",
"@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.1.14"
"@fortawesome/react-fontawesome": "^0.1.14",
"babel-polyfill": "6.26.0",
"react-responsive": "8.2.0",
"react-transition-group": "4.4.2"
},
"peerDependencies": {
"@edx/frontend-platform": "^1.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/learning-header/LearningHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LinkedLogo.propTypes = {
};

// this feature flag is not included on the frontend-platform, we have to get it directly from ENV
const enabledOrgLogo = process.env.ENABLED_ORG_LOGO || false;
const enabledOrgLogo = !!process.env.ENABLE_ORG_LOGO || false;

function LearningHeader({
courseOrg, courseTitle, intl, showUserDropdown,
Expand Down
7 changes: 2 additions & 5 deletions src/learning-header/_header.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
@import "../../node_modules/bootstrap/scss/bootstrap-grid";
@import "../../node_modules/bootstrap/scss/mixins/breakpoints";

.logo {
img {
@include media-breakpoint-down(sm) {
@media (max-width: 576px) {
max-width: 85% !important;
}
}
}
}
Loading