This PR adds the `ACCOUNT_PROFILE_URL` setting to the `.env` and `.env.development` settings files
in order to make it easier to configure the communication between the Profile and Account MFEs in
Open edX development environments.
[APER-2823]
This PR removes functionality specific to 2U and edx.org from the Account MFE that was used for collecting demographics info from learners.
* Removes the coaching functionality
* no tests are referencing this
* Leaves behind a decision record referencing the creation of the
coaching functionality (0002-coaching-addition)
FIXES: APER-2408-Remove-Coaching-functionality-from-the-Account-MFE
* feat: add toggling for the hardcode support link (master)
Add a toggling mechanism for the "unlink all social media
accounts" text to show it as a link or text depending on
the MFE env setting.
* fix(deps): update dependency @edx/frontend-platform to v5.3.0
* Revert "fix(deps): update dependency @edx/frontend-platform to v5.3.0" (#870)
This reverts commit 757e446be7.
* feat: add toggling for the hardcode support link (master)
Add a toggling mechanism for the "unlink all social media
accounts" text to show it as a link or text depending on
the MFE env setting.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
* feat: make password reset support URL configurable
Replace the hardcoded `support.edx.org` value with the one from the env vars.
* fix: linting error
If COPPA compliance feature flag is enabled, remove the `primary/elementary` option
from the level of education dropdown field on edit but keep the value showing for
the users who have already selected it.
VAN-762
This uses variable substitution to insert SITE_NAME into index.html, rather than hard-coding “edX” into the file. It also updates the .env files to use “localhost” as the default SITE_NAME.
* Mild style whitespace linting
* Updating to latest paragon and brand.
Needed to update Button/StatefulButton props to use variant, primarily.
* Adding new environment variables.
* Fixing prop-types warning.
* Updating snapshots. Modal and Button changed primarily.
I’ve reviewed the various snapshots and determined they’re all correct. The button prop changes are in line with what I’ve seen elsewhere with the new react-bootstrap-based Button component replacing our own button. The modal changes make sense, as I think we added some focus lock handling.
* Locking dependency versions in package.json
* Removing dataUtils functions, extraneous deps, and updating frontend-build
Committing all these at the same time since they affect package-lock.json together and splitting them out is nearly impossible now.
* Turning the linter on.
Hold on to your butts!
After this commit, there will be ~1600 linting errors to fix in subsequent commits.
* Main app auto-linting.
Not including coaching, demographics, or ID verification.
This is all the whitespace/syntax linting that my auto-formatter fixed. I did a few small whitespace cleanups after it, but this commit is 95% automatic.
* Removing HeaderFooterLayout
The HeaderFooterLayout was only used in one place. Collapsing it down again; also means we don’t have to have prop types for it or split it out into a separate file or anything.
* Main app propTypes cleanup
We were missing some propTypes in AccountSettingsPage and EditableField.
JumpNav had a default that was unused, since displayDemographicsLink is Required.
* Main app manual linting
AccountSettingsPage had some function-ordering issues, and some weak equality checking.
EditableField had an if without curly braces, followed by a variable named “value” which obscured a variable with the same name in the parent scope. I renamed it to “finalValue” to avoid the name reuse.
* Coaching auto-fixed lint errors
These are general whitespace and syntax linting errors that my IDE automatically fixed. I went in after and tweaked the whitespace a bit cause it didn’t finish the job, but this is 95% automatic.
* Coaching unused prop in CoachingConsent.
* Demographics auto-fixed lint errors.
Again, 95% auto-fixed linting errors, done by my IDE. I tweaked a few here and there for spacing and such where it didn’t do a perfecto job.
* Demographics Checkboxes manual linting fixes.
A few things here:
- We were double-exporting Checkboxes, once as the default, once as a named export. I removed the named export.
- Now uses === when checking string equality.
- id prop was always set, so I made it required
- PropTypes.array is not specific enough for the linter, so I found out what “values” and “options” were being set to and made some arrayOf PropTypes declarations that were more specific.
- onChange is also always set, so now it’s required.
* Demographics manual linting fixes for DemographicsSection
Bunch of things here:
- Reordered hasRetrievedDemographicsOptions and addDefaultOption to later in the file where the linter told me to put them.
- ethnicityFieldDisplay did not consistently return - only in the conditional did it return. Now it uses the conditional to set a value for enthicities and then consistently returns at the end, processing the ethnicities array.
- handleSubmit didn’t use its “values” prop
- handleSubmit was iterating over an object using a for…in loop, which iterates over ALL properties of an object, not just the keys you might expect. Probably not a problem, but not a good practice either. It now uses Object.entries to get the iterable properties of the object.
- renderDemographicsServiceIssueWarning should use a || instead of a | for an OR. It can also use ! instead of == false
- Using === for string equality in showSelfDescribe and showWorkStatusDescribe
- Using the Paragon Hyperlink component instead of an a tag. It decorates links with additional metadata noting that the link will be external.
- Adding rel=“noopener noreferrer”, which is a security fix.
- Adding missing propTypes for formValues, drafts, forwardRef, and saveMultipleSettings.
* ID Verification auto-fixed linting errors
This commit includes whitespace and syntax linting errors that were auto-fixed by my IDE, with a little manual whitespace fixing by me where it didn’t get it quite right. 95% automated.
* ID Verification circular dependency between IdVerificationContext and AccessBlocked
This commit resolves a circular dependencybetween IdVerificationContext and the AccessBlocked component.
AccessBlocked imported ERROR_REASONS from IdVerificationContext and IdVerificationContext imported AccessBlocked itself.
We resolve this by moving IdVerificationContextProvider out into its own file. Then it can safely import from AccessBlocked, and both can safely import the context and constants from IdVerificationContext.
This also sets IdVerificationContext as the default export from its file, which is responsible for the majority of the file changes in this commit, where the import shape changed.
* ID verification removing an unused import in SubmittedPanel
* Ignoring @tensorflow-models/blazeface as an unresolved import
We’re depending on an alias for @tensorflow-models/blazeface which confuses eslint. I’ve just told it to ignore the problem, since the code is valid.
* ID Verification misc manual linting fixes
There’s a number of things in this commit:
- In Camera, we’re using the function version of setState so we can ensure we’re getting the right version of shouldDetect - you’re not supposed to set state from state directly, as there’s no guarantee that it’s still correct, and you might be setting it from stale data.
- In Camera, the takePhoto function inconsistently returned a value. Returning after calling this.reset() makes it consistently return undefined.
- In Camera, the <button> was missing a type.
- In Camera, it’s also violating two accessibility rules - the video media has no caption, and there’s apparently not supposed to be an accessKey on buttons. I don’t know how to fix either of those for this code so I’m punting - I’m leaving it to the owning teams.
- IdVerificationPage should be calling Object.prototype.hasOwnProperty instead of assuming a variable has Object prototype functions.
- ImagePreview didn’t set a default prop value for the id prop - I’ve set it to undefined.
- RequestCameraAccessPanel needed a button type on the “Enable” button.
- RequestCameraAccessPanel should use === for string equality.
* ID Verification manual linting fix to rearrange methods in Camera
The linter complained about the order of methods in the Camera component. This commit rearranges them to suit it.
* Ignoring module.config.js file.
* Fixing package-lock.json after rebase.
* Add phone number field and coaching consent toggle
MB-196
Adds phone number and coaching consent toggle to the profile. Currently,
toggled off in production, until we are ready for MB learners to start
recieving coaching.
* fix(deps): update dependency @fortawesome/react-fontawesome to v0.1.9
* fix(deps): update dependency @edx/frontend-component-footer to v10.0.8
* Add phone number field and coaching consent toggle
MB-196
Adds phone number and coaching consent toggle to the profile. Currently,
toggled off in production, until we are ready for MB learners to start
recieving coaching.
* Made requested changes and additional fixes
* Requested changes
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* Use the new header and footer.
Note: Because we’re not fully using frontend-base yet, the header is broken. It’ll start working once frontend-base’s App singleton is properly initialized.
* Initializing the app via App.initialize
- Removes App component
- Cleans up environment configuration - SUPPORT_URL is the only custom env variable.
- Cleans up usage of SUPPORT_URL and LOGOUT_URL to take advantage of App.config.
* Convert delete-account service to use App.
* Using App for services and cleaning up associated code.
Also pulling out the frontend-auth shim, since it was also dead and was sorta API-service like.
* Cleaning up “common” and some dead code.
- Most of it goes into account-settings for now.
- Shuffling the “utils” files around to classify them better.
- Removing unused assets
* Moving files into data subdirectory in account-settings
Including all the utils stuff.
* Moving top level reducers/sagas into a data dir
* Fix import bug with sagaUtils
* Removing connected-react-router
* Ceasing to use authentication and configuration from redux
Also removing some unnecessary test config.
* Updating redux init to default to prod.
Also fixing a bug where it wasn’t going into prod mode at all.
* Moving the duplicateTpaProvider logic out of redux
This lets us stop setting initial state on redux.
Also removing url-polyfill.
* A little cleanup.
* Remove default exports to keep the pattern the same.