Page MenuHomePhabricator

Preview and publish: Support publishing in sandbox
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.

This ticket provides support for basic publishing options so that users can decide to publish the contents in their sandbox using it as a draft space for sections.

Publish - Options transition.png (768×1 px, 162 KB)
Publish - Options.png (768×1 px, 169 KB)
Publish - Options Dimensions.png (768×1 px, 52 KB)

By default two options are provided:

Publish as a new section
Add a new section to the article.

Publish to your Sandbox
Publish to your personal space for you to review and copy elsewhere.

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

Event Timeline

Pginer-WMF created this task.

Change 633357 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SX Preview and publish: Add publish options dialog

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

Change 633357 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SX Preview and publish: Add publish options dialog

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

There's a weird behavior in the publish options popup:

  • when we select an unselected option - it closes the popup immediately
  • when we select an already selected option - we need to click the back button to close the popup

Why is there a difference and will it be fixed in this ticket?

ngkountas added a subscriber: ngkountas.

Change 644789 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SX Publish Translation: Support publishing in sandbox

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

Change 644789 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SX Publish Translation: Support publishing in sandbox

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

the option is not being saved if we edit the translation.
Steps:
1-go to the final step before publishing
2-change to "publish to your sandbox"
3-click the "edit translation" pencil button
4-click the right arrow button
5-open the publish options

the last selected option is not longer enabled

right now it's not possible to publish to the sandbox but I guess this is expected?

image.png (338×369 px, 37 KB)

right now it's not possible to publish to the sandbox but I guess this is expected?

Just to confirm: the same content published well as a new section but not in the sandbox?

We may want to check if this is:

  • A limitation of the test server: we may want to create a follow-up ticket to offer the option when it is possible to use.
  • A limitation based on whether the sandbox page exists for the user: we may want to create a follow-up ticket to create the sandbox page if it does not exist already
  • Something else.

I'm assuming this is a limitation of the server but @ngkountas or @KartikMistry can confirm

There shouldn't be any limitation on publishing on the test server. I think it just needs a revise of parsoid/restbase configuration.

image.png (836×395 px, 38 KB)
It works properly on localhost

the option is not being saved if we edit the translation.
Steps:
1-go to the final step before publishing
2-change to "publish to your sandbox"
3-click the "edit translation" pencil button
4-click the right arrow button
5-open the publish options

the last selected option is not longer enabled

This issue is fixed in this patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/656890

waiting for a fix for this, this error happens on both cx2-testing and sx-labs when I try to publish on sandbox

image.png (730×1 px, 145 KB)

@KartikMistry do you think this is an infrastructure or application software issue? In any case, if this is not something obvious, I think that it's not a big priority and can be moved to backlog, if no quick fix available. @Pginer-WMF do you agree?

@KartikMistry do you think this is an infrastructure or application software issue? In any case, if this is not something obvious, I think that it's not a big priority and can be moved to backlog, if no quick fix available. @Pginer-WMF do you agree?

I think so. If we expect this to work on a real wiki, it is ok if it takes some time to be fixed in the testing instance, and it may not be worth delaying the work on our main blockers. We can go back to this later since it is preferred to have a test instance that resembles as much as possible the real wikis.

In the test server, the option to publish in the sandbox creates a sub-page with the target article title:

sx.wmflabs.org_index.php_title=User_Pau_Bigfoot_(videojuego)&mobileaction=toggle_view_mobile(iPhone 6_7_8).png (1×750 px, 87 KB)

For wikis such as Wikipedia where there is a sandbox page, would the published section be added there or a new sub-page will be created as in the test server?

You can find the link to the sandbox at the top-right personal links after the Talk page (In Bengali wikipedia this is https://bn.wikipedia.org/wiki/Special:MyPage/খেলাঘর )

I think that when we are talking about sandbox in our application we are just talking about user namespace. So when we publish a section to the article page, we are in fact publishing to the main namespace. When user selects "publishing in sandbox", the section is being published in the user namespace. As far as I am concerned, the sandbox page you are referring to, is just another page in the user namespace with title "sandbox" (i.e. its title is User:myUsername/sandbox). Thus, I think that the published section will be published in this sandbox page only if the target article's title is "sandbox".

Thanks for the clarification. We can adjust this in upcoming iterations.

My concern is that here we are creating a page for which the user has no control on the name. Users don't have an easy way to organize their pages or avoid overlaps. Especially considering that renaming pages is not a simple process in Mediawiki.

In Content translation users can change the page name when they select the option to publish it as a personal draft under their namespace. In Section Translation, the idea is to use the sandbox as a generic page where it is ok to add sections to work temporarily on them and cop the contents over to their final destination later. I'm not sure how the sandbox is defined, but since it has a link in the personal toolbar I assumed that it can be obtained programatically.

I'll create a separate ticket to explore this.