-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Removed a layer of app manager template hierarchy #35664
base: master
Are you sure you want to change the base?
Conversation
<h1>This app is no longer supported</h1> | ||
<p>If you believe this to be in error, please contact support.</p> | ||
{% block page_content %} | ||
{% blocktrans %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i generally prefer to blocktrans INSIDE of block tags like <p>
and <h1>
tags, as that relies on the translator to get those tags (and closing tags) correct in the translated text...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, fixed in e9065ef
{% initial_page_data 'export_json' app.export_json %} | ||
<form action="{% url "import_app" domain %}" id="app-import-form" method="post" enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
{% if app %} | ||
<p>Import application <strong>{{ app.name }}</strong> from domain <strong>{{ app.domain }}</strong>?</p> | ||
{% blocktrans %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my nit of blocktrans inside of <p>
still applies. additionally, if i remember correctly blocktrans
doesn't play well with app.name
type variables (e.g. properties of variables). you generally need to do something like:
<p>
{% blocktrans with app_name=app.name app_domain=app.domain %}
Import application <strong>{{ app_name }}</strong> from domain <strong>{{ app_domain }}</strong>?
{% endblocktrans %}
</p>
or those values will actually show up blank when rendered (regardless of translation). resolving this is a blocker for a ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, that's unfortunate if values get blanked out but there's no error. Updated in e9065ef
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
corehq/apps/app_manager/templates/app_manager/partials/add_item_templates.html
Show resolved
Hide resolved
docs/js-guide/dependencies.rst
Outdated
but one example would be adding a new page to app manager that inherits | ||
from ``managed_app.html``. | ||
from ``apps_base.html.html``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo... i think this should be apps_base.html
rather than apps_base.html.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - e9065ef
Technical Summary
This is the template hierarchy in app manager that descends from
apps_base.html
, which is the template that sets up the left-hand menu of the app's modules & forms (and various other UI infrastructure):This PR removes
no_longer_supported.html
andimport_app.html
from this tree, since they're simple templates that don't need the app menu. That makesmanaged_app.html
the only child ofapps_base.html
, so then I combine those into a single template.For fun, I also migrated the import app page to webpack.
Safety Assurance
Safety story
These changes are fairly mehanical. The main risk is making app manager pages 500. I've smoke tested the various pages - releases, app settings, module, advanced module, report module, form settings, form edit - to verify they still load.
Automated test coverage
There are some view level tests in app manager. I doubt this change is fully covered.
QA Plan
Not requesting QA.
Rollback instructions
Labels & Review