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

Introduced a new header as LearningHeader from Frontend Learning MFE. #1

Closed
wants to merge 1 commit into from

Conversation

asadiqbal08
Copy link

fixes: mitodl/mitxonline#252

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
Copy link
Author

@pdpinch anyone from your team can also take a look before I created an upstream PR to edX ?

@pdpinch
Copy link
Member

pdpinch commented Oct 26, 2021

In the description you say:

We need to refactor the code in EdX Learning MFE to utilize the header from frontend-component-header instead of course-header

Have you opened a PR that does that?

@Wassaf-Shahzad Wassaf-Shahzad self-assigned this Oct 26, 2021
src/index.scss Outdated
@@ -25,6 +25,32 @@ $white: #fff;
}
}

.learning-header {
min-width: 0;
background-color: red;

Choose a reason for hiding this comment

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

Red background? Is that intentional or left over from testing? :)

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, added while testing.

}) {
const { authenticatedUser } = useContext(AppContext);

const { enterpriseLearnerPortalLink, enterpriseCustomerBrandingConfig } = useEnterpriseConfig(

Choose a reason for hiding this comment

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

I would suggest we remove this enterprise-specific code and get rid of the dependency on @edx/frontend-enterprise-utils. I don't think that's something that the community would want, in general, so we probably don't want it in the default header. It's probably only used by edx.org.

edx.org can add it in to frontend-component-header-edx's version of the LearningHeader. CC: @adamstankiewicz - who will want to know about that decision/may have input.

@asadiqbal08
Copy link
Author

@davidjoy Thanks for putting suggestions over the PR. I have removed the enterprise specific stuff but I believe, enterprise related stuff should be the part of edx/frontend-component-header-edx so I will create another ticket to keep track of this. Thoughts ?

@asadiqbal08
Copy link
Author

In the description you say:

We need to refactor the code in EdX Learning MFE to utilize the header from frontend-component-header instead of course-header

Have you opened a PR that does that?

No @pdpinch , As that stuff is dependent upon this PR.

@davidjoy
Copy link

davidjoy commented Oct 27, 2021

@davidjoy Thanks for putting suggestions over the PR. I have removed the enterprise specific stuff but I believe, enterprise related stuff should be the part of edx/frontend-component-header-edx so I will create another ticket to keep track of this. Thoughts ?

That sounds great, thanks! Also, my expectation is that it's perfectly fair for us to ask someone from edX to update frontend-component-header-edx. 😄 But documenting the delta as you pull things out would be very helpful for that effort.

@asadiqbal08
Copy link
Author

Closing this in favor of this PR openedx#133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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