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(redwood): add nau learning header customization #3

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

dcoa
Copy link

@dcoa dcoa commented Jun 25, 2024

This PR migrates the custom NAU header changes to the Redwood version.

image

How to test

  1. Create a tutor redwood environment.
  2. Inside your environment clone the learning MFE and mount it with tutor mounts add ./frontend-app-learning.
  3. Inside the learning MFE, clone the header repository with the current branch (remember to run npm install for both, the learning app and the header).
  4. Create the module.config.js file and add the following configuration.
module.exports = {
  localModules: [
    { moduleName: '@edx/frontend-component-header/dist', dir: './frontend-component-header-nau', dist: 'src' },
    { moduleName: '@edx/frontend-component-header', dir: './frontend-component-header-nau', dist: 'src' },
  ],
};
  1. Run the command tutor images build learning-dev.
  2. Start your environment tutor dev start.
  3. Create a course and configure the organization info inside the LMS admin.
  4. Open the courseware and check you can see the changes.

@dcoa dcoa force-pushed the dcoa/quince-migration branch 2 times, most recently from c719213 to aeaf417 Compare July 1, 2024 00:43
dcoa and others added 3 commits July 1, 2024 12:09
* feat: add nau basic customization

* fix: remove unnecessary courseOrg as argument
* fix: platform logo on mobile display
* fix: hide course name on mobile
@dcoa dcoa force-pushed the dcoa/quince-migration branch 2 times, most recently from af4b574 to 6439ce5 Compare July 1, 2024 04:40
@dcoa dcoa marked this pull request as ready for review July 1, 2024 04:40
@igobranco
Copy link
Member

@dcoa can you fix the lint?

@sandroscosta
Copy link

Code looks ok but I still need to install quince and run some tests. Would you suggest TVM to have quince installed along side Nutmeg, our previous version?

@dcoa
Copy link
Author

dcoa commented Jul 1, 2024

TVM allows you to have different environments in the same machine without problem, it's a good option for local testing.

@dcoa dcoa changed the title feat: add nau learning header customization feat(redwood): add nau learning header customization Jul 1, 2024
@dcoa
Copy link
Author

dcoa commented Aug 12, 2024

Hi @sandroscosta have you been able to run the testing? Do you have any other issues that should be addressed?

@sandroscosta
Copy link

sandroscosta commented Aug 20, 2024

Hi @dcoa. Ran all the tests. Everything looks fine. The only thing I want to ask you is if you think we should cast our config variable as boolean, like

const enabledOrgLogo = !!getConfig().ENABLED_ORG_LOGO || false;

The rest of it is all ok.

@dcoa
Copy link
Author

dcoa commented Aug 20, 2024

Hi @sandroscosta, thanks for your review. Answer your question it is been cast as a boolean in the capturing of the env variable, here

ENABLED_ORG_LOGO: !!process.env.ENABLED_ORG_LOGO,

@sandroscosta
Copy link

Fantastic. As I didn't see it in this PR, I never went and looked for it elsewhere. I'll just tweak the variable name, as I named it incorrectly in past tense. Would you mind if I do a commit into this branch?

Rename the setting to be in the present tense, as
a way to make it clearer. The setting is now called
`ENABLE_ORG_LOGO`.
@sandroscosta
Copy link

@dcoa I think that everything is valid on this PR. I'm going to merge this, if you agree.

Copy link

@sandroscosta sandroscosta left a comment

Choose a reason for hiding this comment

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

LGTM

@sandroscosta sandroscosta merged commit 041bed2 into nau/redwood.master Aug 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants