Skip to content

feat: set edunext/nelp frontend-component-header#27

Merged
andrey-canon merged 1 commit intoopen-release/teak.nelpfrom
teak-mig/FUTUREX-1290
Oct 20, 2025
Merged

feat: set edunext/nelp frontend-component-header#27
andrey-canon merged 1 commit intoopen-release/teak.nelpfrom
teak-mig/FUTUREX-1290

Conversation

@andrey-canon
Copy link
Collaborator

@andrey-canon andrey-canon commented Oct 16, 2025

Description

This adds the NELC custom version of frontend-component-header. That version includes the following features

  • Language selector
  • LisaAI
  • ProfileDataModal

Issue # 1288

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
2025-10-16.12-34-23.mp4

How to test LisaAI

  1. Checkout this branch
  2. Run npm install
  3. Add the following setting
MFE_CONFIG_OVERRIDES = {
    "discussions": {
        "LISAN_AI_CLIENT_ID": "your-id",
        "LISAN_AI_ENABLED": True,
    }
}
  1. Go to discussion page
  2. Add a post
2025-10-16.12-34-37.mp4

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 discussion page
  2. Verify the modal behavior, complete all the fields and save the data
2025-10-16.12-37-39.mp4

Copy link
Collaborator

@johanseto johanseto left a comment

Choose a reason for hiding this comment

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

LGTM working in my local env.

Screencast.from.20-10-25.10.05.37.webm
Screencast.from.20-10-25.10.05.20.webm

Also the profile fight with react warning, but its ok.

Screencast.from.20-10-25.10.14.09.webm
image

@andrey-canon andrey-canon force-pushed the teak-mig/FUTUREX-1291 branch from b79d739 to 2cc74ad Compare October 20, 2025 16:01
@andrey-canon andrey-canon changed the base branch from teak-mig/FUTUREX-1291 to open-release/teak.nelp October 20, 2025 16:03
@andrey-canon andrey-canon force-pushed the teak-mig/FUTUREX-1290 branch from 263c64a to ea974ee Compare October 20, 2025 16:03
@andrey-canon andrey-canon merged commit 55f40bf into open-release/teak.nelp Oct 20, 2025
3 checks passed
@andrey-canon andrey-canon temporarily deployed to open-release/teak.nelp October 20, 2025 16:05 — with GitHub Actions Inactive
@andrey-canon andrey-canon temporarily deployed to open-release/teak.nelp October 20, 2025 16:05 — with GitHub Actions Inactive
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.

2 participants