-
Notifications
You must be signed in to change notification settings - Fork 118
feat: made profile editable #1212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2u-main
Are you sure you want to change the base?
Conversation
Thanks for the pull request, @eemaanamir! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2u-main #1212 +/- ##
===========================================
- Coverage 68.73% 68.23% -0.51%
===========================================
Files 72 92 +20
Lines 1222 1678 +456
Branches 273 412 +139
===========================================
+ Hits 840 1145 +305
- Misses 365 511 +146
- Partials 17 22 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
<FormattedMessage | ||
id="profile.certificates.description" | ||
defaultMessage="Your learner records information is only visible to you. Only your username is visible to others on {siteName}." | ||
defaultMessage="Your learner records information is only visible to you. Only your username and profile image is visible to others on {siteName}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct statement.
Your learner records information is only visible to you. Only your username and profile image are visible to others on {siteName}
import classNames from 'classnames'; | ||
|
||
// Actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all these comments
const handleSubmit = useCallback((formId) => { | ||
dispatch(saveProfile(formId, context.authenticatedUser.username)); | ||
}, [dispatch, context.authenticatedUser.username]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { username } = context.authenticatedUser;
const handleSubmit = useCallback((formId) => {
dispatch(saveProfile(formId, username));
}, [dispatch, username]);
> | ||
<div | ||
className={classNames([ | ||
'col h-100 w-100 px-0 justify-content-start g-15re', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thinks spelling mistake it should be g-15rem
<div | ||
className={classNames([ | ||
'col container-fluid w-100 h-100 bg-white py-0 rounded-75', | ||
isMobileView ? 'px-3' : 'px-25rem', | ||
])} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comparison should be like
className={classNames(
'col container-fluid w-100 h-100 bg-white py-0 rounded-75',
{
'px-3': isMobileView,
'px-25rem': !isMobileView,
}
)}
@@ -1,13 +1,16 @@ | |||
import { history } from '@edx/frontend-platform'; | |||
import { getAuthenticatedUser } from '@edx/frontend-platform/auth'; | |||
import pick from 'lodash.pick'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { pick } from 'lodash';
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n'; | ||
import get from 'lodash.get'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { get } from 'lodash';
background-color: #FBFAF9; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this empty line
} | ||
|
||
.color-brand-500{ | ||
background-color: #D74000FF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recheck the color code
call(ProfileApiService.getPreferences, 'gonzo'), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this empty line
import classNames from 'classnames'; | ||
|
||
// Actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this type of comment
</span> | ||
); | ||
const UserCertificateSummary = ({ count = 0 }) => { | ||
if (count !== 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (count) will also work
}, | ||
action: 'POP' | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one extra empty line
@@ -38,4 +39,4 @@ module.exports = { | |||
}, | |||
action: 'POP' | |||
} | |||
}; | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one extra empty line
@@ -95,4 +102,4 @@ module.exports = { | |||
}, | |||
action: 'POP' | |||
} | |||
}; | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one extra empty line
} | ||
|
||
.pb-075rem{ | ||
padding-bottom: 0.75rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert REM into PX and change color code with paragon color variables
|
||
return ( | ||
<span className={className}> | ||
<span className="d-inline-block ml-1 mr-2" style={{ width: '1.5rem' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove hard style
closeHandler, | ||
openHandler, | ||
}) => { | ||
const isVisibilityEnabled = getConfig().DISABLE_VISIBILITY_EDITING === 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isVisibilityEnabled()
if (name === formId) { | ||
if (value !== '') { | ||
changeHandler(name, [{ code: value }]); | ||
} else { | ||
changeHandler(name, []); | ||
} | ||
} else { | ||
changeHandler(name, value); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reafactor
import { profilePageSelector } from './data/selectors'; | ||
import messages from './ProfilePage.messages'; | ||
import withParams from '../utils/hoc'; | ||
import { useIsOnMobileScreen, useIsOnTabletScreen } from './data/hooks'; | ||
|
||
ensureConfig(['CREDENTIALS_BASE_URL', 'LMS_BASE_URL'], 'ProfilePage'); | ||
|
||
const ProfilePage = ({ params }) => { | ||
const ProfilePage = ({ params, navigate }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
direct import navigate
Ticket: INF-1890
Summary:
Restored and enhanced the profile editing functionality in the Profile MFE, making it accessible to all users and aligned with the new Figma design.
Key Changes:
Editing Enabled for All Users
Removed the date of birth restriction on profile editing.
UI Updates
Implemented design changes based on the latest Figma specs.
Editable Fields Now Include:
New Feature Toggle:
DISABLE_VISIBILITY_EDITING
environment variable.true
, the visibility toggle in the UI is hidden.