Compare commits

...

42 Commits

Author SHA1 Message Date
Thomas Tracy
b2a0d0b078 Merge pull request #593 from ghassanmas/depends-nutmeg
build: update common depeds
2022-09-21 15:54:46 -04:00
Ghassan Maslamani
0719d37dfb fix: pin boostrap to 4.6.1 2022-08-02 19:23:29 +03:00
Ghassan Maslamani
3d9e9a4c7a build: update common depeds 2022-07-31 12:18:04 +03:00
Diana Catalina Olarte
91cc25f50a fix: show site name instead edX 2022-05-24 08:10:53 +01:00
Renovate Bot
95155df409 chore(deps): update dependency @edx/frontend-build to v9.1.4 2022-04-11 13:41:03 +00:00
Renovate Bot
abce0a5387 chore(deps): pin dependency @edx/reactifex to v 2022-04-04 14:40:51 +00:00
Usama Sadiq
c50b401c14 Merge pull request #541 from openedx/usamasadiq/update-pull-translations-command
build: update transifex pull translations command
2022-04-04 16:22:46 +05:00
UsamaSadiq
0c50bce43d build: update transifex pull translations command 2022-04-04 14:47:17 +05:00
Usama Sadiq
e56914eb80 Merge pull request #535 from openedx/jenkins/transifex-client-migration-ead9180
fix: transifex migration to new client
2022-04-04 14:09:02 +05:00
edX requirements bot
918aa91e49 feat: Added support for node v16 (#530)
Co-authored-by: Mohammad Ahtasham ul Hassan <ahthassan74@gmail.com>
2022-03-25 14:51:14 +05:00
David Joy
87230613c5 build: Delete CODEOWNERS (#537) 2022-03-18 10:25:02 -04:00
Ali Adnan
e2dfde2432 Merge pull request #534 from openedx/aadnan/migrate-reactifex
feat: migrate translations to reactifex
2022-03-18 14:01:31 +05:00
edX requirements bot
75ea16103a fix: transifex migration to new client 2022-03-17 08:51:00 -04:00
aliadnan
f5a6c483e2 feat: migrate translations to reactifex 2022-03-17 17:43:51 +05:00
Sarina Canelake
ead91806e6 Merge DEPR automation workflow
Add DEPR workflow automation
2022-02-24 15:21:46 -05:00
Sarina Canelake
f5e46741d2 build: add DEPR workflow automation 2022-02-23 14:36:56 -05:00
Renovate Bot
9cc77ddc1b fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.17 2022-01-31 08:21:25 +00:00
Renovate Bot
2e0549a859 fix(deps): update dependency core-js to v3.20.3 2022-01-17 09:51:23 +00:00
Renovate Bot
cb515e81fc fix(deps): update dependency @edx/frontend-platform to v1.14.9 2022-01-17 09:24:30 +00:00
Renovate Bot
f8520ca2dc fix(deps): update dependency @edx/frontend-component-header to v2.4.3 2021-12-27 09:49:05 +00:00
Renovate Bot
cce3146fed fix(deps): update dependency core-js to v3.20.0 2021-12-20 10:02:18 +00:00
Renovate Bot
1e48a55029 fix(deps): update dependency @edx/frontend-component-header to v2.4.2 2021-12-20 09:42:31 +00:00
Renovate Bot
9d4d6ee2a1 chore(deps): update dependency @edx/frontend-build to v8.2.0 2021-12-13 12:38:12 +00:00
Renovate Bot
b9e4fdaf64 fix(deps): update dependency @edx/frontend-platform to v1.14.4 2021-12-13 10:52:54 +00:00
Renovate Bot
7b14eeb42c fix(deps): update dependency core-js to v3.19.3 2021-12-06 09:10:22 +00:00
Renovate Bot
2b2a94f78c fix(deps): update dependency reselect to v4.1.5 2021-12-06 08:57:31 +00:00
Renovate Bot
5e94fa62ed fix(deps): update dependency redux-thunk to v2.4.1 2021-11-29 08:53:00 +00:00
Renovate Bot
f610c5bc70 fix(deps): update dependency @edx/frontend-platform to v1.14.1 2021-11-29 08:39:18 +00:00
Renovate Bot
5922947843 fix(deps): update dependency reselect to v4.1.4 2021-11-22 10:27:21 +00:00
Renovate Bot
02da9797b4 fix(deps): update dependency redux-thunk to v2.4.0 2021-11-22 10:13:32 +00:00
Renovate Bot
8cf5b82a78 fix(deps): update dependency core-js to v3.19.1 2021-11-15 12:54:15 +00:00
Renovate Bot
c265d57ea5 chore(deps): update dependency @edx/frontend-build to v8.1.6 2021-11-15 11:00:20 +00:00
edX Transifex Bot
1069f23239 chore(i18n): update translations 2021-11-15 01:40:52 +05:00
Renovate Bot
718400dcd1 fix(deps): update dependency @edx/frontend-platform to v1.14.0 2021-11-08 10:59:03 +00:00
Renovate Bot
59e112205d chore(deps): update dependency @edx/frontend-build to v8.1.3 2021-11-08 10:43:06 +00:00
Renovate Bot
7948812a78 fix(deps): update dependency redux to v4.1.2 2021-11-01 09:16:29 +00:00
Renovate Bot
3da88dd557 fix(deps): update dependency react-redux to v7.2.6 2021-11-01 09:06:12 +00:00
edX Transifex Bot
7181950081 chore(i18n): update translations 2021-11-01 01:40:48 +05:00
Waheed Ahmed
8fbedf008c Merge pull request #488 from edx/remove-age-banner
feat: add feature flag to toggle age banner
2021-10-25 17:13:18 +05:00
uzairr
ac912e5ffc feat: add feature flag to toggle age banner
Based on the requirement for COPPA,users under the age of 13 are
not be informed to update the age information.

Fixes: VAN-753
2021-10-25 17:10:03 +05:00
Renovate Bot
299cbbea6c fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.16 2021-10-25 09:05:53 +00:00
Renovate Bot
3f904fe8f6 chore(deps): update dependency @edx/frontend-build to v8.0.6 2021-10-25 08:57:34 +00:00
23 changed files with 28277 additions and 7529 deletions

1
.env
View File

@@ -24,3 +24,4 @@ LOGO_WHITE_URL=''
FAVICON_URL=''
ENABLE_LEARNER_RECORD_MFE=''
LEARNER_RECORD_MFE_BASE_URL=''
COLLECT_YEAR_OF_BIRTH=true

View File

@@ -25,3 +25,4 @@ LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
ENABLE_LEARNER_RECORD_MFE=''
LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true

View File

@@ -19,3 +19,4 @@ LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
ENABLE_LEARNER_RECORD_MFE=''
LEARNER_RECORD_MFE_BASE_URL='http://localhost:1990'
COLLECT_YEAR_OF_BIRTH=true

1
.github/CODEOWNERS vendored
View File

@@ -1 +0,0 @@
* @edx/community-engineering

View File

@@ -0,0 +1,19 @@
# Run the workflow that adds new tickets that are either:
# - labelled "DEPR"
# - title starts with "[DEPR]"
# - body starts with "Proposal Date" (this is the first template field)
# to the org-wide DEPR project board
name: Add newly created DEPR issues to the DEPR project board
on:
issues:
types: [opened]
jobs:
routeissue:
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
secrets:
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}

View File

@@ -1,4 +1,3 @@
---
name: ci
on:
push:
@@ -6,23 +5,22 @@ on:
- master
pull_request:
jobs:
build:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 12
npm-test:
- i18n_extract
- is-es5
- lint
- test
node: [12, 14, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g npm@6
node-version: ${{ matrix.node }}
- run: npm install -g npm@8.x.x
- run: make requirements
- run: make test NPM_TESTS=build
- run: make test NPM_TESTS=${{ matrix.npm-test }}

View File

@@ -1,8 +1,9 @@
[main]
host = https://www.transifex.com
[edx-platform.frontend-app-profile]
[o:open-edx:p:edx-platform:r:frontend-app-profile]
file_filter = src/i18n/messages/<lang>.json
source_file = src/i18n/transifex_input.json
source_lang = en
type = KEYVALUEJSON
type = KEYVALUEJSON

View File

@@ -1,3 +1,4 @@
export TRANSIFEX_RESOURCE = frontend-app-profile
transifex_resource = frontend-app-profile
transifex_langs = "ar,fr,es_419,zh_CN"
@@ -45,15 +46,15 @@ push_translations:
# Pushing strings to Transifex...
tx push -s
# Fetching hashes from Transifex...
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh
# Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path
# Pushing comments to Transifex...
./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh
# Pulls translations from Transifex.
pull_translations:
tx pull -f --mode reviewed --language=$(transifex_langs)
tx pull -f --mode reviewed --languages=$(transifex_langs)
# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:

35431
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,17 +30,17 @@
],
"dependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/frontend-component-footer": "10.1.6",
"@edx/frontend-component-header": "2.3.0",
"@edx/frontend-platform": "1.12.7",
"@edx/paragon": "16.6.1",
"@edx/frontend-component-footer": "10.2.2",
"@edx/frontend-component-header": "2.4.6",
"@edx/frontend-platform": "1.15.6",
"@edx/paragon": "19.14.1",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-brands-svg-icons": "5.15.4",
"@fortawesome/free-regular-svg-icons": "5.15.4",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@fortawesome/react-fontawesome": "0.1.17",
"classnames": "2.3.1",
"core-js": "3.18.2",
"core-js": "3.20.3",
"lodash.camelcase": "4.3.0",
"lodash.get": "4.4.2",
"lodash.pick": "4.4.0",
@@ -48,22 +48,23 @@
"prop-types": "15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-redux": "7.2.5",
"react-redux": "7.2.6",
"react-router": "5.2.1",
"react-router-dom": "5.3.0",
"redux": "4.1.1",
"redux": "4.1.2",
"redux-devtools-extension": "2.13.9",
"redux-logger": "3.0.6",
"redux-saga": "1.1.3",
"redux-thunk": "2.3.0",
"redux-thunk": "2.4.1",
"regenerator-runtime": "0.13.9",
"reselect": "4.0.0",
"reselect": "4.1.5",
"universal-cookie": "3.1.0"
},
"devDependencies": {
"@commitlint/cli": "13.2.1",
"@commitlint/config-angular": "13.2.0",
"@edx/frontend-build": "8.0.4",
"@edx/reactifex": "1.0.3",
"@edx/frontend-build": "9.1.4",
"codecov": "3.8.3",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
@@ -72,5 +73,9 @@
"react-test-renderer": "16.14.0",
"reactifex": "1.1.1",
"redux-mock-store": "1.5.4"
},
"peerDependencies": {
"bootstrap": "4.6.1"
}
}

View File

@@ -1,6 +1,6 @@
{
"profile.age.headline": "لا يمكن مشاركة ملفك الشخصي",
"profile.age.details": "لمشاركة ملفك الشخصي مع متعلمي edX الآخرين يجب التحقق من أن يكون عمرك أكثر من ١٣ سنة",
"profile.age.details": "لمشاركة ملفك الشخصي مع متعلمي {siteName} الآخرين يجب التحقق من أن يكون عمرك أكثر من ١٣ سنة",
"profile.age.set.date": "اضبط تاريخ ميلاك",
"profile.datejoined.member.since": "عضو منذُ {year}",
"profile.bio.empty": "أضف نبذة قصيرة",
@@ -33,7 +33,7 @@
"profile.formcontrols.button.saving": "جاري الحفظ",
"profile.formcontrols.button.saved": "تم الحفظ",
"profile.visibility.who.just.me": "أنا فقط",
"profile.visibility.who.everyone": "جميع أعضاء edX",
"profile.visibility.who.everyone": "جميع أعضاء {siteName}",
"profile.name.full.name": "الاسم الكامل",
"profile.name.details": "هذا هو الاسم الذي سيظهر في حسابك وفي شهاداتك",
"profile.name.empty": "إضافة اسم",
@@ -47,5 +47,6 @@
"profile.sociallinks.social.links": "روابط قنوات التواصل الاجتماعي",
"profile.notfound.message": "الصفحة التي تبحث عنها غير متوفرة أو هناك خطأ في نص الرابط. الرجاء التحقق من الرابط والمحاولة مجددا.",
"profile.viewMyRecords": "عرض سجلّاتي",
"profile.loading": "جاري تحميل الملف الشخصي ..."
"profile.loading": "جاري تحميل الملف الشخصي ...",
"profile.username.description": "Your profile information is only visible to you. Only your username is visible to others on {siteName}."
}

View File

@@ -1,6 +1,6 @@
{
"profile.age.headline": "Tu perfil no puede ser compartido.",
"profile.age.details": "Para compartir tu perfil con otros estudiantes de edX, debes confirmar que tienes más de 13 años.",
"profile.age.details": "Para compartir tu perfil con otros estudiantes de {siteName}, debes confirmar que tienes más de 13 años.",
"profile.age.set.date": "Establece tu fecha de nacimiento",
"profile.datejoined.member.since": "Miembro desde {year}",
"profile.bio.empty": "Añade una breve biografía",
@@ -33,7 +33,7 @@
"profile.formcontrols.button.saving": "Guardando",
"profile.formcontrols.button.saved": "Guardado",
"profile.visibility.who.just.me": "Solo yo",
"profile.visibility.who.everyone": "Todos en edX",
"profile.visibility.who.everyone": "Todos en {siteName}",
"profile.name.full.name": "Nombre completo",
"profile.name.details": "Este es el nombre que aparecerá en tu cuenta y en tus certificados.",
"profile.name.empty": "Añade nombre",
@@ -47,5 +47,6 @@
"profile.sociallinks.social.links": "Enlaces De Redes Sociales",
"profile.notfound.message": "La página que estas buscando no está disponible o hay un error en la URL. Por favor, comprueba la URL y vuelve a intentarlo.",
"profile.viewMyRecords": "Ver mis registros",
"profile.loading": "Cargando perfil..."
"profile.loading": "Cargando perfil...",
"profile.username.description": "La información de tu perfil es solo visible para ti. Únicamente tu nombre de usuario es visible para otros en {siteName}."
}

View File

@@ -1,6 +1,6 @@
{
"profile.age.headline": "Votre profil ne peut pas être partagé.",
"profile.age.details": "Pour partager votre profil avec d'autres apprenants edX, vous devez confirmer que vous avez plus de 13 ans.",
"profile.age.details": "Pour partager votre profil avec d'autres apprenants {siteName}, vous devez confirmer que vous avez plus de 13 ans.",
"profile.age.set.date": "Définissez votre date de naissance",
"profile.datejoined.member.since": "Membre depuis {year}",
"profile.bio.empty": "Ajouter une courte biographie",
@@ -33,7 +33,7 @@
"profile.formcontrols.button.saving": "Enregistrement",
"profile.formcontrols.button.saved": "Enregistré",
"profile.visibility.who.just.me": "Juste moi",
"profile.visibility.who.everyone": "Tout le monde sur edX",
"profile.visibility.who.everyone": "Tout le monde sur {siteName}",
"profile.name.full.name": "Nom complet",
"profile.name.details": "C'est le nom qui apparaît dans votre compte et sur vos certificats.",
"profile.name.empty": "Ajouter un nom",
@@ -47,5 +47,6 @@
"profile.sociallinks.social.links": "Liens vers les réseaux sociaux",
"profile.notfound.message": "La page que vous recherchez n'est pas disponible ou il y a une erreur dans l'URL. Veuillez vérifier l'URL et réessayer.",
"profile.viewMyRecords": "Voir mes succès",
"profile.loading": "Chargement du profil...."
"profile.loading": "Chargement du profil....",
"profile.username.description": "Les informations de ton profil ne sont visibles que par toi. Seul votre nom d'utilisateur est visible par les autres utilisateurs d'{siteName}."
}

View File

@@ -1,6 +1,6 @@
{
"profile.age.headline": "Your profile cannot be shared.",
"profile.age.details": "To share your profile with other edX learners, you must confirm that you are over the age of 13.",
"profile.age.details": "To share your profile with other {siteName} learners, you must confirm that you are over the age of 13.",
"profile.age.set.date": "Set your date of birth",
"profile.datejoined.member.since": "Member since {year}",
"profile.bio.empty": "Add a short bio",
@@ -33,7 +33,7 @@
"profile.formcontrols.button.saving": "Saving",
"profile.formcontrols.button.saved": "Saved",
"profile.visibility.who.just.me": "Just me",
"profile.visibility.who.everyone": "Everyone on edX",
"profile.visibility.who.everyone": "Everyone on {siteName}",
"profile.name.full.name": "Full Name",
"profile.name.details": "This is the name that appears in your account and on your certificates.",
"profile.name.empty": "Add name",
@@ -47,5 +47,6 @@
"profile.sociallinks.social.links": "Social Links",
"profile.notfound.message": "The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again.",
"profile.viewMyRecords": "View My Records",
"profile.loading": "Profile loading..."
"profile.loading": "Profile loading...",
"profile.username.description": "Your profile information is only visible to you. Only your username is visible to others on {siteName}."
}

View File

@@ -60,6 +60,7 @@ initialize({
mergeConfig({
ENABLE_LEARNER_RECORD_MFE: (process.env.ENABLE_LEARNER_RECORD_MFE || false),
LEARNER_RECORD_MFE_BASE_URL: process.env.LEARNER_RECORD_MFE_BASE_URL,
COLLECT_YEAR_OF_BIRTH: process.env.COLLECT_YEAR_OF_BIRTH,
}, 'App loadConfig override handler');
},
},

View File

@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { StatusAlert } from '@edx/paragon';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { getConfig } from '@edx/frontend-platform';
function AgeMessage({ accountSettingsUrl }) {
return (
@@ -17,15 +18,18 @@ function AgeMessage({ accountSettingsUrl }) {
/>
<FormattedMessage
id="profile.age.details"
defaultMessage="To share your profile with other edX learners, you must confirm that you are over the age of 13."
description="error message"
defaultMessage="To share your profile with other {siteName} learners, you must confirm that you are over the age of 13."
description="Error message"
tagName="p"
values={{
siteName: getConfig().SITE_NAME,
}}
/>
<a href={accountSettingsUrl}>
<FormattedMessage
id="profile.age.set.date"
defaultMessage="Set your date of birth"
description="label on a link to set birthday"
description="Label on a link to set birthday"
/>
</a>
</>

View File

@@ -30,6 +30,7 @@ import Bio from './forms/Bio';
import Certificates from './forms/Certificates';
import AgeMessage from './AgeMessage';
import DateJoined from './DateJoined';
import UsernameDescription from './UsernameDescription';
import PageLoading from './PageLoading';
import Banner from './Banner';
@@ -80,6 +81,14 @@ class ProfilePage extends React.Component {
return recordsUrl;
}
isYOBDisabled() {
const { yearOfBirth } = this.props;
const currentYear = new Date().getFullYear();
const isAgeOrNotCompliant = !yearOfBirth || ((currentYear - yearOfBirth) < 13);
return isAgeOrNotCompliant && getConfig().COLLECT_YEAR_OF_BIRTH !== 'true';
}
isAuthenticatedUserProfile() {
return this.props.match.params.username === this.context.authenticatedUser.username;
}
@@ -130,6 +139,7 @@ class ProfilePage extends React.Component {
<span data-hj-suppress>
<h1 className="h2 mb-0 font-weight-bold">{this.props.match.params.username}</h1>
<DateJoined date={dateJoined} />
{this.isYOBDisabled() && <UsernameDescription />}
<hr className="d-none d-md-block" />
</span>
</>
@@ -261,7 +271,7 @@ class ProfilePage extends React.Component {
/>
</div>
<div className="pt-md-3 col-md-8 col-lg-7 offset-lg-1">
{this.renderAgeMessage()}
{!this.isYOBDisabled() && this.renderAgeMessage()}
<Bio
bio={bio}
visibilityBio={visibilityBio}
@@ -298,6 +308,7 @@ ProfilePage.propTypes = {
// Bio form data
bio: PropTypes.string,
yearOfBirth: PropTypes.number,
visibilityBio: PropTypes.string.isRequired,
// Certificates form data
@@ -373,6 +384,7 @@ ProfilePage.defaultProps = {
photoUploadError: {},
profileImage: {},
name: null,
yearOfBirth: null,
levelOfEducation: null,
country: null,
socialLinks: [],

View File

@@ -0,0 +1,25 @@
import React from 'react';
import { FormattedMessage } from '@edx/frontend-platform/i18n';
import { VisibilityOff } from '@edx/paragon/icons';
import { Icon } from '@edx/paragon';
import { getConfig } from '@edx/frontend-platform';
function UsernameDescription() {
return (
<div className="d-flex align-items-center mt-3 mb-2rem">
<Icon src={VisibilityOff} className="icon-visibility-off" />
<div className="username-description">
<FormattedMessage
id="profile.username.description"
defaultMessage="Your profile information is only visible to you. Only your username is visible to others on {siteName}."
description="A description of the username field"
values={{
siteName: getConfig().SITE_NAME,
}}
/>
</div>
</div>
);
}
export default UsernameDescription;

View File

@@ -104,6 +104,36 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
</span>
</span>
</p>
<div
className="d-flex align-items-center mt-3 mb-2rem"
>
<span
className="pgn__icon icon-visibility-off"
>
<svg
aria-hidden={true}
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM3.42 2.45L2.01 3.87l2.68 2.68A11.738 11.738 0 001 11.5C2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l3.43 3.43 1.41-1.41L3.42 2.45zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33a2.97 2.97 0 00-2.64-2.64l2.64 2.64z"
fill="currentColor"
/>
</svg>
</span>
<div
className="username-description"
>
<span>
Your profile information is only visible to you. Only your username is visible to others on localhost.
</span>
</div>
</div>
<hr
className="d-none d-md-block"
/>
@@ -141,6 +171,36 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
</span>
</span>
</p>
<div
className="d-flex align-items-center mt-3 mb-2rem"
>
<span
className="pgn__icon icon-visibility-off"
>
<svg
aria-hidden={true}
fill="none"
focusable={false}
height={24}
role="img"
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM3.42 2.45L2.01 3.87l2.68 2.68A11.738 11.738 0 001 11.5C2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l3.43 3.43 1.41-1.41L3.42 2.45zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33a2.97 2.97 0 00-2.64-2.64l2.64 2.64z"
fill="currentColor"
/>
</svg>
</span>
<div
className="username-description"
>
<span>
Your profile information is only visible to you. Only your username is visible to others on localhost.
</span>
</div>
</div>
<hr
className="d-none d-md-block"
/>
@@ -319,17 +379,17 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
className="d-none d-md-block float-right"
>
<a
className="btn btn-primary"
className="pgn__hyperlink default-link standalone-link btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -341,7 +401,6 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -355,6 +414,11 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -397,17 +461,17 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
className="d-md-none mb-4"
>
<a
className="btn btn-primary"
className="pgn__hyperlink default-link standalone-link btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -419,7 +483,6 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -433,6 +496,11 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -610,7 +678,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -700,7 +768,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -880,7 +948,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -1059,7 +1127,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -1149,7 +1217,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -1214,17 +1282,17 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</p>
<div>
<a
className="btn btn-outline-primary"
className="pgn__hyperlink default-link standalone-link btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -1236,7 +1304,6 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -1250,6 +1317,11 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -1370,17 +1442,17 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
className="d-none d-md-block float-right"
>
<a
className="btn btn-primary"
className="pgn__hyperlink default-link standalone-link btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -1392,7 +1464,6 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -1406,6 +1477,11 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -1448,17 +1524,17 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
className="d-md-none mb-4"
>
<a
className="btn btn-primary"
className="pgn__hyperlink default-link standalone-link btn btn-primary"
href="http://localhost:18150/records"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View My Records
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -1470,7 +1546,6 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -1484,6 +1559,11 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -1661,7 +1741,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -1751,7 +1831,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -1931,7 +2011,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -2129,7 +2209,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
<option
value="all_users"
>
Everyone on edX
Everyone on localhost
</option>
</select>
</span>
@@ -2156,7 +2236,6 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -2172,9 +2251,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</svg>
</span>
</span>
<span
className=""
>
<span>
Saving
</span>
</span>
@@ -2271,7 +2348,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -2336,17 +2413,17 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</p>
<div>
<a
className="btn btn-outline-primary"
className="pgn__hyperlink default-link standalone-link btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -2358,7 +2435,6 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -2372,6 +2448,11 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>
@@ -2701,7 +2782,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -2791,7 +2872,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -2971,7 +3052,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -3150,7 +3231,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -3240,7 +3321,7 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
/>
</svg>
Everyone on edX
Everyone on localhost
</span>
</p>
</div>
@@ -3305,17 +3386,17 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
</p>
<div>
<a
className="btn btn-outline-primary"
className="pgn__hyperlink default-link standalone-link btn btn-outline-primary"
href="http://www.example.com/"
onClick={[Function]}
rel="noopener"
rel="noopener noreferrer"
target="_blank"
>
View Certificate
<span
className="d-inline-block align-text-top"
className="pgn__hyperlink__external-icon"
title="Opens in a new tab"
>
<span
className="pgn__icon"
style={
@@ -3327,7 +3408,6 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
>
<svg
aria-hidden={true}
aria-label=""
fill="none"
focusable={false}
height={24}
@@ -3341,6 +3421,11 @@ exports[`<ProfilePage /> Renders correctly in various states without credentials
fill="currentColor"
/>
</svg>
<span
className="sr-only"
>
in a new tab
</span>
</span>
</span>
</a>

View File

@@ -335,6 +335,7 @@ export const profilePageSelector = createSelector(
profileImage,
requiresParentalConsent: account.requiresParentalConsent,
dateJoined: account.dateJoined,
yearOfBirth: account.yearOfBirth,
// Bio form data
bio: formValues.bio,

View File

@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { getConfig } from '@edx/frontend-platform';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faEyeSlash, faEye } from '@fortawesome/free-regular-svg-icons';
@@ -10,7 +11,7 @@ function Visibility({ to, intl }) {
const icon = to === 'private' ? faEyeSlash : faEye;
const label = to === 'private'
? intl.formatMessage(messages['profile.visibility.who.just.me'])
: intl.formatMessage(messages['profile.visibility.who.everyone']);
: intl.formatMessage(messages['profile.visibility.who.everyone'], { siteName: getConfig().SITE_NAME });
return (
<span className="ml-auto small text-muted">
@@ -43,7 +44,7 @@ function VisibilitySelect({ intl, className, ...props }) {
{intl.formatMessage(messages['profile.visibility.who.just.me'])}
</option>
<option key="all_users" value="all_users">
{intl.formatMessage(messages['profile.visibility.who.everyone'])}
{intl.formatMessage(messages['profile.visibility.who.everyone'], { siteName: getConfig().SITE_NAME })}
</option>
</select>
</span>

View File

@@ -8,7 +8,7 @@ const messages = defineMessages({
},
'profile.visibility.who.everyone': {
id: 'profile.visibility.who.everyone',
defaultMessage: 'Everyone on edX',
defaultMessage: 'Everyone on {siteName}',
description: 'What users can see this area?',
},
});

View File

@@ -23,6 +23,28 @@
background-size: auto 85%;
}
.username-description {
width: auto;
position: absolute;
left: 1.5rem;
top: 5.25rem;
color: $gray-500;
line-height: 0.9rem;
font-size: 0.8rem;
font-style: normal;
font-weight: 400;
margin-left: 0.9rem;
}
.mb-2rem {
margin-bottom: 2rem;
}
.icon-visibility-off {
height: 1rem;
color: $gray-500;
}
.profile-page {
.edit-section-header {
@extend .h6;