Skip to content

feat: add new Catalog MFE #257

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ In addition, this plugin comes with a few MFEs which are enabled by default:
- `Learning <https://github.com/openedx/frontend-app-learning/>`__
- `ORA Grading <https://github.com/openedx/frontend-app-ora-grading/>`__
- `Profile <https://github.com/openedx/frontend-app-profile/>`__
- `Catalog <https://github.com/openedx/frontend-app-catalog/>`__

Instructions for using each of these MFEs are given below.

Expand Down Expand Up @@ -120,6 +121,14 @@ Profile

Edit and display user-specific profile information. The profile page of every user is visible at ``http(s)://{{ MFE_HOST }}/profile/u/{{ username }}``. For instance, when running locally, the profile page of the "admin" user is: http://apps.local.openedx.io/profile/u/admin.

Catalog
~~~~~~~~

.. image:: https://raw.githubusercontent.com/overhangio/tutor-mfe/release/media/catalog.png
:alt: Catalog MFE screenshot

The Catalog MFE replaces the former Home, Course About and Course catalog pages, which is the main part of the LMS where students start interacting with courses.


MFE management
--------------
Expand Down Expand Up @@ -175,7 +184,7 @@ program is used in the ``Dockerfile`` to pull translations from the `openedx/ope

The ``make pull_translations`` command passes the ``ATLAS_OPTIONS`` environment variable to the ``atlas pull`` command. This allows specifying a custom repository or branch to pull translations from.

Translations in the MFE plugin as well as other Tutor plugins can be customized with the following configuration
Translations in the MFE plugin as well as other Tutor plugins can be customized with the following configuration
variables:

- ``ATLAS_REVISION`` (default: ``"main"`` on tutor Main branch and ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
Expand Down
Binary file added media/catalog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tutormfe/patches/openedx-lms-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ MFE_CONFIG_API_CACHE_TIMEOUT = 1
{% if get_mfe("authn") %}
FEATURES['ENABLE_AUTHN_MICROFRONTEND'] = True
{% endif %}
{% if get_mfe("catalog") %}
FEATURES['ENABLE_CATALOG_MICROFRONTEND'] = True
{% endif %}
{% if get_mfe("communications") %}
FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] = True
{% endif %}
Expand Down
4 changes: 4 additions & 0 deletions tutormfe/patches/openedx-lms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ COMMUNICATIONS_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe("communicat
MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True
{% endif %}

{% if get_mfe("catalog") %}
CATALOG_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe("catalog")["port"] }}/courses"
{% endif %}

# Cors configuration
{% for app_name, app in iter_mfes() %}
# {{ app_name }} MFE
Expand Down
4 changes: 4 additions & 0 deletions tutormfe/patches/openedx-lms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ COMMUNICATIONS_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http:
MFE_CONFIG["SCHEDULE_EMAIL_SECTION"] = True
{% endif %}

{% if get_mfe("catalog") %}
CATALOG_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/courses"
{% endif %}

LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}")
CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}")
CSRF_TRUSTED_ORIGINS.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}")
Expand Down
5 changes: 5 additions & 0 deletions tutormfe/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"repository": "https://github.com/openedx/frontend-app-profile.git",
"port": 1995,
},
"catalog": {
"repository": "https://github.com/raccoongang/frontend-app-catalog.git",
"port": 1998,
"version": "rg-tick/develop",
},
}


Expand Down