As part of template translation (T139332), users may find templates which content is based on other templates. Users should be able to translate those templates too.
# Proposed solution
For recursive templates, the idea is to use the same model but provide some additional context (to view and move to the parent template) while focusing on the template being edited.
{F4559778, size=full}
- Some templates contain information composed by other templates. In the image, the [[ https://en.wikipedia.org/wiki/Template:Infobox_person | "infobox person" template ]] shows the birth date information using the [[ https://en.wikipedia.org/wiki/Template:Birth_date_and_age | "birth date and age" template ]].
{F4559781, size=full}
- The template is edited in the usual way (T143121).
{F4559783, size=full}
- When editing content that is rendered by a template, it will be displayed as a block (in the same way it is done when the user finds a template in a regular paragraph).
{F4559785, size=full}
- When the user edits the template, the parent template will become collapsed and greyed-out.
- The parent template keeps visible the field where the child template to keep the connection and preview the changes. If the content of the parent field is too long, we may want to limit the height showing only part of it.
- Clicking on the parent template allows to go back to the previous state. where the user is editing the field containing the child template.
- The transition should communicate the idea that the parent template got collapsed and a new card appears to edit the template in the active field.
- If the source card has an equivalent template, the same process of expansion can be applied there.
- The parent field is kept visible only for one level of depth. That is, only for the field where the template being edited is contained. Other levels will show only the template name as illustrated in a variant of the scenario below: {F4559787}