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

Issue 703887 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Feature

Blocked on:
issue 705310
issue 705311
issue 713514

Blocking:
issue 720184
issue 727436


Show other hotlists

Hotlists containing this issue:
Clingon-translate


Sign in to add a comment

Redesign Clank Translate UI

Project Member Reported by goog...@chromium.org, Mar 21 2017

Issue description

Problem Statement

* Clank Translate UI is question-based/text-heavy and hard to understand for ESL users with English UI
* Clank Translate UI can be confused for a banner ad
* Changing target languages is a poorly used feature despite demand for it (only 0.2% of Translate accepts were associated with a modification of the target language)
* Clank Translate UI cannot be triggered for English pages for users with English UI despite evidence of need for it
* Selecting text to translate through contextual search is clunky, doesn’t always trigger when expected, and does not translate in context

PRD:
https://docs.google.com/document/d/1RggLzsK8uqx6dzjMfg9vJ5KIFP5QdPXAt3iOPJUToTY

[Version number]

[OS details]
Android

[Where is the poor translation?]

[attach any screenshots below]

 
Blockedon: 705310

Comment 3 by martiw@chromium.org, Mar 27 2017

Blocking: 705311
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 7 2017

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

commit 92d27790b430374991505d62025876708e54b6ba
Author: googleo <googleo@chromium.org>
Date: Fri Apr 07 05:50:13 2017

Translate page in the new UI.
This CL implements the basic functions of the new translate infobar under a protection of the experiment flag.

1, Make TranslateCompactInfoBar as an observer for the ContentTranslateDriver to response page translated event.
2, Stop translate UI reloading before translate infobar was closed explicitly.
3, Polish UI.

Demo record:
https://googleo.users.x20web.corp.google.com/chrome/videos/transdemo1.mp4

BUG= 703887 

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

[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/res/layout/infobar_translate_compact_content.xml
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/res/values/dimens.xml
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateInfoBar.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateLanguagePanel.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateOptions.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateTabLayout.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateInfoBarTest.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateOptionsTest.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/browser/ui/android/infobars/translate_compact_infobar.cc
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/browser/ui/android/infobars/translate_compact_infobar.h
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TranslateUtil.java
[modify] https://crrev.com/92d27790b430374991505d62025876708e54b6ba/components/translate/core/browser/translate_infobar_delegate.cc

Blockedon: 705311
Blocking: -705311
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 11 2017

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

commit 722783997be0338cf14613eca3e58e34a43ef24d
Author: googleo <googleo@chromium.org>
Date: Tue Apr 11 05:06:12 2017

Use TintedImageButton with @color/dark_mode_tint instead of ImageButton.
Set selected text in tab blue.

Screenshot:
https://screenshot.googleplex.com/bcPOLLMNKtb

BUG= 703887 

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

[modify] https://crrev.com/722783997be0338cf14613eca3e58e34a43ef24d/chrome/android/java/res/layout/infobar_translate_compact_content.xml

Blockedon: 713514
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 21 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 26 2017

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 26 2017

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

commit 4294989fb987c9999651d904b602d4423295c78d
Author: googleo <googleo@chromium.org>
Date: Wed Apr 26 02:47:23 2017

Implement all menu options functions.

1, Call relevant native function after user selects "Always", "Never language", "Never site"
2, Translate the target/source language selected by user in Language popup menu.

All functions above were tested on my local devices.

This CL is based on Issue/2830543003

BUG= 703887 

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

[modify] https://crrev.com/4294989fb987c9999651d904b602d4423295c78d/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java

Components: -UI>Browser>Translate UI>Browser>Language>Translate
Project Member

Comment 13 by bugdroid1@chromium.org, May 1 2017

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

commit 67ed5fd8781049a3566ce37426bceae03bca942d
Author: googleo <googleo@chromium.org>
Date: Mon May 01 06:45:59 2017

Fix UI when "always translate" is enabled.

This fix will set translate infobar with a translating status in the beginning, then highlighted the targeted language tab after translated.

Tested on my device

BUG= 703887 

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

[modify] https://crrev.com/67ed5fd8781049a3566ce37426bceae03bca942d/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/67ed5fd8781049a3566ce37426bceae03bca942d/chrome/browser/ui/android/infobars/translate_compact_infobar.cc

Project Member

Comment 15 by bugdroid1@chromium.org, May 5 2017

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

commit 2233a90a6442f3d4f927cc47df918898edbf4fb2
Author: googleo <googleo@chromium.org>
Date: Fri May 05 02:08:15 2017

Fix some UI bugs.
1, Fix hard code always translate value and show correct "always translate" state in the same session.
2, Refresh langauge list every time, in case use changed source/target language.
3, Fix menu button desc under talkback mode.

Tested on my local N5.

BUG= 703887 

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

[modify] https://crrev.com/2233a90a6442f3d4f927cc47df918898edbf4fb2/chrome/android/java/res/layout/infobar_translate_compact_content.xml
[modify] https://crrev.com/2233a90a6442f3d4f927cc47df918898edbf4fb2/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/2233a90a6442f3d4f927cc47df918898edbf4fb2/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateMenuHelper.java

Blocking: 720184
Project Member

Comment 19 by bugdroid1@chromium.org, May 14 2017

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

commit 4ed2e81288b9ec8735be8ac3828817b3d4c56eb3
Author: martiw <martiw@chromium.org>
Date: Sun May 14 08:26:08 2017

When using the new translate infobar, if I navigate away from the web page with the overflow menu remains open, chrome will crash if I click on any menu item (trying to access the native infobar of the previous page which is killed already).

To fix this bug, we need to make sure all the child UI are dismissed when the infobar is being removed.

About the new translate infobar:
- prototype: https://bbergher.googleplex.com/prototypes/translate/easier-1/
- Try it by: open chrome://flags/#translate-compact-infobar , select Enable

BUG= 703887 

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

[modify] https://crrev.com/4ed2e81288b9ec8735be8ac3828817b3d4c56eb3/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
[modify] https://crrev.com/4ed2e81288b9ec8735be8ac3828817b3d4c56eb3/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/4ed2e81288b9ec8735be8ac3828817b3d4c56eb3/chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateMenuHelper.java

Project Member

Comment 20 by bugdroid1@chromium.org, May 16 2017

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

commit cd21f782ca83751c89fc9ebc0ef233e736ff9c88
Author: martiw <martiw@chromium.org>
Date: Tue May 16 04:00:03 2017

Automatically trigger Never-Translate in new translation infobar
In the new translation infobar, when the number of consecutive
translation denied reaches a threshold, it will trigger 'Never-Translate
this language' automatically.  This CL is trying to implement this
feature without altering the behavior of the existing infobars.

A translation denied is counted when user click on the close button
without ever translated or clicking on any menu item.

BUG= 703887 
TBR=groby@chromium.org

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

[modify] https://crrev.com/cd21f782ca83751c89fc9ebc0ef233e736ff9c88/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/cd21f782ca83751c89fc9ebc0ef233e736ff9c88/chrome/browser/ui/android/infobars/translate_compact_infobar.cc
[modify] https://crrev.com/cd21f782ca83751c89fc9ebc0ef233e736ff9c88/chrome/browser/ui/android/infobars/translate_compact_infobar.h
[modify] https://crrev.com/cd21f782ca83751c89fc9ebc0ef233e736ff9c88/components/translate/core/browser/translate_infobar_delegate.cc
[modify] https://crrev.com/cd21f782ca83751c89fc9ebc0ef233e736ff9c88/components/translate/core/browser/translate_infobar_delegate.h

Project Member

Comment 23 by bugdroid1@chromium.org, May 23 2017

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

commit e65dd51e10accc80aa2be79129912f47357cb958
Author: googleo <googleo@chromium.org>
Date: Tue May 23 03:21:50 2017

Replace OnPageTranslate Observer by a responder of delegate.

In order to be notified that page is translated, we simply implement CompactInfobar as observer of Translate Driver.
But now we found from the translate button is clicked to the page is translated, there are many steps. If any step is returned, we are not be notified at all.

In order to fix the loose relationship, we create a responder inside the delegate.
So no matter what delegate is going to do, we will be notified, which keep infobar always consistent with delegate.

What's more, on some corner cases listed in bug/723426, the relationship between infobar and translate driver causes crash. And the new strong relationship will fix it.

BUG= 720164 , 703887 ,723426, 724428
TBR=dfalcantara@chromium.org

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

[modify] https://crrev.com/e65dd51e10accc80aa2be79129912f47357cb958/chrome/browser/ui/android/infobars/translate_compact_infobar.cc
[modify] https://crrev.com/e65dd51e10accc80aa2be79129912f47357cb958/chrome/browser/ui/android/infobars/translate_compact_infobar.h
[modify] https://crrev.com/e65dd51e10accc80aa2be79129912f47357cb958/components/translate/core/browser/translate_infobar_delegate.cc
[modify] https://crrev.com/e65dd51e10accc80aa2be79129912f47357cb958/components/translate/core/browser/translate_infobar_delegate.h

Labels: Translate-te
Project Member

Comment 26 by bugdroid1@chromium.org, May 24 2017

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

commit ae952008457a2f703d91e24b301efb59718fce87
Author: googleo <googleo@chromium.org>
Date: Wed May 24 05:55:14 2017

Code cleanup for Translate Compact Infobar.
1. Move shouldAutoNeverTranslate checks to native code in order to simplify front-end logic.
2. Remove declined logging on Java side, which is duplicate in native.
3. Remove unnecessary "Cancel" action .

BUG= 703887 

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

[modify] https://crrev.com/ae952008457a2f703d91e24b301efb59718fce87/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
[modify] https://crrev.com/ae952008457a2f703d91e24b301efb59718fce87/chrome/browser/ui/android/infobars/translate_compact_infobar.cc
[modify] https://crrev.com/ae952008457a2f703d91e24b301efb59718fce87/chrome/browser/ui/android/infobars/translate_compact_infobar.h

Labels: -M-59 M-60
Blocking: 727436
Project Member

Comment 29 by bugdroid1@chromium.org, Aug 29 2017

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

commit b5f87f22e749eec02ce6ded125f5a80bd581a951
Author: Marti Wong <martiw@chromium.org>
Date: Tue Aug 29 09:07:18 2017

Change auto-behavior trigger condition to fix a finch issue (Translate)

Change the auto-never and auto-always trigger condition from == to >= to
fix the problem that when a user switch from the old ui to the new ui.
He/she could never trigger the auto-behavior if the counter already
exceeds the threshold.

TBR=mdjones@chromium.org

Bug:  703887 
Change-Id: Ica591b83395adc9eeccc6e60f65e2748bd144f68
Reviewed-on: https://chromium-review.googlesource.com/640234
Reviewed-by: Ramya Sharma <ramyasharma@chromium.org>
Commit-Queue: Marti Wong <martiw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498057}
[modify] https://crrev.com/b5f87f22e749eec02ce6ded125f5a80bd581a951/chrome/browser/ui/android/infobars/translate_compact_infobar.cc

Project Member

Comment 30 by bugdroid1@chromium.org, Sep 12 2017

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

commit 9b75f764e489b3295a2ac223a90e67b4bcd0fb3e
Author: Leo Zhang <googleo@chromium.org>
Date: Tue Sep 12 00:41:30 2017

Set feature TranslateCompactUI default as enabled.

Approval by https://bugs.chromium.org/p/chromium/issues/detail?id=720184#c19

Bug:  703887 
Change-Id: I1fc6bbef1b966e26e666fdb5d51a1ee38751b6f9
Reviewed-on: https://chromium-review.googlesource.com/658577
Reviewed-by: Rachel Blum <groby@chromium.org>
Commit-Queue: Leo Zhang <googleo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501122}
[modify] https://crrev.com/9b75f764e489b3295a2ac223a90e67b4bcd0fb3e/components/translate/core/browser/translate_infobar_delegate.cc

Status: Fixed (was: Assigned)

Sign in to add a comment