Page MenuHomePhabricator

Find best approach to inject content with minimal disruption
Closed, ResolvedPublic

Description

When a page is delivered through an external translation service, we want to modify the content of the page to adapt it to this context (T212238, T212300, T212329). This means that content will be dynamically added when content is processed and delivered on an external service. We want to explore the different ways in which this can be done in a reliable way that provides a good user experience.

In particular we want to consider:

  • How to modify the content in a way that minimizes visible changes and unexpected jumps.
  • How to provide the content in the target language. Should the injected code be in the original language letting the external service to translate it, or should a translated version be injected (marking it to avoid the service to change it)?

Event Timeline

Pginer-WMF triaged this task as Medium priority.Dec 20 2018, 9:53 AM

How to modify the content in a way that minimizes visible changes and unexpected jumps.

Some quick suggestions:

  • Use the same width and height of the edit actions header for the injected banner. Also use matching background color.
  • If possible use the same icon of language to indicate translation, same pen and its position for Contribute. So they become static in the screen
  • Need to find a way to use the same pen icon by MobileFrontEnd for our banner, so that we can avoid downloading it
  • While the RL module for guidance is requested, can we fade or do soemthing with edit action toolbar so that the changes are minimal visually?

How to provide the content in the target language. Should the injected code be in the original language letting the external service to translate it, or should a translated version be injected (marking it to avoid the service to change it)?

There is a limitation in our mw.msg localization that you cannot present a message in a language different from interface language. Need to find a way to resolve that.

Letting the service to translate does not look good since we have our localization volunteers translating them accurately. We can mark the message element to avoid translation using notranslate attribute.

How to modify the content in a way that minimizes visible changes and unexpected jumps.

Some quick suggestions:

  • Use the same width and height of the edit actions header for the injected banner. Also use matching background color.
  • If possible use the same icon of language to indicate translation, same pen and its position for Contribute. So they become static in the screen
  • Need to find a way to use the same pen icon by MobileFrontEnd for our banner, so that we can avoid downloading it
  • While the RL module for guidance is requested, can we fade or do soemthing with edit action toolbar so that the changes are minimal visually?

Jumping in here - the fundraising team might have ideas around this as well

Pginer-WMF raised the priority of this task from Medium to High.Dec 21 2018, 8:07 AM

Change 483080 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ExternalGuidance@master] Use opacity transition to make the banner appearance less flashy

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

Change 483081 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ExternalGuidance@master] Render the page status container early

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

Change 483080 merged by jenkins-bot:
[mediawiki/extensions/ExternalGuidance@master] Use opacity transition to make the banner appearance less flashy

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

Change 483081 merged by jenkins-bot:
[mediawiki/extensions/ExternalGuidance@master] Render the page status container early

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

Pginer-WMF claimed this task.

The current approach uses transitions to minimize the visual impact of injected UI elements. This looks good.
If specific issues are found while testing on more realistic environment, separate tickets will be created.