overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

feat: `get_mfe` template function #171

Closed regisb closed 11 months ago

regisb commented 11 months ago

Currently, the syntax to fetch mfe settings inside patches is very awkward:

{% for app_name, app in iter_mfes() %}
{% if app_name == "mymfe" %}
...
{% endif %}
{% endfor %}

We introduce a new template function to make this easier:

SOMETHING = "{{ get_mfe('mymfe')['port'] }}"

get_mfe is cached for performance.

regisb commented 11 months ago

I know, right?

regisb commented 11 months ago

Merging this very fast because I want to close as many PRs as possible before Quince on Monday.