Page MenuHomePhabricator

Preview and publish: Communicate publishing issues
Closed, ResolvedPublic

Description

As part of the "Preview and publish" step (T252542) of the mobile editor for Section Translation, users can publish their translation contents after previewing them.

At that point we may want to communicate different potential issues to the user based on the content they are trying to publish or the result of a previous publish attempt.

Publish - Issues.png (768×1 px, 179 KB)

More details in the parent task: T252542: Section Translation Editor: Preview and publish

Event Timeline

Pginer-WMF triaged this task as Medium priority.Aug 11 2020, 1:16 PM
Pginer-WMF created this task.
Pginer-WMF moved this task from Backlog to Mobile editor on the SectionTranslation board.

Change 638158 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXPublisher: Add review info component

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

Change 638158 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXPublisher: Add review info component

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

ngkountas subscribed.

Change 664295 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] Section Translation: Check for MT abuse before publishing

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

@Pginer-WMF, in the current implementation these warning or error is shown when the user click on publish button. Is that the expected behaviour? Should we display the error or warning along with the publish preview? That is, when user press "Done" button in previous screen?

@Pginer-WMF, in the current implementation these warning or error is shown when the user click on publish button. Is that the expected behaviour? Should we display the error or warning along with the publish preview? That is, when user press "Done" button in previous screen?

Yes. The warnings and errors that we can anticipate is better to show them at the preview step. Especially for warnings that do not block publishing, this will give a chance for the content to be improved before it goes live.

@Pginer-WMF I understand that since the information for both MT abuse warnings and errors is available inside Preview Translation screen, we want to display MT warnings/errors immediately to the user (inside the review info section). Warnings can be suppressed (by clicking the check icon) so that user can be proceed with publishing but MT errors cannot be suppressed and will block publishing (unless user modifies translation to fix MT issues). Am I correct? Should the "Publish" button be disabled until user suppress MT warnings or fix MT issues?

Change 664295 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SX publishing: Add MT validation before publishing

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

@Pginer-WMF I understand that since the information for both MT abuse warnings and errors is available inside Preview Translation screen, we want to display MT warnings/errors immediately to the user (inside the review info section). Warnings can be suppressed (by clicking the check icon) so that user can be proceed with publishing but MT errors cannot be suppressed and will block publishing (unless user modifies translation to fix MT issues). Am I correct? Should the "Publish" button be disabled until user suppress MT warnings or fix MT issues?

Here we surface two kids of issues:

  • Errors are shown in red and prevent publishing. We can show the publish button disabled.
  • Warnings are shown in yellow and publishing is still possible (the button must be active).

For MT we were following this: " show warnings when MT > 85% and block publishing when MT > 95%". Thus:

  • If the MT percentage is in the 85-95% range, we show a warning, but do not disable publishing.
  • If the MT percentage is in the 95-100% range, we show an error, and keep the publish button disabled.

The numbers (and ranges) should be consistent with the approach we used to represent MT in the cards for already translated sentences (T260128). I'd recommend reusing variables to make sure that future adjustments in the percentages keep the consistency.

If there are multiple issues, errors are shown first, since they explain why publishing is not possible.

A side note about disabling the publish button:
Disabling the button for errors makes sense, but we need to be very careful with the code to make sure there are no false positives. We have this kind of problems when trying to anticipate abuse filters in CX (some abuse filters such as "too short article" were triggered when applied to a paragraph), but that seems unlikely to happen for section translation since the preview represents the complete edit. But please, surface any possible false positive scenario you can think of.

Change 731329 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SXPublisher: Disable publish button when publish result has errors

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

Change 731329 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SXPublisher: Disable publish button when publish result has errors

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

Change 731330 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX publishing: Reimplement communication of publishing issues

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

Change 734939 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX Publish Translation: Validate for MT when publish step is loaded

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

Change 734940 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX MT validation: Reset publish result on successful MT validation

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

Change 734941 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX Publish: Remove MT validation from publishTranslation action

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

Change 734943 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX MT warnings: Remove suppressing functionality

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

Change 734967 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Add navigation for publishing feedback errors and warnings

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

Change 734939 merged by Santhosh:

[mediawiki/extensions/ContentTranslation@master] SX Publish Translation: Validate for MT when publish step is loaded

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

Change 734940 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX MT validation: Reset publish result on successful MT validation

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

Change 734941 merged by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] SX Publish: Remove MT validation from publishTranslation action

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

Change 734943 merged by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] SX MT warnings: Remove suppressing functionality

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

Change 735952 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211101

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

Change 735952 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211101

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

Change 731330 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX publish: Remove PublishResult model and use PublishFeedbackMessage

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

Change 734967 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Add navigation for publishing feedback errors and warnings

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

Change 737354 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

Change 737354 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

Etonkovidova subscribed.

Here we surface two kids of issues:

  • Errors are shown in red and prevent publishing. We can show the publish button disabled.
  • Warnings are shown in yellow and publishing is still possible (the button must be active).

For MT we were following this: " show warnings when MT > 85% and block publishing when MT > 95%". Thus:

  • If the MT percentage is in the 85-95% range, we show a warning, but do not disable publishing.
  • If the MT percentage is in the 95-100% range, we show an error, and keep the publish button disabled.

The numbers (and ranges) should be consistent with the approach we used to represent MT in the cards for already translated sentences (T260128). I'd recommend reusing variables to make sure that future adjustments in the percentages keep the consistency.

If there are multiple issues, errors are shown first, since they explain why publishing is not possible.

A side note about disabling the publish button:
Disabling the button for errors makes sense, but we need to be very careful with the code to make sure there are no false positives. We have this kind of problems when trying to anticipate abuse filters in CX (some abuse filters such as "too short article" were triggered when applied to a paragraph), but that seems unlikely to happen for section translation since the preview represents the complete edit. But please, surface any possible false positive scenario you can think of.

I checked the section translation following the above guidelines on testwiki wmf.22 and on sx.wmflabs(tested on an Android device and a browser emulator) - seems to be working as expected (saying this with some caution- more testing/monitoring is needed).

Questions:

  • there are minor UI differences from the mockup in the specs
(1) the icon is missing) (2) the counter for errors is missing (3) the arrows to navigate are placed closer than in the mockup
Screen Shot 2022-02-15 at 5.30.58 PM.png (374×389 px, 46 KB)
  • is it expected do not able to publish on sx.wmflabs.org. I get an error

Screen Shot 2022-02-15 at 5.15.44 PM.png (507×394 px, 55 KB)

[60d53942a7bf3cdcf1bb065d] Caught exception of type Error

Error while translating segment SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

  if (!e['mediawiki/isValidProviderForTranslation'](i, o, a)) return Promise.resolve();
            try {
              const e = await t('application/getCXServerToken', {
              }, {
                root: !0
              });
              return await q.fetchSegmentTranslation(i, o, a, s, e)
            } catch (c) {
              return mw.log.error('Error while translating segment', c),
              s
            }
  • why the wording of the warning message is the same ("You can still publish..." even when the MT percentage is 100% and the publish button is disabled?

Questions:

  • there are minor UI differences from the mockup in the specs
(1) the icon is missing) (2) the counter for errors is missing (3) the arrows to navigate are placed closer than in the mockup
Screen Shot 2022-02-15 at 5.30.58 PM.png (374×389 px, 46 KB)
  • The icon (1) is expected to appear and help differentiate warnings from errors.
  • The controls to navigate (2 & 3) are expected only when there is more than one issue. So a scenario where multiple issues happens may be needed to verify whether it is missing in such case.
  • is it expected do not able to publish on sx.wmflabs.org. I get an error

I'm not sure if it is related to T294642#7677751 or a new issue. @ngkountas may know better.

  • why the wording of the warning message is the same ("You can still publish..." even when the MT percentage is 100% and the publish button is disabled?

When "the MT percentage is 100% and the publish button is disabled" the message should be represented as an error instead of a warning and look more like this:

Publish_-_Issues.png (217×419 px, 23 KB)

When "the MT percentage is 100% and the publish button is disabled" the message should be represented as an error instead of a warning and look more like this:

Publish_-_Issues.png (217×419 px, 23 KB)

Thanks, @Pginer-WMF. I just realized that I did not provide the screenshot for this case - the message is an error (the background is read) but the wording is as in a warning message:

Screen Shot 2022-02-15 at 5.10.35 PM.png (695×400 px, 63 KB)

  • is it expected do not able to publish on sx.wmflabs.org. I get an error

I can confirm that publishing is currently blocked on sx.wmflabs, but it's not related to neither the error posted above nor the sandbox publishing. Since this task refers to something totally different I believe we can continue closing this one, and creating new tasks to track: 1) the UI glitches that Elena noticed in this task and 2) the publishing issue in sx.wmflabs.org.