-
Notifications
You must be signed in to change notification settings - Fork 96
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
fix: replace the header with openedx header #327
Conversation
ec9abb1
to
418657e
Compare
22d3398
to
977a0a8
Compare
977a0a8
to
a8274a8
Compare
e9e5ac9
to
b65f44f
Compare
content: formatMessage(messages.dashboardPersonal), | ||
isActive: true, | ||
}, | ||
...(!_.isEmpty(dashboard) ? [{ |
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.
i think we should keep the condition same as it is in learner-dashboard !!dashboard
.
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.
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.
I will let the relevant team comment on this.
5fafc13
to
7931d32
Compare
Hey @ahtesham-quraish , I'll be looking over this PR tomorrow! A question that I do have is whether it's possible to move the edX logic of |
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 is great in general - thanks! I'd like to see some of the business-specific code moved elsewhere, though, if we can manage it.
}, | ||
], | ||
userMenu: [ | ||
...(getConfig().ENABLE_EDX_PERSONAL_DASHBOARD ? [ |
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.
Ideally, this should be moved somewhere else. We can either put the header behind a <PluginSlot />
so this 2U-specific can go in a plugin, or, as @jsnwesson comments, this could move to frontend-component-header-edx
.
{ | ||
heading: '', | ||
items: [ | ||
...(_.isEmpty(dashboard) && getConfig().CAREER_LINK_URL ? [{ |
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 also looks like org-specific code that we could take this opportunity to move to a plugin or a header fork.
We were going with feature parity but after looking at the @arbrandes comment we are going to see the strategy to remove the 2u specific code from Dashboard MFE and move it in header-edx fork so that is why we are holding this PR back. |
c73f946
to
fb35614
Compare
Hi @jsnwesson, we have extracted the edX-specific code out of the learner-dashboard and now using plugin slots to insert that menu. Could you please look at this PR and the following related PRs as well? |
Hi @arbrandes, Thanks. We have removed the business-specific code from the PR. that code will be added through plugin slots in |
courseSearchUrl, authenticatedUser, dashboard, exploreCoursesClick, | ||
}) => { | ||
const { formatMessage } = useIntl(); | ||
return getLearnerHeaderMenu(formatMessage, courseSearchUrl, authenticatedUser, dashboard, exploreCoursesClick); |
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.
I'm noticing that dashboard
never gets used by getLearnerHeaderMenu
, and it's supposed to be data from reduxHooks.useEnterpriseDashboardData()
in LearnerDashboardHeader/index.jsx
. Should some of this logic live in the 2U-forked header-component?
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.
yes, you are right. The dashboard
is removed from here and edx specific login has been moved out.
fb35614
to
eddb511
Compare
b31c7d0
to
69f813c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
+ Coverage 95.70% 95.72% +0.01%
==========================================
Files 166 163 -3
Lines 1491 1451 -40
Branches 268 244 -24
==========================================
- Hits 1427 1389 -38
+ Misses 60 58 -2
Partials 4 4 ☔ View full report in Codecov by Sentry. |
7a295a2
to
2d4db56
Compare
Hi @jsnwesson @arbrandes, this PR is ready for re-review. Please have a look. |
Thanks @syedsajjadkazmii ! I tested out the Learner Dashboard locally with the other PRs you linked above, and this checks out for me. |
2d4db56
to
d7bec07
Compare
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.
I've (finally) tested this, and it works fine! Code looks good, too. Thanks a lot for doing this!
@brian-smith-tcril, FYI: learner dashboard will now have a standard header, which should make the slot work a little easier. |
d7bec07
to
4914061
Compare
Description: Replace the header with openedx header van-1914
4914061
to
dc2ae40
Compare
Description:
Replace the custom header with the Openedx header using the configurable header and plugin slots
Dashboards
user menu group andCareer
user menu item) is inserted via pluginsJira Ticket
VAN-1951
How this has been tested?
Screenshots