Page MenuHomePhabricator

Compare the contents: Show new section placeholder where the new section will be added
Closed, ResolvedPublic

Description

As part of the "Compare the contents before translating" step (T241589) of the Section Translation workflow, the target contents include a new section placeholder element. This lets the user know where the section will be added to the existing article.

Compare contents - Contents.png (768×1 px, 223 KB)
Compare contents - Contents Dimensions.png (768×1 px, 162 KB)

We need to make sure that the algorithm to determine where to publish the section is in sync with (or preferably the same) the one that decides where to show the placeholder. The idea is to add the new section at the end, but with some smart considerations to still leave references and other special sections after it. Since this behavior may be tweaked, we want to make sure that it remains consistent in both places (preview and publish).

More details are available in the parent task: T241589: Section Translation: Compare the contents before translating

Event Timeline

Pginer-WMF renamed this task from Compare the contents: to Compare the contents: Show new section placeholder where the new section will be added.Aug 3 2020, 10:17 AM
Pginer-WMF triaged this task as Medium priority.
Pginer-WMF created this task.

Change 626139 had a related patch set uploaded (by Nik Gkountas; owner: Nik Gkountas):
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add new section placeholder inside target article

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

Change 626139 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SXContentComparator: Add new section placeholder inside target article

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

For the current iteration it is ok if the placeholder is shown at the very end of the article. A separate follow-up ticket (T263139) will be making it smarter (i.e., showing before references)

Jpita subscribed.

@ngkountas can you point me to where I can see this "new section" banner?
I can't find it

Sure. "New section" banner appears in two cases: 1. Compare contents step: Choose "Full article in {targetLanguage}" content. It should appear at the end of the article if you scroll down to bottom. 2. Compare contents step: For a mapped section (present/already translated section) choose "Section in {targetLanguage}" content. It should appear at the end of the section.

Screenshot 2020-09-20 at 6.26.34 PM.png (1×1 px, 328 KB)

Screenshot 2020-09-20 at 6.26.53 PM.png (1×1 px, 293 KB)

Sure. "New section" banner appears in two cases: 1. Compare contents step: Choose "Full article in {targetLanguage}" content. It should appear at the end of the article if you scroll down to bottom. 2. Compare contents step: For a mapped section (present/already translated section) choose "Section in {targetLanguage}" content. It should appear at the end of the section.

Screenshot 2020-09-20 at 6.26.34 PM.png (1×1 px, 328 KB)

Screenshot 2020-09-20 at 6.26.53 PM.png (1×1 px, 293 KB)

Ah, nice! I had the chrome devtools device set to iphone X and it was too long, it was hiding the bottom :)
Thanks!

So, one thing I saw that might not be totally correct, in the designs, it shows the new section placeholder in the place where the new section should appear.
In the implementation the new section always shows in the end of the article.
This seems incorrect, right @Pginer-WMF ?

In the implementation the new section always shows in the end of the article.
This seems incorrect, right @Pginer-WMF ?

Yes. This was mentioned in T259492#6471113:

For the current iteration it is ok if the placeholder is shown at the very end of the article. A separate follow-up ticket (T263139) will be making it smarter (i.e., showing before references)

So there is already a separate ticket to improve that. If there is no other issue than the placement this could get resolved.