Page MenuHomePhabricator

CX2: Warning about article having changed too much
Closed, ResolvedPublic

Authored By
Pginer-WMF
Jun 19 2017, 11:40 AM
Referenced Files
F27510465: Screen Shot 2018-12-11 at 1.50.18 PM.png
Dec 12 2018, 5:52 AM
F27501771: Screen Shot 2018-12-11 at 1.50.53 PM.png
Dec 12 2018, 5:52 AM
F26608775: cx-restart-translation.png
Oct 15 2018, 9:16 AM
F26608769: cx-discard-translation.png
Oct 15 2018, 9:16 AM
F26569299: image.png
Oct 12 2018, 9:32 PM
F16098302: CX-restart-confirm.png
Mar 26 2018, 10:38 AM
F16098295: CX-warn-src-changed-details.png
Mar 26 2018, 10:38 AM
F16098292: CX-warn-src-changed.png
Mar 26 2018, 10:38 AM

Description

Ideally the source article of a translation should reflect the latest version. When small changes happen to the source article, those can be updated automatically. However, in some other cases where changes affect the content more heavily, it is not possible to update the source article without losing the translation contents.

In such cases, we want to show a warning about the original translation having changed too much. This warning is useful to explain the user that they are not translating the latest version of the article, and provide them the option to restart the translation.

The system to communicate issues (T189488) will be used to show a warning as illustrated below:

Initial message when loading the translation

CX-warn-src-changed.png (720×1 px, 227 KB)

  • The issue summary will show a message to surface the warning.
  • The content of the message will be: "This translation is based on an older version of the content. The source page may have changed significantly, and you may want to restart the translation."
  • The "view issues" link closes the summary message and expands the issue card (more details below).

Issue details

CX-warn-src-changed-details.png (720×1 px, 261 KB)

  • When expanded, the issue card will show more details.
  • The content of the message will be: "This translation is based on an older version of the content. The source page may have changed significantly. You can continue this translation, or start it again to use the updated content. If you restart the translation, your current changes will be lost."
  • "Changed significantly" in the message will be a link pointing to the diff between the version used in the translation and the most recent version which should open in a new window (T146761). That will help users to decide whether it is worth incorporating the new changes.
  • The "Mark as resolved" action will discard the issue and not show it again until the article is affected by further changes.
  • The "Restart the translation" action will discard the current contents and start a new translation with the most recent version of the article. A confirmation dialog will be shown to prevent accidental data loss (more details below).

Confirmation dialog

CX-restart-confirm.png (720×1 px, 242 KB)

  • A confirmation dialog will be shown after selecting the option to restart the translation: "Restart the translation? You will start a new translation for the most recent version of the page. All your changes will be lost."
  • Users can "cancel" to go back or confirm and "restart the translation".

Related ticket: T176843

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Amire80 triaged this task as High priority.Jul 3 2017, 3:06 PM
Pginer-WMF lowered the priority of this task from High to Medium.Feb 20 2018, 8:43 AM
Pginer-WMF removed the point value for this task.
Pginer-WMF renamed this task from Warning about article having changed too much not shown to CX2: Warning about article having changed too much.Mar 26 2018, 10:38 AM
Pginer-WMF updated the task description. (Show Details)

When supporting this, we want to make sure that links open in a new window as reported in T146761 (and close that ticket once we check it works as expected in the new version)

Pginer-WMF raised the priority of this task from Medium to High.Sep 4 2018, 7:04 AM

Change 465766 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Warning about article changed too much

https://gerrit.wikimedia.org/r/465766

Change 466800 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Allow additional buttons in the issue card

https://gerrit.wikimedia.org/r/466800

Change 466977 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Implement "Restart the translation" functionality

https://gerrit.wikimedia.org/r/466977

The "Restart.." button should probably be destructive? cf discard changes:

image.png (177×325 px, 13 KB)

The "Restart.." button should probably be destructive? cf discard changes:

image.png (177×325 px, 13 KB)

Makes sense. The restart button is intended to both destroy (the old) and start (the new), but it is true that the purpose of the dialog is mainly to confirm that the user is ok with losing the existing data and can benefit from the extra emphasis. Let's make the restart button in the dialog to be destructive.

The published patch does include 'destructive' flag. What is proposed is to add 'primary' flag to already added 'destructive' flag. For comparison, here are 'primary' and 'destructive' flags used when deleting a draft on CX:

cx-discard-translation.png (126×309 px, 4 KB)

And here is what the patch already has, 'destructive' flag, currently without 'primary' flag:

cx-restart-translation.png (176×305 px, 8 KB)

@Pginer-WMF which style should be used for the "Restart the translation" dialog? primary destructive or just destructive?

@Pginer-WMF which style should be used for the "Restart the translation" dialog? primary destructive or just destructive?

Thanks for the clarification @Petar.petkovic. I'd go with both primary destructive.
In this case "primary" helps to mark which is the default path forward, and "destructive" helps the user not to just move to the default direction without thinking.

Change 467330 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Allow to resolve unattached issues

https://gerrit.wikimedia.org/r/467330

Once published, the translation cannot be restarted. When same translation is started again, the latest draft created before publishing is loaded.

While reviewing my patches, @Nikerabbit pointed out that we should bring this question up for discussion here.
Some of the proposed ways to deal with lack of the ability to restart the translation are:

  • Detect it and don't offer the functionality to "Restart the translation"
  • Skip detection, but add a note along the lines "if this article was previously published, this won't work"

Once published, the translation cannot be restarted. When same translation is started again, the latest draft created before publishing is loaded.

While reviewing my patches, @Nikerabbit pointed out that we should bring this question up for discussion here.
Some of the proposed ways to deal with lack of the ability to restart the translation are:

  • Detect it and don't offer the functionality to "Restart the translation"
  • Skip detection, but add a note along the lines "if this article was previously published, this won't work"

I'd propose to detect the problematic case and don't offer the functionality in such case, until T192065 gets resolved (I'll add a note to that ticket so that we don't forget to undo this then).

Change 465766 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Warning about article changed too much

https://gerrit.wikimedia.org/r/465766

Change 467330 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Allow to resolve unattached issues

https://gerrit.wikimedia.org/r/467330

Change 466800 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Allow additional buttons in the issue card

https://gerrit.wikimedia.org/r/466800

@Pginer-WMF When restart option is not provided, we still display the same description: You can continue this translation, or start it again to use the updated content. If you restart the translation, your current changes will be lost.

Should we have a separate description for this case?

Change 466977 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Implement "Restart the translation" functionality

https://gerrit.wikimedia.org/r/466977

cx-restart-translation.png (176×305 px, 8 KB)

The issue of the label extending to the edges of the button has been reported as a separate ticket: T207369: Embedded buttons in dialogs lack padding

First mockup from the description displays issue summary as a warning panel below publish button line. It is supposed to provide link to open card with details about issue.

That feature is yet to be supported in issue card system T189488. There is another ticket waiting on that feature - T192144.

That feature is yet to be supported in issue card system T189488. There is another ticket waiting on that feature - T192144.

I see two options to move forward:

  • Consider the feature part of T192144 and support both the improvements in the general framework as well as the specific case where it is needed. The fact that one piece of the solution is reusable for other tickets it does not necessarily mean we exclude it from the scope of these tickets.
  • Creating a separate ticket for such improvement if that helps to have more focused tasks (the ticket about the card system is too general).

I was assuming the first way, but we can go with the second if that's needed for tickets not to be waiting.

That feature is yet to be supported in issue card system T189488. There is another ticket waiting on that feature - T192144.

I see two options to move forward:

  • Consider the feature part of T192144 and support both the improvements in the general framework as well as the specific case where it is needed. The fact that one piece of the solution is reusable for other tickets it does not necessarily mean we exclude it from the scope of these tickets.
  • Creating a separate ticket for such improvement if that helps to have more focused tasks (the ticket about the card system is too general).

I was assuming the first way, but we can go with the second if that's needed for tickets not to be waiting.

I prefer new ticket, so that would be option number 2.
There are multiple tasks which require the feature of connecting error message with issue card details and would be great to list tickets which depend on such feature, such as this one and T192144.

That feature is yet to be supported in issue card system T189488. There is another ticket waiting on that feature - T192144.

I see two options to move forward:

  • Consider the feature part of T192144 and support both the improvements in the general framework as well as the specific case where it is needed. The fact that one piece of the solution is reusable for other tickets it does not necessarily mean we exclude it from the scope of these tickets.
  • Creating a separate ticket for such improvement if that helps to have more focused tasks (the ticket about the card system is too general).

I was assuming the first way, but we can go with the second if that's needed for tickets not to be waiting.

I prefer new ticket, so that would be option number 2.
There are multiple tasks which require the feature of connecting error message with issue card details and would be great to list tickets which depend on such feature, such as this one and T192144.

Ok. I created T207939: CX2: Access more details from the issue summary in a card
Feel free to add any comment there.

Change 470797 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Connect infobar with issue card

https://gerrit.wikimedia.org/r/470797

Change 470797 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Connect infobar with issue card

https://gerrit.wikimedia.org/r/470797

Etonkovidova subscribed.

Checked in wmf.8 (testwiki):

All looks according to the specs (the link "Learn more" is not present in the issue card and it's not described in the specs):

Screen Shot 2018-12-11 at 1.50.18 PM.png (615×1 px, 197 KB)

Screen Shot 2018-12-11 at 1.50.53 PM.png (289×411 px, 40 KB)

All looks according to the specs (the link "Learn more" is not present in the issue card and it's not described in the specs):

Thanks for checking. I'll take note to make sure that once the documentation pages are available (T203152), the learn more link is added pointing to the corresponding one.