feat: display multiple dashboards and some style fixes#667
Conversation
100cef3 to
dc7080b
Compare
| const secondaryMenu = secondaryMenuItems || defaultSecondaryMenu; | ||
| let userMenu = authenticatedUser === null ? [] : userMenuItems || defaultUserMenu; | ||
|
|
||
| const minimalDashboardMenuItem = { |
There was a problem hiding this comment.
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.
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.
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.
| 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.
Only make this tab active when the user is on the Learner Dashboard page, otherwise leave it inactive on any other page.
| </Dropdown.Item> | ||
| )} | ||
| <UserMenuGroupSlot /> | ||
| <UserDashboardMenu |
There was a problem hiding this comment.
Consider: move the UserDashboardMenu to be the default content of the UserMenuGroupSlot
|
|
||
| const userMenuGroupSlot = <UserMenuGroupSlot />; | ||
| const userMenuGroupItemSlot = <UserMenuGroupItemSlot />; | ||
| const userDashboardMenu = ( |
There was a problem hiding this comment.
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