New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 721936 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[M61][Small screen]Translate Infobar Redesign -Target language name is missing if source language name is long

Project Member Reported by krav...@chromium.org, May 12 2017

Issue description

Application Version (from "Chrome Settings > About Chrome"): 
Android Build Number (from "Android Settings > About Phone/Tablet"): 
Device: Samsung Galaxy Star plus

Steps to reproduce: 
1. Launch the app(M60)
2. Enable the flag "New Translate Infobar"  flag from about://flags page
3. Visit any page in a language other than the System language(s).
(Example - Baidu.com,m.yahoo.com.cp)
4. Wait for page load to finish

Observed behavior: 
Target language name is missing if source language name islong(chinse(simplified)

Expected behavior: 
Not sure about small screen expected behavior

Frequency: 
2/2

Additional comments: 

 
screenshot at http://go/chrome-androidlogs1/7/721936

Cc: bbergher@chromium.org
It's a UX issue. Impmented by design.
Need our UX designer for help.

+bbergher@
Good catch. We don't need both tabs to be fully visible, but rather just enough of the second to make it visible/scrollable.

Are there any truncation strategies we could use there? Something like:
A Chinese (Sim... or
B Chinese ...fied

B would be preferrable.
Sorry, I mean A would be preferable.
Truncation for all language names in all supported languages(50+) based on variable screen sizes are nearly not an option.

And it's much more difficult to garentee that the truncated string is clear enough(eg. 'Chinese(...' may be Simplified or Traditional)

Comment 6 by martiw@chromium.org, May 26 2017

Cc: goog...@chromium.org
Owner: martiw@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6be7b0586aabd4abf05c87eaa08f66549f399d33

commit 6be7b0586aabd4abf05c87eaa08f66549f399d33
Author: martiw <martiw@chromium.org>
Date: Tue Jun 06 08:24:29 2017

Do peeking animation when target language tab truncated.
When the translation infobar isn't long enough, the target
language tab might be hidden and user would not know it
exists.
The solution is to do a 'peeking' animation which scrolls
the tabLayout to the end to show its hidden part.

'Peeking animation' consists of the following steps:
1. wait for 1000ms
2. scroll to the end in 300ms
3. wait for 1000ms
4. scroll back to the start in 300ms

If this page is 'always translate', step 3, 4 will be
skipped.

Condition to trigger 'Peeking animation':
1. when >50% of second tab is invisible OR
2. this page is 'always translate'

Recorded mp4:
https://drive.google.com/open?id=0B1O0Z7eoZMuGdjZYSUdmelZiV2M
https://drive.google.com/open?id=0B1O0Z7eoZMuGU2tGWEF1bXFjV0k

BUG= 721936 

Review-Url: https://codereview.chromium.org/2904173002
Cr-Commit-Position: refs/heads/master@{#477234}

[modify] https://crrev.com/6be7b0586aabd4abf05c87eaa08f66549f399d33/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/6be7b0586aabd4abf05c87eaa08f66549f399d33/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateTabLayout.java

Status: Fixed (was: Assigned)

Comment 9 by martiw@chromium.org, Jul 28 2017

Labels: -M-60 M-62
Status: Started (was: Fixed)
After discussion, we will do a scrolling animation to scroll to the target
language tab when the language tabs is too long and exceeds the edge.
Cc: -bbergher@chromium.org ramyasharma@chromium.org napper@chromium.org yyushkina@chromium.org
MP4 Demo for the "scrolling to end" animation:
(dummy text added for demo only)
https://drive.google.com/open?id=0B1O0Z7eoZMuGN0VBR2ctbzhGejg

PTAL to the mp4 to see if it's okay.
target this to M62 or merge to M61?
This looks great. M61 please if possible.
Labels: -Restrict-View-Google
Labels: -M-62 M-61
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/621a79eab22d443b16b9f6160e747ce6dbbbf832

commit 621a79eab22d443b16b9f6160e747ce6dbbbf832
Author: Marti Wong <martiw@chromium.org>
Date: Tue Aug 01 16:29:29 2017

When translate infobar's language tab truncated, do a scroll animation.

When the translation infobar isn't long enough, the target
language tab might be hidden and user would not know it exists.
The current solution is to do a peeking animation, scrolls the tabs to
the end to show its hidden part and then scrolls back to the front.

After discussion, we decided to perform "scroll to the end" animation
only and skip the "scroll back to the front" part.

'Scrolling animation' consists of the following steps:
1. wait for 1000ms
2. scroll to the end in 300ms

Demo (dummy text added for demo only):
https://drive.google.com/open?id=0B1O0Z7eoZMuGN0VBR2ctbzhGejg

Bug:  721936 
Change-Id: I7ba1415761791b2c8d2ab96c20bb871a65b56de6
Reviewed-on: https://chromium-review.googlesource.com/590837
Commit-Queue: Marti Wong <martiw@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491008}
[modify] https://crrev.com/621a79eab22d443b16b9f6160e747ce6dbbbf832/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/621a79eab22d443b16b9f6160e747ce6dbbbf832/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateTabLayout.java

Labels: Merge-Request-61
Status: Fixed (was: Started)
Summary: [M61][Small screen]Translate Infobar Redesign -Target language name is missing if source language name is long (was: [M60][Small screen]Translate Infobar Redesign -Target language name is missing if source language name is long)
Project Member

Comment 18 by sheriffbot@chromium.org, Aug 3 2017

Labels: -Merge-Request-61 Hotlist-Merge-Approved Merge-Approved-61
Your change meets the bar and is auto-approved for M61. Please go ahead and merge the CL to branch 3163 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), ketakid @(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 19 by bugdroid1@chromium.org, Aug 4 2017

Labels: -merge-approved-61 merge-merged-3163
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bb312c941ba5849b2752eccb178e2b96e99ec06

commit 1bb312c941ba5849b2752eccb178e2b96e99ec06
Author: Ramya Sharma <ramyasharma@chromium.org>
Date: Fri Aug 04 04:36:04 2017

When translate infobar's language tab truncated, do a scroll animation.

When the translation infobar isn't long enough, the target
language tab might be hidden and user would not know it exists.
The current solution is to do a peeking animation, scrolls the tabs to
the end to show its hidden part and then scrolls back to the front.

After discussion, we decided to perform "scroll to the end" animation
only and skip the "scroll back to the front" part.

'Scrolling animation' consists of the following steps:
1. wait for 1000ms
2. scroll to the end in 300ms

Demo (dummy text added for demo only):
https://drive.google.com/open?id=0B1O0Z7eoZMuGN0VBR2ctbzhGejg

TBR=martiw@chromium.org

(cherry picked from commit 621a79eab22d443b16b9f6160e747ce6dbbbf832)

Bug:  721936 
Change-Id: I7ba1415761791b2c8d2ab96c20bb871a65b56de6
Reviewed-on: https://chromium-review.googlesource.com/590837
Commit-Queue: Marti Wong <martiw@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#491008}
Reviewed-on: https://chromium-review.googlesource.com/600952
Reviewed-by: Ramya Sharma <ramyasharma@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#307}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/1bb312c941ba5849b2752eccb178e2b96e99ec06/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/1bb312c941ba5849b2752eccb178e2b96e99ec06/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateTabLayout.java

Status: Verified (was: Fixed)
This issue is fixed in current M61 build 61.0.3163.42

Sign in to add a comment