Background:
To help users explore templates and find the right one for their intended use, we will replace the close button with a back button in the TemplateDialog once a template has been selected from search results. This only applies when inserting a new template. We will also add a warning message (T272355: Add unsaved changes warning message to VE TemplateDialog), that will warn users about data loss if they have entered data into a selected template.
Requirements:
- Implement behind feature flag with T272355: Add unsaved changes warning message to VE TemplateDialog and T274263: Add button to delete template in the context menu
- When inserting a new template, replace close button with back button after selecting a template in the search results. Clicking the back button returns you to the search.
- After back button is clicked, it should switch to an "X" close button on the search screen.
- When editing an existing template, the "X" close button remains as is.
Mocks
Insert template (with back button):
For reference, edit template (close button):
Related tickets:
- Prototyping ticket: T260885: Implement back button and dialog heading change (Note: the heading change that was included in this ticket will be revised and implemented separately later)
- Close after completion T155536: VisualEditor template insertion dialog needs a back option after selecting the template