diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f39d95c65f..cc679714cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release CI on: push: branches: - - master + - redwood/indigo jobs: release: name: Release diff --git a/package-lock.json b/package-lock.json index 780dede0d7..e9ed7424f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@edx/frontend-component-header", - "version": "1.0.0-semantically-released", + "name": "@edly-io/indigo-frontend-component-header", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@edx/frontend-component-header", - "version": "1.0.0-semantically-released", + "name": "@edly-io/indigo-frontend-component-header", + "version": "1.0.0", "license": "AGPL-3.0", "dependencies": { "@fortawesome/fontawesome-svg-core": "6.5.1", diff --git a/package.json b/package.json index a36b072eb2..66d25b8f2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@edx/frontend-component-header", - "version": "1.0.0-semantically-released", + "name": "@edly-io/indigo-frontend-component-header", + "version": "2.0.0", "description": "The standard header for Open edX", "main": "dist/index.js", "publishConfig": { @@ -24,14 +24,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/openedx/frontend-component-header.git" + "url": "git+https://github.com/edly-io/frontend-component-header.git" }, "author": "edX", "license": "AGPL-3.0", "bugs": { - "url": "https://github.com/openedx/frontend-component-header/issues" + "url": "https://github.com/edly-io/frontend-component-header/issues" }, - "homepage": "https://github.com/openedx/frontend-component-header#readme", + "homepage": "https://github.com/edly-io/frontend-component-header#readme", "devDependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/browserslist-config": "^1.1.1", @@ -71,5 +71,11 @@ "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0", "@openedx/paragon": ">= 21.5.7 < 23.0.0" + }, + "release": { + "tagFormat": "indigo-${version}", + "branches": [ + "redwood/indigo" + ] } } diff --git a/src/Header.jsx b/src/Header.jsx index c0db257c72..554babd948 100644 --- a/src/Header.jsx +++ b/src/Header.jsx @@ -102,10 +102,10 @@ const Header = ({ intl }) => { return ( <> - + - + diff --git a/src/MobileHeader.jsx b/src/MobileHeader.jsx index 506deb33d0..36de82b40d 100644 --- a/src/MobileHeader.jsx +++ b/src/MobileHeader.jsx @@ -5,7 +5,6 @@ import { getConfig } from '@edx/frontend-platform'; // Local Components import { Menu, MenuTrigger, MenuContent } from './Menu'; -import Avatar from './Avatar'; import { LinkedLogo, Logo } from './Logo'; // i18n @@ -87,8 +86,6 @@ class MobileHeader extends React.Component { logoAltText, logoDestination, loggedIn, - avatar, - username, stickyOnMobile, intl, mainMenu, @@ -106,7 +103,7 @@ class MobileHeader extends React.Component { > {intl.formatMessage(messages['header.label.skip.nav'])} {mainMenu.length > 0 ? ( -
+
) : null} -
+
{ logoDestination === null ? : }
{userMenu.length > 0 || loggedOutItems.length > 0 ? ( -
+
- +
+ + + + +
{loggedIn ? this.renderUserMenuItems() : this.renderLoggedOutItems()} diff --git a/src/__snapshots__/Header.test.jsx.snap b/src/__snapshots__/Header.test.jsx.snap index f83161b154..84c799c3e4 100644 --- a/src/__snapshots__/Header.test.jsx.snap +++ b/src/__snapshots__/Header.test.jsx.snap @@ -71,7 +71,7 @@ exports[`
renders correctly for anonymous mobile 1`] = ` Skip to main content
renders correctly for anonymous mobile 1`] = `
@@ -317,7 +303,7 @@ exports[`
renders correctly for authenticated mobile 1`] = ` Skip to main content
renders correctly for authenticated mobile 1`] = `
diff --git a/src/learning-header/AuthenticatedUserDropdown.jsx b/src/learning-header/AuthenticatedUserDropdown.jsx index 9caadb412f..501563bcd2 100644 --- a/src/learning-header/AuthenticatedUserDropdown.jsx +++ b/src/learning-header/AuthenticatedUserDropdown.jsx @@ -1,8 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faUserCircle } from '@fortawesome/free-solid-svg-icons'; import { getConfig } from '@edx/frontend-platform'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { Dropdown } from '@openedx/paragon'; @@ -17,34 +15,38 @@ const AuthenticatedUserDropdown = ({ intl, username }) => { ); return ( - <> - {intl.formatMessage(messages.help)} - - - - - {username} - - - - {dashboardMenuItem} - - {intl.formatMessage(messages.profile)} - - - {intl.formatMessage(messages.account)} - - { getConfig().ORDER_HISTORY_URL && ( - - {intl.formatMessage(messages.orderHistory)} - - )} - - {intl.formatMessage(messages.signOut)} - - - - + + +
+ + + + +
+ + {username} + +
+ + My Courses + Discover + {dashboardMenuItem} + + {intl.formatMessage(messages.profile)} + + + {intl.formatMessage(messages.account)} + + { getConfig().ORDER_HISTORY_URL && ( + + {intl.formatMessage(messages.orderHistory)} + + )} + + {intl.formatMessage(messages.signOut)} + + +
); }; diff --git a/src/learning-header/LearningHeader.jsx b/src/learning-header/LearningHeader.jsx index 373001d190..b43ed38cb9 100644 --- a/src/learning-header/LearningHeader.jsx +++ b/src/learning-header/LearningHeader.jsx @@ -40,13 +40,25 @@ const LearningHeader = ({ ); return ( -
+
{intl.formatMessage(messages.skipNavLink)}
{headerLogo}
- {courseOrg} {courseNumber} - {courseTitle} +
+ {courseTitle} + {courseOrg} {courseNumber} +
+ +
{showUserDropdown && authenticatedUser && (