diff --git a/.env b/.env
index 1feaf21df..75f3acfb8 100644
--- a/.env
+++ b/.env
@@ -29,3 +29,5 @@ APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL=''
ENABLE_SKILLS_BUILDER_PROFILE=''
+ENABLE_NEW_PROFILE_VIEW=''
+DISABLE_VISIBILITY_EDITING=''
diff --git a/.env.development b/.env.development
index 5694a28d8..53836b5ae 100644
--- a/.env.development
+++ b/.env.development
@@ -30,3 +30,5 @@ APP_ID=''
MFE_CONFIG_API_URL=''
SEARCH_CATALOG_URL='http://localhost:18000/courses'
ENABLE_SKILLS_BUILDER_PROFILE=''
+ENABLE_NEW_PROFILE_VIEW=''
+DISABLE_VISIBILITY_EDITING=''
diff --git a/.env.test b/.env.test
index 716cae188..7e279966e 100644
--- a/.env.test
+++ b/.env.test
@@ -25,3 +25,5 @@ LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true
APP_ID=''
MFE_CONFIG_API_URL=''
+ENABLE_NEW_PROFILE_VIEW=''
+DISABLE_VISIBILITY_EDITING=''
diff --git a/package-lock.json b/package-lock.json
index cb85cd3e3..821a1f7ca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2354,7 +2354,6 @@
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-8.3.1.tgz",
"integrity": "sha512-wDCCFtbWdxk8N/ExIGd/etyidF9YewaRdyGix2nSTujdfKZU/+2cObRxGkardGHREQDGrvqCPW5tmcSNedAIIg==",
- "license": "AGPL-3.0",
"dependencies": {
"@cospired/i18n-iso-languages": "4.2.0",
"@formatjs/intl-pluralrules": "4.3.3",
@@ -2395,7 +2394,6 @@
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
- "license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@@ -2407,7 +2405,6 @@
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
- "license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -2427,7 +2424,6 @@
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
"integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
- "license": "MIT",
"dependencies": {
"@babel/runtime": "^7.1.2",
"loose-envify": "^1.2.0",
@@ -15562,9 +15558,9 @@
}
},
"node_modules/nwsapi": {
- "version": "2.2.18",
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.18.tgz",
- "integrity": "sha512-p1TRH/edngVEHVbwqWnxUViEmq5znDvyB+Sik5cmuLpGOIfDf/39zLiq3swPF8Vakqn+gvNiOQAZu8djYlQILA=="
+ "version": "2.2.19",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.19.tgz",
+ "integrity": "sha512-94bcyI3RsqiZufXjkr3ltkI86iEl+I7uiHVDtcq9wJUTwYQJ5odHDeSzkkrRzi80jJ8MaeZgqKjH1bAWAFw9bA=="
},
"node_modules/object-assign": {
"version": "4.1.1",
diff --git a/src/data/reducers.js b/src/data/reducers.js
index cd17a6394..98b95d263 100755
--- a/src/data/reducers.js
+++ b/src/data/reducers.js
@@ -1,9 +1,14 @@
import { combineReducers } from 'redux';
-import { reducer as profilePage } from '../profile';
+import { getConfig } from '@edx/frontend-platform';
+
+import { reducer as profilePageReducer } from '../profile';
+import { reducer as newProfilePageReducer } from '../profile-v2';
+
+const isNewProfileEnabled = getConfig().ENABLE_NEW_PROFILE_VIEW;
const createRootReducer = () => combineReducers({
- profilePage,
+ profilePage: isNewProfileEnabled ? newProfilePageReducer : profilePageReducer,
});
export default createRootReducer;
diff --git a/src/data/sagas.js b/src/data/sagas.js
index 6486c6e92..fab5ecad8 100644
--- a/src/data/sagas.js
+++ b/src/data/sagas.js
@@ -1,9 +1,12 @@
import { all } from 'redux-saga/effects';
-
+import { getConfig } from '@edx/frontend-platform';
import { saga as profileSaga } from '../profile';
+import { saga as newProfileSaga } from '../profile-v2';
+
+const isNewProfileEnabled = getConfig().ENABLE_NEW_PROFILE_VIEW;
export default function* rootSaga() {
yield all([
- profileSaga(),
+ isNewProfileEnabled ? newProfileSaga() : profileSaga(),
]);
}
diff --git a/src/index-v2.scss b/src/index-v2.scss
new file mode 100755
index 000000000..d54250a8c
--- /dev/null
+++ b/src/index-v2.scss
@@ -0,0 +1,8 @@
+@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";
+
+@import './profile-v2/index';
diff --git a/src/index.jsx b/src/index.jsx
index d3aba8fff..c754a1e77 100755
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -7,6 +7,7 @@ import {
initialize,
mergeConfig,
subscribe,
+ getConfig,
} from '@edx/frontend-platform';
import {
AppProvider,
@@ -22,18 +23,23 @@ import FooterSlot from '@openedx/frontend-slot-footer';
import messages from './i18n';
import configureStore from './data/configureStore';
-import './index.scss';
import Head from './head/Head';
import AppRoutes from './routes/AppRoutes';
-subscribe(APP_READY, () => {
+subscribe(APP_READY, async () => {
+ const isNewProfileEnabled = getConfig().ENABLE_NEW_PROFILE_VIEW === 'true';
+ if (isNewProfileEnabled) {
+ await import('./index-v2.scss');
+ } else {
+ await import('./index.scss');
+ }
ReactDOM.render(
+ {intl.formatMessage(get( + messages, + `profile.certificates.types.${certificateType}`, + messages['profile.certificates.types.unknown'], + ))} +
++ {courseDisplayName} +
+
+
+
+
+
+
+
+ {params.username} +
+ {isBlockVisible(name) && ( ++ {name} +
+ )} +
+ {isMobileView ? (
+
+ {intl.formatMessage(messages['profile.username'])} +
++ {intl.formatMessage(messages['profile.username.tooltip'])} +
+ + )} + > ++ The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again. +
++ The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again. +
++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Full name +
+ ++ Country +
++ Primary language spoken +
++ Education +
++ Bio +
++ X +
++ Profile information +
++ Username +
+ ++ Full name +
+ ++ Country +
++ Primary language spoken +
++ Education +
++ Bio +
++ X +
++ Facebook +
++ LinkedIn +
++ Your certificates +
++ Your learner records information is only visible to you. Only your username and profile image are visible to others on localhost. +
++ Verified Certificate +
++ edX Demonstration Course +
++ From +
++ Completed on + 3/4/2019 +
++ Credential ID +
++ Profile information +
++ Username +
+ ++ Full name +
+ ++ Country +
++ Primary language spoken +
++ Education +
++ Bio +
++ X +
++ Facebook +
++ LinkedIn +
++ Your certificates +
++ Your learner records information is only visible to you. Only your username and profile image are visible to others on localhost. +
++ Verified Certificate +
++ edX Demonstration Course +
++ From +
++ Completed on + 3/4/2019 +
++ Credential ID +
++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ Profile information +
++ Username +
+ ++ {intl.formatMessage(messages['profile.bio.about.me'])} +
+ + {error !== null && ( ++ {intl.formatMessage(messages['profile.bio.about.me'])} +
++ {intl.formatMessage(messages['profile.bio.about.me'])} +
++ {intl.formatMessage(messages['profile.bio.about.me'])} +
++ {intl.formatMessage(messages['profile.country.label'])} +
+ + {error !== null && ( ++ {intl.formatMessage(messages['profile.country.label'])} +
++ {intl.formatMessage(messages['profile.country.label'])} +
++ {intl.formatMessage(messages['profile.country.label'])} +
++ {intl.formatMessage(messages['profile.education.education'])} +
+ + {error !== null && ( ++ {intl.formatMessage(messages['profile.education.education'])} +
++ {intl.formatMessage(messages['profile.education.education'])} +
++ {intl.formatMessage(messages['profile.education.education'])} +
++ {intl.formatMessage(messages['profile.name.full.name'])} +
++ {intl.formatMessage(messages['profile.name.tooltip'])} +
+ + )} + > ++ {intl.formatMessage(messages['profile.name.full.name'])} +
++ {intl.formatMessage(messages['profile.name.tooltip'])} +
+ + )} + > ++ {intl.formatMessage(messages['profile.name.full.name'])} +
++ {intl.formatMessage(messages['profile.name.tooltip'])} +
+ + )} + > ++ {intl.formatMessage(messages['profile.preferredlanguage.label'])} +
+ + {error !== null && ( ++ {intl.formatMessage(messages['profile.preferredlanguage.label'])} +
++ {intl.formatMessage(messages['profile.preferredlanguage.label'])} +
++ {intl.formatMessage(messages['profile.preferredlanguage.label'])} +
++ {intl.formatMessage(messages['profile.profileavatar.tooltip.edit'])} +
+ ) : ( ++ {intl.formatMessage(messages['profile.profileavatar.tooltip.upload'])} +
+ )} + + )} + > ++ {platformDisplayInfo[platform].name} +
++ {platformDisplayInfo[platform].name} +
++ {platformDisplayInfo[platform].name} +
+ {renderPlatformContent(platform, socialLink, activePlatform === platform)} ++ {platformDisplayInfo[platform].name} +
+ {renderPlatformContent(platform, socialLink, activePlatform === platform)} ++ {intl.formatMessage(messages['profile.editbutton.edit'])} +
+ + )} + > + ++ The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again. +
++ The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again. +
+