Skip to content

Jlc/add nelc custom dependencies#3

Merged
johanseto merged 4 commits intoopen-release/teak.nelpfrom
jlc/add-nelc-custom-dependencies
Nov 4, 2025
Merged

Jlc/add nelc custom dependencies#3
johanseto merged 4 commits intoopen-release/teak.nelpfrom
jlc/add-nelc-custom-dependencies

Conversation

@johanseto
Copy link
Collaborator

@johanseto johanseto commented Oct 28, 2025

Description

Add nelc dependencies.

Current status: UNBlocked

Frontend platform is being not compatible due logging app initialization.

2025-10-28_16-28

jira story: https://edunext.atlassian.net/browse/FUTUREX-1463?atlOrigin=eyJpIjoiNTNhNDRjYWQ4MTFjNDIyYTg3MWY0OTkyOWM4YWQ3MGYiLCJwIjoiaiJ9

After using an appropriate paragon package Frontend platform starts working

  • Language selector
  • ProfileDataModal
  • Brand (Default font)

Issue # 1530

How to test language selector

  1. Checkout this branch
  2. Run npm install
  3. Run the following commands
export PATH="$(pwd)/node_modules/.bin:$PATH" 
make OPENEDX_ATLAS_PULL=true ATLAS_OPTIONS="--repository=nelc/futurex-translations --revision=open-release/redwood.master" pull_translations
  1. Add the following setting MFE_CONFIG["ENABLE_HEADER_LANG_SELECTOR"] = True
  2. Verify the language selector component
Screencast.from.31-10-25.11.27.55.webm

How to branding and primary color customization

  1. run npm install
  2. Open discussion -> the mfe must load with default color
  3. Add the following setting and check discussion page -> the mfe must load with red color
  "CUSTOM_PRIMARY_COLORS": {
    "pgn-color-primary-base": "#AA0000"
  },
  1. Add the following setting and check discussion page -> the mfe must load with green color
  "PARAGON_THEME_URLS": {
    "core": {
        "url": "https://cdn.jsdelivr.net/combine/npm/@edx/paragon@22.0.0-alpha.13/styles/css/themes/light/utility-classes.min.css,npm/@edx/paragon@22.0.0-alpha.13/dist/core.min.css"
    },
    "defaults": {
        "light": "light"
    },
    "variants": {
        "light": {
            "url": "https://css-varsify.s3.amazonaws.com/public/a9959998-0bab-4447-ada5-6819866195f3.css"
        }
    }
  },
  1. check the typography
Screencast.from.31-10-25.11.27.40.webm

How to test ProfileDataModal

  1. Checkout this branch
  2. Run npm install
  3. Add the following setting
VALID_PUBLIC_SECTORS = [
    "saudi_post",
    "communications_and_information_technology_commission",
    "ministry_of_communications_and_information_technology",
    "real_estate_development_fund",
    "general_authority_for_statistics",
    "other"
]
REQUIRED_USER_FIELDS = {
    "account": {
    },
    "profile": {
        "phone_number": {"max_length": 15, "format": "phone"},
    },
    "extra_info": {
        "occupation": {
            "char_type": "latin",
            "max_length": 50,
        },
        "sector": {
            "allow_empty": True,
            "dependent_fields": {
                "extrainfo.occupation": {
                    "employee": [
                        "public",
                        "private",
                        "non_profit"
                    ]
                }
            },
            "max_length": 50
        },
        "specific_sector": {
            "allow_empty": True,
            "dependent_fields": {
                "extrainfo.sector": {
                    "public": VALID_PUBLIC_SECTORS,
                }
            },
            "max_length": 150,
        },
        "national_id": {
            "max_length": 15,
            "format": "numeric",
        },
        "arabic_name": {
            "max_length": 50,
            "char_type": "arabic",
        },
    },
}
ENABLE_OTP_VALIDATION = False
USER_PROFILE_API_EXTRA_INFO_FIELDS = [
    "arabic_name",
    "arabic_first_name",
    "arabic_last_name",
    "occupation",
    "sector",
    "national_id",
    "specific_sector",
]
CONDITIONAL_USER_FIELDS = {
    "occupation": {
        "dependent_fields": {
            "employee": [
                "sector",
            ],
        },
        "key": "occupation",
        "options": [
            "employee",
            "student",
            "unemployed",
        ],
    },
    "public_sector": {
        "key": "specificSector",
        "options": VALID_PUBLIC_SECTORS,
    },
    "sector": {
        "dependent_fields": {
            "non_profit": [
                "specific_sector",
            ],
            "private": [
                "specific_sector",
            ],
            "public": [
                "public_sector",
            ]
        },
        "key": "sector",
        "options": [
            "public",
            "private",
            "non_profit",
        ],
    },
}
MFE_CONFIG["CONDITIONAL_USER_FIELDS"] = CONDITIONAL_USER_FIELDS
MFE_CONFIG["COURSE_EXPERIENCE_API_URL"] = "http://local.openedx.io:8000/eox-nelp/api/experience/v1"
MFE_CONFIG["OTP_API_URL"] = "http://local.openedx.io:8000/eox-nelp/api/one-time-password/v1"
MFE_CONFIG["USER_PROFILE_API_URL"] = "http://local.openedx.io:8000/eox-nelp/api/user-profile/v1"
  1. Go to accounts page
  2. Verify the modal behavior, complete all the fields and save the data
Screencast.from.31-10-25.11.25.49.webm

Copy link
Collaborator

@andrey-canon andrey-canon left a comment

Choose a reason for hiding this comment

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

You set the base branch (open-release/teak.nelp) from release/teak, which is incorrect. The correct base is teak-design-tokens. Please retarget your PR to a Paragon-compatible branch—start with teak-design-tokens.

package.json Outdated
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/brand": "github:nelc/brand-openedx#open-release/teak.nelp",
"@edx/frontend-component-footer": "^14.6.0",
"@edx/frontend-component-header": "^6.2.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is missing

@johanseto johanseto force-pushed the jlc/disable-coverage branch from aa86baf to ef618fd Compare October 30, 2025 22:34
@johanseto johanseto changed the base branch from jlc/disable-coverage to open-release/teak.nelp October 30, 2025 22:42
@johanseto johanseto force-pushed the jlc/add-nelc-custom-dependencies branch from 33f06f0 to bdf8543 Compare October 30, 2025 22:44
@johanseto johanseto force-pushed the jlc/add-nelc-custom-dependencies branch from bdf8543 to 6ac04fd Compare October 30, 2025 22:49
Copy link
Collaborator

@andrey-canon andrey-canon left a comment

Choose a reason for hiding this comment

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

After changing the base branch I didn't have any issue

Image

However styles and the custom header are still missing

@johanseto johanseto marked this pull request as ready for review October 31, 2025 16:40
Copy link
Collaborator

@andrey-canon andrey-canon left a comment

Choose a reason for hiding this comment

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

LGTM

2025-10-31.13-10-58.mp4

@johanseto johanseto merged commit 5a5e764 into open-release/teak.nelp Nov 4, 2025
5 checks passed
@johanseto johanseto temporarily deployed to open-release/teak.nelp November 4, 2025 13:48 — with GitHub Actions Inactive
@johanseto johanseto temporarily deployed to open-release/teak.nelp November 4, 2025 13:48 — with GitHub Actions Inactive
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.

2 participants