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

feat: introduced LearningHeader for frontend-app-learning #133

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

asadiqbal08
Copy link
Contributor

@asadiqbal08 asadiqbal08 commented Oct 28, 2021

fixes: mitodl/mitxonline#252

Earlier Review References of @davidjoy

Reference-1
Reference-2

As per some suggestion by David, We need to refactor the code in EdX Learning MFE to utilize the header from frontend-component-header instead of course-header

screencapture-localhost-2000-course-course-v1-edX-DemoX-Demo-Course-block-v1-edX-DemoX-Demo-Course-type-sequential-block-edx-introduction-block-v1-edX-DemoX-Demo-Course-type-vertical-block-vertical-0270f6de40fc-2021-10-22-17_28_58
.

@asadiqbal08 asadiqbal08 requested a review from a team October 28, 2021 08:28
@openedx-webhooks
Copy link

Thanks for the pull request, @asadiqbal08! I've created OSPR-6184 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

src/generic/messages.js Outdated Show resolved Hide resolved
Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes, but this looks like what we're after. Would you mind just running through the messages really quick and making sure they're all in use in here?

@asadiqbal08
Copy link
Contributor Author

@davidjoy anything else need to address here or good to go ?

@davidjoy davidjoy changed the title asadiqbal08/Introduced Learning Course Header in MFE. feat: introduced LearningHeader for frontend-app-learning Nov 1, 2021
@asadiqbal08 asadiqbal08 force-pushed the asadiqbal08/learning-header branch 4 times, most recently from de21631 to 5e7358d Compare November 8, 2021 09:32
@davidjoy
Copy link
Contributor

Ugh, it still seems to have some package-lock.json problems. Try running npm ci locally to see the error - looks like package-lock.json doesn't like some font-awesome versions. Does running npm i produce any changes to package-lock.json? If not, we may need to just re-generate package-lock.json by deleting it and running npm i, but it'd be preferable not to if we can avoid it.

Otherwise this looks good to go and as soon as we get that check to pass, we can merge.

Copy link
Contributor

@davidjoy davidjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are issues with package-lock.json - see my prior comment above.

@asadiqbal08
Copy link
Contributor Author

asadiqbal08 commented Nov 22, 2021

Yes, I forgot to push updated package-lock.json, Now I am not getting any error locally. let see over the CI pipeline here.

@asadiqbal08 asadiqbal08 force-pushed the asadiqbal08/learning-header branch 2 times, most recently from 4670174 to 736739d Compare November 25, 2021 11:13
@asadiqbal08 asadiqbal08 requested a review from davidjoy November 25, 2021 11:13
@asadiqbal08
Copy link
Contributor Author

@davidjoy I updated the PR to fix issues that causing build failure in the CI pipeline. I make sure by re running the Github action on local devstack and also fixed the corresponding test failure issues. 🤞🤞

@asadiqbal08 asadiqbal08 force-pushed the asadiqbal08/learning-header branch from 789075c to 6deacc0 Compare November 30, 2021 08:28
{
type: 'item',
href: config.LOGOUT_URL,
content: intl.formatMessage(messages['header.user.menu.logout']),
},
];

// Users should only see Order History if have a ORDER_HISTORY_URL define in the environment.
if (config.ORDER_HISTORY_URL) {
userMenu.splice(-1, 0, orderHistoryItem);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidjoy FYI, I kept the OrderHistory conditional on basis of ORDER_HISTORY_URL

@asadiqbal08 asadiqbal08 force-pushed the asadiqbal08/learning-header branch from 93eb8be to 6e31803 Compare December 1, 2021 11:08
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/account/settings`}>
{intl.formatMessage(messages.account)}
</Dropdown.Item>
{ getConfig().ORDER_HISTORY_URL && (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

@codecov-commenter
Copy link

Codecov Report

Merging #133 (6e31803) into master (56963c2) will increase coverage by 58.91%.
The diff coverage is 81.48%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #133       +/-   ##
===========================================
+ Coverage        0   58.91%   +58.91%     
===========================================
  Files           0       14       +14     
  Lines           0      258      +258     
  Branches        0       60       +60     
===========================================
+ Hits            0      152      +152     
- Misses          0      105      +105     
- Partials        0        1        +1     
Impacted Files Coverage Δ
src/i18n/index.js 100.00% <ø> (ø)
src/learning-header/AnonymousUserMenu.jsx 33.33% <33.33%> (ø)
src/Header.jsx 89.47% <66.66%> (ø)
src/learning-header/AuthenticatedUserDropdown.jsx 83.33% <83.33%> (ø)
src/learning-header/LearningHeader.jsx 92.30% <92.30%> (ø)
src/generic/messages.js 100.00% <100.00%> (ø)
src/learning-header/messages.js 100.00% <100.00%> (ø)
src/MobileHeader.jsx 86.11% <0.00%> (ø)
src/Logo.jsx 66.66% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56963c2...6e31803. Read the comment docs.

@davidjoy davidjoy merged commit 2db0fd5 into openedx:master Dec 2, 2021
@openedx-webhooks
Copy link

@asadiqbal08 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Learning MFE Header to frontend-component-header MFE
4 participants