-
Notifications
You must be signed in to change notification settings - Fork 13
feat: display multiple dashboards and some style fixes #667
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
base: master
Are you sure you want to change the base?
Conversation
100cef3 to
dc7080b
Compare
| const secondaryMenu = secondaryMenuItems || defaultSecondaryMenu; | ||
| let userMenu = authenticatedUser === null ? [] : userMenuItems || defaultUserMenu; | ||
|
|
||
| const minimalDashboardMenuItem = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Minimal header (used in Payment MFE) should only display one dashboard, which has historically pointed to the personal dashboard, so I'm choosing to leave this unchanged.
| ); | ||
| }, | ||
| }, | ||
| }] : []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only render the Career button when the user doesn't have an Enterprise account, similarly with the Order History button.
| } else { | ||
| baseUserMenuDashboardLinks = [dashboardMenuItem]; | ||
| } | ||
| const defaultSecondaryMenu = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "Help" button is new to the default Header experience, but it has already existed for a while in the Learning and Learner Dashboard pages.
src/Header.jsx
Outdated
| type: 'item', | ||
| href: `${config.LMS_BASE_URL}/dashboard`, | ||
| content: intl.formatMessage(messages['header.links.courses']), | ||
| isActive: document.title.includes('Learner Home'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only make this tab active when the user is on the Learner Dashboard page, otherwise leave it inactive on any other page.
src/DesktopHeader.jsx
Outdated
| </Dropdown.Item> | ||
| )} | ||
| <UserMenuGroupSlot /> | ||
| <UserDashboardMenu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider: move the UserDashboardMenu to be the default content of the UserMenuGroupSlot
src/MobileHeader.jsx
Outdated
|
|
||
| const userMenuGroupSlot = <UserMenuGroupSlot />; | ||
| const userMenuGroupItemSlot = <UserMenuGroupItemSlot />; | ||
| const userDashboardMenu = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make the most sense, that similar to the DesktopHeader to move the UserDashboardMenu to be default content for UserMenuGroupSlot
5baeb14 to
d24d29f
Compare
d24d29f to
b7a021a
Compare
APER-3690
This PR adds a component to display the personal edX dashboard and a the most recent Enterprise dashboard in the header menu. It also fixes a conditional rendering of the Career button when the user has an Enterprise account.
Testing locally
To test Learner Dashboard or Profile MFE, you'll need to:
npm installand thennpm run startEnterprise User
Old Learner Dashboard with plugins
New Learner Dashboard with default Header
Old Profile page with default Header
New Profile page with default Header
Non-enterprise user
Old Learner Dashboard with plugins
New Learner Dashboard with default Header
Old Profile page with default Header
New Profile page with default Header