As part of the publishing support (T188732), we want to let the user know whether there is a page with the same title used for the translation. This is important since the contents of such page will get overwritten by the translation content when it is published.
We want to inform the user at three different points:
- Initially when the translation is loaded, if the initial translation title corresponds to an existing page in the target wiki.
- When the title is modified and the new title corresponds to an existing page in the target wiki.
- When publishing, as a final confirmation step to avoid accidental overwriting a page.
Proposed solution
The proposed solution is based on the system for communicating issues in CX (T189488). The specific case for this particular issue, is illustrated below:
- A warning marker will be shown next to the page title indicating there is one issue.
- The warnings card will show the warning, allowing to access more details about it.
- When the title gets focused, or the user clicks in the issue card (either in "1 warning" or "view details"), the issue card will show the details.
- The page name in the message will link to the page in the target wiki.
- "Mark as resolved" will make the issue to no longer be shown (even if the translation is loaded in future sessions), unless the user edits the title changing it to another existing page (which would be considered another instance of the issue).
- The "more details" will open a documentation page in a new tab/window with more details on publishing over an existing page.
Confirmation dialog
When the user tries to publish (even if the issue was marked as resolved), we want to remind that the content of the target page will be overwritten. We'll show a dialog asking for confirmation to proceed:
This should be shown if this is the only pending issue or there are no pending issues at all. If there are more issues, there is already a confirmation dialog (T190036) that we may want to adapt to communicate both messages instead of showing two dialogs one after the other:
Related ticket: T188982