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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 20 2018, 9:53 AM
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
santhosh moved this task from Backlog to In Progress on the ExternalGuidance board.Jan 3 2019, 8:52 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

santhosh moved this task from In Review to Done on the ExternalGuidance board.
Pginer-WMF closed this task as Resolved.Jan 21 2019, 12:28 PM
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.