Compare commits

..

1 Commits

Author SHA1 Message Date
Awais Ansari
1c040f80b0 test 2025-02-14 16:20:55 +05:00
12 changed files with 3803 additions and 13944 deletions

2
.env
View File

@@ -29,5 +29,3 @@ APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL=''
ENABLE_SKILLS_BUILDER_PROFILE=''
# Fallback in local style files
PARAGON_THEME_URLS={}

View File

@@ -30,5 +30,3 @@ APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL='http://localhost:18000/courses'
ENABLE_SKILLS_BUILDER_PROFILE=''
# Fallback in local style files
PARAGON_THEME_URLS={}

View File

@@ -25,4 +25,3 @@ LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true
APP_ID=''
MFE_CONFIG_API_URL=''
PARAGON_THEME_URLS={}

View File

@@ -151,3 +151,4 @@ Reporting Security Issues
=========================
Please do not report security issues in public. Email security@openedx.org instead.
test

17632
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,6 @@
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"dev": "PUBLIC_PATH=/profile/ MFE_CONFIG_API_URL='http://localhost:8000/api/mfe_config/v1' fedx-scripts webpack-dev-server --progress --host apps.local.openedx.io",
"test": "TZ=UTC fedx-scripts jest --coverage --passWithNoTests",
"stubs": "pact-stub-service ./src/pacts/frontend-app-profile-edx-platform.json --port 18000"
},
@@ -30,32 +29,32 @@
],
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-footer": "^14.6.0",
"@edx/frontend-component-header": "^6.2.0",
"@edx/frontend-platform": "^8.3.1",
"@edx/openedx-atlas": "^0.7.0",
"@edx/frontend-component-header": "^5.6.0",
"@edx/frontend-platform": "8.1.5",
"@edx/openedx-atlas": "^0.6.0",
"@fortawesome/fontawesome-svg-core": "6.7.2",
"@fortawesome/free-brands-svg-icons": "6.7.2",
"@fortawesome/free-regular-svg-icons": "6.7.2",
"@fortawesome/free-solid-svg-icons": "6.7.2",
"@fortawesome/react-fontawesome": "0.2.2",
"@openedx/paragon": "^23.4.5",
"@openedx/frontend-slot-footer": "^1.0.2",
"@openedx/paragon": "^22.2.2",
"@pact-foundation/pact": "^11.0.2",
"@redux-devtools/extension": "3.3.0",
"classnames": "2.5.1",
"core-js": "3.43.0",
"core-js": "3.40.0",
"history": "5.3.0",
"lodash.camelcase": "4.3.0",
"lodash.get": "4.4.2",
"lodash.pick": "4.4.0",
"lodash.snakecase": "4.1.1",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "6.1.0",
"react-redux": "7.2.9",
"react-router": "6.30.1",
"react-router-dom": "6.30.1",
"react-router": "6.29.0",
"react-router-dom": "6.29.0",
"redux": "4.2.1",
"redux-logger": "3.0.6",
"redux-saga": "1.3.0",
@@ -65,14 +64,14 @@
"universal-cookie": "4.0.4"
},
"devDependencies": {
"@commitlint/cli": "19.8.1",
"@commitlint/config-angular": "19.8.1",
"@commitlint/cli": "19.7.1",
"@commitlint/config-angular": "19.7.1",
"@edx/browserslist-config": "^1.1.1",
"@edx/reactifex": "2.2.0",
"@openedx/frontend-build": "^14.3.3",
"@openedx/frontend-build": "14.2.2",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "14.3.1",
"glob": "11.0.3",
"@testing-library/react": "12.1.5",
"glob": "11.0.1",
"reactifex": "1.1.1",
"redux-mock-store": "1.5.5"
}

View File

@@ -13,12 +13,11 @@ import {
ErrorPage,
} from '@edx/frontend-platform/react';
import React, { StrictMode } from 'react';
// eslint-disable-next-line import/no-unresolved
import { createRoot } from 'react-dom/client';
import React from 'react';
import ReactDOM from 'react-dom';
import Header from '@edx/frontend-component-header';
import { FooterSlot } from '@edx/frontend-component-footer';
import FooterSlot from '@openedx/frontend-slot-footer';
import messages from './i18n';
import configureStore from './data/configureStore';
@@ -28,24 +27,22 @@ import Head from './head/Head';
import AppRoutes from './routes/AppRoutes';
const rootNode = createRoot(document.getElementById('root'));
subscribe(APP_READY, () => {
rootNode.render(
<StrictMode>
<AppProvider store={configureStore()}>
<Head />
<Header />
<main id="main">
<AppRoutes />
</main>
<FooterSlot />
</AppProvider>
</StrictMode>,
ReactDOM.render(
<AppProvider store={configureStore()}>
<Head />
<Header />
<main id="main">
<AppRoutes />
</main>
<FooterSlot />
</AppProvider>,
document.getElementById('root'),
);
});
subscribe(APP_INIT_ERROR, (error) => {
rootNode.render(<ErrorPage message={error.message} />);
ReactDOM.render(<ErrorPage message={error.message} />, document.getElementById('root'));
});
initialize({

View File

@@ -1,5 +1,7 @@
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
@import "~@edx/brand/paragon/fonts";
@import "~@edx/brand/paragon/variables";
@import "~@openedx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";
@import "~@edx/frontend-component-header/dist/index";
@import "~@edx/frontend-component-footer/dist/footer";

View File

@@ -1,15 +1,12 @@
# Footer Slot
### Slot ID: `org.openedx.frontend.layout.footer.v1`
### Slot ID Aliases
* `footer_slot`
### Slot ID: `footer_slot`
## Description
This slot is used to replace/modify/hide the footer.
The implementation of the `FooterSlot` component lives in [the `frontend-component-footer` repository](https://github.com/openedx/frontend-component-footer/).
The implementation of the `FooterSlot` component lives in [the `frontend-slot-footer` repository](https://github.com/openedx/frontend-slot-footer/).
## Example
@@ -26,7 +23,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
'org.openedx.frontend.layout.footer.v1': {
footer_slot: {
plugins: [
{
// Hide the default footer

View File

@@ -1,3 +1,3 @@
# `frontend-app-profile` Plugin Slots
* [`org.openedx.frontend.layout.footer.v1`](./FooterSlot/)
* [`footer_slot`](./FooterSlot/)

View File

@@ -65,10 +65,9 @@ exports[`<ProfilePage /> Renders correctly in various states successfully redire
Upload Photo
</button>
</div>
<div
<iconmock
aria-hidden="true"
class="text-muted"
data-testid="IconMock"
focusable="false"
role="img"
viewbox="0 0 24 24"
@@ -5768,10 +5767,9 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
<div
class="profile-avatar rounded-circle bg-light"
>
<div
<iconmock
aria-hidden="true"
class="text-muted"
data-testid="IconMock"
focusable="false"
role="img"
viewbox="0 0 24 24"

View File

@@ -28,7 +28,7 @@
position: absolute;
left: 1.5rem;
top: 5.25rem;
color: var(--pgn-color-gray-500);
color: $gray-500;
line-height: 0.9rem;
font-size: 0.8rem;
font-style: normal;
@@ -42,12 +42,12 @@
.icon-visibility-off {
height: 1rem;
color: var(--pgn-color-gray-500);
color: $gray-500;
}
.profile-page {
.edit-section-header {
font-size: var(--pgn-typography-font-size-h6-base);
@extend .h6;
display: block;
font-weight: normal;
letter-spacing: 0;
@@ -55,11 +55,11 @@
}
label.edit-section-header {
margin-bottom: calc(var(--pgn-spacing-spacer-base) * .5);
margin-bottom: $spacer * .5;
}
.profile-avatar-wrap {
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
max-width: 12rem;
margin-right: 0;
margin-top: -8rem;
@@ -77,25 +77,25 @@
align-items: center;
border-radius: 50%;
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
background: linear-gradient(to top, rgba(0,0,0,.65) 4rem, rgba(0,0,0,0) 4rem);
align-items: flex-end;
}
.btn {
text-decoration: none;
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
margin-bottom: 1.2rem;
}
}
.dropdown {
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
margin-bottom: 1.2rem;
}
.btn {
color: var(--pgn-color-white);
color: $white;
background: transparent;
border-color: transparent;
margin: 0;
@@ -108,7 +108,7 @@
height: 5rem;
position: relative;
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
width: 12rem;
height: 12rem;
}
@@ -128,7 +128,7 @@
border-radius:0;
transition: opacity 200ms ease;
@media (--pgn-size-breakpoint-min-width-md) {
@include media-breakpoint-up(md) {
height: 4rem;
}
@@ -142,7 +142,7 @@
position: relative;
.certificate-title {
font-family: var(--pgn-typography-font-family-serif);
font-family: $font-family-serif;
font-weight: 400;
}