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

Issue 799194 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-XR
Proj-XR-VR



Sign in to add a comment

VR omnibox: Use fade-eliding, as per new UX spec, to show current URL

Project Member Reported by cjgrant@chromium.org, Jan 4 2018

Issue description

Currently, we have a working solution for showing the current URL.  However, new UX thinking is that fade-based elision is better for the user.

The omnibox UX spec illustrates the visuals, and msw@ has agreed that fade-based elision is preferable over a "string-trimming with ellipsis" approach.

Once we have this, we should shop around the code we wrote to "simple elide" the URL string, and if nobody wants to take ownership of it, we'll turf it out.
 
This work can be split into two parts:

1. Make the text positioning work.
2. Make the fading work.

I have the first part working, with a prototype CL up for a sniff test to msw@.

The second part, fading, requires extra work.  The shaders built by RenderText to fade the ends of the text don't currently support colored text.  If we want to style URL text, we need to make this work.

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 23 2018

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

commit 9b9aec31b13e994336a072651820281b47bd334d
Author: Christopher Grant <cjgrant@chromium.org>
Date: Tue Jan 23 00:28:24 2018

VR: Move to fade-based elision on URL presentation

As per UX spec, avoid ellipsis-based elision and favor fading the edges
of the URL instead.  In this implementation, we use a gradient shader to
draw a fade over the edges of the text, if necessary, after applying
offset to position the TLD appropriately.

Alternatively, RenderText can be augmented to supply the fading portion.
To do this, we'd need to sort out how to make its fade shader work with
colored text.  The VR-specific case may work around that complexity by
drawing the URL onto a dedicated texture.

BUG= 799194 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Id108184951f9dba2793e9372c15f1ea75b18a1dc
Reviewed-on: https://chromium-review.googlesource.com/865714
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531083}
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/omnibox_formatting.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/omnibox_formatting.h
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/omnibox_formatting_unittest.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/ui_texture.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/url_bar_texture.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/url_bar_texture.h
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/url_bar_texture_unittest.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/elements/webvr_url_toast_texture.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/testapp/vr_test_context.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/chrome/browser/vr/ui_scene_constants.h
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/ui/gfx/render_text.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/ui/gfx/render_text.h
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/ui/gfx/render_text_unittest.cc
[modify] https://crrev.com/9b9aec31b13e994336a072651820281b47bd334d/ui/views/controls/label_unittest.cc

Labels: M-66
Status: Fixed (was: Assigned)
Note for testers:

- This change includes unit tests
- If desired, the fading can be tested via the VR UI testapp.  Pressing 'o' cycles the origin through a set of test URLs, showing fading in various situations.
Cc: dougman@chromium.org vsupruniuk@google.com leilei@chromium.org
+ Doug, Lei, Vitali. Here's another mention of the test app. We might want to take a look at it for manual testing.
Labels: Test-Manual
Labels: Test-Manual
Labels: -Test-Manual Test-Complete

Sign in to add a comment