Page MenuHomePhabricator

CX2: Show the publish button initially disabled until there are changes to the content
Closed, ResolvedPublic

Description

Currently when starting a new translation in version 2 (unlike version 1) the "Publish" button is enabled from the very beginning.

Screen Shot 2018-06-05 at 14.53.23.png (642×732 px, 193 KB)

We want the publish button to be initially disabled instead, and become enabled after content has been added to the translation. This helps to communicate the idea of publishing as the next step for the content, and avoids inviting to publish an empty page as the next step.

Some considerations:

  • For a new translation with no content, the publish button will be disabled.
  • When the user adds any content to the translation document, the button becomes enabled (if no other error forces it to be disabled).
    • Adding content or modifying the title, categories, or publish settings does not count as "adding content to the translation document". If there are technical reasons for which the button gets enabled after such changes, we can live with that.
  • Other errors (during editing or after clicking publish) may result in the button disabled even if the translation has contents. These errors will follow their own logic, and we should try not to make them too restrictive to get the user into a dead-end.
  • When loading an existing translation which has content, te publish button should be enabled, since it has content that is perfectly fine to publish as it is.
  • After the user adds content it is ok for the publish button to remain enabled even if these contents are deleted by the user.

Event Timeline

Pginer-WMF triaged this task as Medium priority.Jun 5 2018, 1:16 PM
Pginer-WMF created this task.
Pginer-WMF moved this task from Needs Triage to CX2 on the ContentTranslation board.

Change 437717 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Enable publish button only if there's content to publish

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

Change 437717 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Enable publish button only if there's content to publish

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

@Pginer-WMF - (minor note) there is a workaround to avoid the following restriction:

modifying the title, categories, or publish settings does not count as "adding content to the translation document"

If a user adds and then deletes the content, the "Publish" button will be available to publish the empty article with just the changes in in the titles or categories. If we are OK that the above spec refers only to new translations (i.e. when an article is loaded from New translation), the task can be closed.

If a user adds and then deletes the content, the "Publish" button will be available to publish the empty article with just the changes in in the titles or categories. If we are OK that the above spec refers only to new translations (i.e. when an article is loaded from New translation), the task can be closed.

Looks like you're describing what is last point in description:

After the user adds content it is ok for the publish button to remain enabled even if these contents are deleted by the user.

Another way to "cheat" is using undo button.

Thanks, @Petar.petkovic - I added the comment just to be sure that we are totally aware of how "Publish" button works.

This looks good to me.
Thanks @Etonkovidova for checking, and @Petar.petkovic for the work here.

Vvjjkkii renamed this task from CX2: Show the publish button initially disabled until there are changes to the content to 0lbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Petar.petkovic as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Petar.petkovic renamed this task from 0lbaaaaaaa to CX2: Show the publish button initially disabled until there are changes to the content.Jul 1 2018, 11:03 PM
Petar.petkovic closed this task as Resolved.
Petar.petkovic claimed this task.
Petar.petkovic lowered the priority of this task from High to Medium.
Petar.petkovic updated the task description. (Show Details)
Petar.petkovic added a subscriber: Aklapper.