Replace Jinja templates in the frontend with Angular.
See original GitHub issueThis is intended as a starter project for newer contributors.
We want to remove all the uses of Jinja from the frontend codebase and replace these with some AngularJS equivalent, with the ultimate aim of getting rid of Jinja so that pages serve and load faster. Each file in the list below has a list of occurrences of Jinja templates that need to be removed and replaced with an appropriate Angular substitute. As an example, you can take a look at this PR and see how changes were made in the file search_results_directive.html
.
For new contributors: If you’re new to Angular, you can give this tutorial a try.
If you’d like to help with this issue, please select a file from the list below, put your name in parentheses next to it, and submit a PR after replacing all the jinja templates in that file. Once the PR is submitted, you can tick the checkboxes. Note that all filepaths should be assumed to start from core/templates/dev/head/pages.
Files to remove jinja templates from:
- header_css_libs.html (see incomplete work #4958) @jathusan123
{% if MINIFICATION or not DEV_MODE %}
- header_js_libs.html (see incomplete work #4958)
{% if MINIFICATION or not DEV_MODE %}
- footer_js_libs.html (#5937)
{% if not DEV_MODE %}
- collection_editor/collection_editor.html
{% if title %}
- exploration_editor/exploration_editor.html
{% if title %}
- library/library.html
{% if page_mode in ['group', 'search'] %}
- error/error.html
{% if status_code == 400 %}
Note: This part (above quoted) of the issue is moved to #5597 as the fix appears to be a much larger work than a starter project.
Completed
- exploration_player/exploration_player.html (previous work #5158) @vojtechjelinek
{% if exploration_version %}
{% if not iframed %}
--> first occurrence{% if not iframed %}
--> second occurrence
- base.html @hoangviet1993 #5048
{% if additional_angular_modules %}
{% if iframed %}
(need other approch to remove!){% if DEV_MODE %}
{% if SITE_FEEDBACK_FORM_URL %}
- exploration_player/learner_local_nav.html @WickedBrat #4261
{% if can_edit %}
{% if username %}
- exploration_editor/settings_tab/settings_tab.html @code247 #4209
{% if can_modify_roles %}
{% if can_release_ownership %}
{% if can_delete %}
{% if can_unpublish %}
- splash pages (All splash files need to be done in one PR) @DubeySandeep #3964
{% if not user_is_logged_in %}
- splash/splash.html
- splash/splash_ah0.html
- splash/splash_ah1.html
- splash/splash_ah2.html
- splash/splash_ai0.html
- splash/splash_ai1.html
- splash/splash_ai2.html
- splash/splash_ai3.html
- splash/splash_at0.html
- splash/splash_at1.html
- splash/splash_at2.html
- splash/splash_av0.html
- splash/splash_av1.html
- error/error.html @Nix07 #3969
{% if code == 400 %}
--> first occurrence{% if code == 400 %}
--> second occurrence{% if code == 400 %}
--> third occurrence
- preferences/preferences.html @ishucr7 #4019
{% if username %}
- forum/forum.html @ishucr7 #4050
{% if on_localhost %}
- exploration_editor/feedback_tab/feedback_tab.html @nithusha21 #4123
{% if user_email %}
--> first occurrence{% if not user_email %}
{% if user_email %}
--> second occurrence
- creator_dashboard/creator_dashboard.html @aks681 #4127
{% if not can_create_collections %}
{% if can_create_collections %}
--> first occurrence{% if can_create_collections %}
--> second occurrence
- exploration_editor/editor_tab/state_editor_responses.html @EvsChen
{% if SHOW_TRAINABLE_UNRESOLVED_ANSWERS %}
--> first occurrence{% if SHOW_TRAINABLE_UNRESOLVED_ANSWERS %}
--> second occurrence
- collection_player/collection_player.html @vojtechjelinek #5869
{% if collection_id %}
(On a quick look we found that we can entirely remove this jinja template as this is of no use. So after complete investigation one can delete this template entirely){% if can_edit %}
Issue Analytics
- State:
- Created 6 years ago
- Comments:110 (77 by maintainers)
Top GitHub Comments
@shubha1593 @debck I am already working on it. Thanks.
@durgeshra I’ve assigned you to
collection_player/collection_player.html
@codeherlife Since @durgeshra would be working on collection player, do you want to work onheader_css_libs.html
andheader_js_libs.html
(both are similar and should be done together)?