Michael Roytman 842bd11d89 feat: Add Verified Name field and success alert to the Account Settings page
MST-800: https://openedx.atlassian.net/browse/MST-800

This code change adds a Verified Name editable field to the Account Settings page. When the verified name API in the LMS returns that a learner has a verified name, and that the name affirmation feature flag is turned on, the Account Settings page displays the Verified Name field. If the learner's name is verified (i.e. it is not pending verification), then a green checkmark is displayed to the right of the field label.

The first time the learner visits the Account Settings page after verification, a dismissible alert is displayed indicating that their vreified name was verified. Whether the alert has been dismissed is stored in localStorage, and the alert no longer reappears after it is dismissed.
2021-07-30 10:16:40 -04:00
2019-04-23 15:15:12 -04:00
2019-04-23 15:15:12 -04:00
2021-04-14 12:29:41 -04:00
2019-04-23 15:15:12 -04:00
2019-10-21 12:31:17 -04:00
2019-10-21 12:31:17 -04:00
2021-06-02 11:28:11 -07:00
2021-06-04 22:09:16 -07:00

|ci-badge| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release|

frontend-app-account
====================

Please tag **@edx/community-engineering** on any PRs or issues.  Thanks!

Introduction
------------

This is a micro-frontend application responsible for the display and updating of a user's account information.

What is the domain of this MFE?

In this MFE: Private user settings UIs. Public facing profile is in a `separate MFE (Profile) <https://github.com/edx/frontend-app-profile>`_

- Account settings page

- Demographics collection

- IDV (Identity Verification)

Installation
------------

This MFE is bundled with `Devstack <https://github.com/edx/devstack>`_, see the `Getting Started <https://github.com/edx/devstack#getting-started>`_ section for setup instructions.

1. Install Devstack using the `Getting Started <https://github.com/edx/devstack#getting-started>`_ instructions.

2. Start up Devstack, if it's not already started.

3. Log in to Devstack (http://localhost:18000/login )

4. Within this project, install requirements and start the development server:

   .. code-block::

      npm install
      npm start # The server will run on port 1997

5. Once the dev server is up, visit http://localhost:1997 to access the MFE

   .. image:: ./docs/images/localhost_preview.png

Environment Variables/Setup Notes
---------------------------------

This MFE is configured via environment variables supplied at build time.  All micro-frontends have a shared set of required environment variables, as documented in the Open edX Developer Guide under `Required Environment Variables <https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#required-environment-variables>`__.

The account settings micro-frontend also supports the following additional variable:

``SUPPORT_URL``

Example: ``https://support.example.com``

The fully-qualified URL to the support page in the target environment.

edX-specific Environment Variables
**********************************

Furthermore, there are several edX-specific environment variables that enable integrations with closed-source services private to the edX organization, and are unsupported in Open edX.  Enabling these environment variables will result in undefined behavior in Open edX installations:

``COACHING_ENABLED``

Example: ``true`` | ``''`` (empty strings are falsy)

Enables support for a section of the micro-frontend that helps users arrange for coaching sessions.  Integrates with a private coaching plugin and is only used by edx.org.

``ENABLE_DEMOGRAPHICS_COLLECTION``

Example: ``true`` | ``''`` (empty strings are falsy)

Enables support for a section of the account settings page where a user can enter demographics information.  Integrates with a private demographics service and is only used by edx.org.

``DEMOGRAPHICS_BASE_URL``

Example: ``https://demographics.example.com``

Required only if ``ENABLE_DEMOGRAPHICS_COLLECTION`` is true.  The fully-qualified URL to the private demographics service in the target environment.

Example build syntax with a single environment variable:

.. code:: bash

   NODE_ENV=development ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' npm run build

For more information see the document: `Micro-frontend applications in Open
edX <https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#required-environment-variables>`__.

Known Issues
------------

None

Development Roadmap
-------------------

We don't have anything planned for the core of the MFE (the account settings page) - this MFE is currently in maintenance mode.
There may be a replacement for IDV coming down the pipe, so that may be DEPRed.
In the future, it's possible that demographics could be modeled as a plugin rather than being hard-coded into this MFE.


==============================

.. |ci-badge| image:: https://github.com/edx/edx-developer-docs/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/edx/edx-developer-docs/actions/workflows/ci.yml
   :alt: Continuous Integration
.. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-app-account
   :target: https://codecov.io/gh/edx/frontend-app-account
.. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-app-account.svg
   :target: @edx/frontend-app-account
.. |npm_downloads| image:: https://img.shields.io/npm/dt/@edx/frontend-app-account.svg
   :target: @edx/frontend-app-account
.. |license| image:: https://img.shields.io/npm/l/@edx/frontend-app-account.svg
   :target: @edx/frontend-app-account
.. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
   :target: https://github.com/semantic-release/semantic-release
Description
No description provided
Readme AGPL-3.0 31 MiB
Languages
JavaScript 97.7%
HTML 1%
SCSS 0.9%
Makefile 0.4%