Omnibox Steady State Elisions: Unintuitive behavior for copying partial paths |
||
Issue description1. Turn on Steady State Elisions 2. Goto https://www.google.com/maps/place/Google/@33.9933834,-118.4803694,15z/data=!3m1!4b1 3. With Steady State Elisions, user sees: google.com/maps/place/Google/@33.9933834,-118.4803694,15z/data=!3m1!4b1 4. Imagine wants to copy paste a partial URL, and drag selects the first visible part: "google.com/maps" 5. After the drag select, the URL is unelided, and the selection looks like: https://www.google.com/maps/@33.9933834,-118.4803694,15z/data=!3m1!4b1 ^^^^^^^^^^^^^^^ That looks kind of unintuitive. 6. Worse, after the user copies that to the clipboard, what's in the clipboard is only "google.com/maps", which is hard to interpret as a URL, drops the https, and the www. Here's something we could do to address this: When the user selects the whole visible elided host (up to the very front), make sure the whole prefix is selected after unelision. The selection after unelision should look like: https://www.google.com/maps/@33.9933834,-118.4803694,15z/data=!3m1!4b1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ That would more closely match user intent.
,
May 16 2018
I support that change, as it basically matches the logic for what we already do with copying stripped HTTP to the clipboard.
,
May 16 2018
Great. To clarify, I think the correct change should only affects mouse drag-select. Double-click and arrow keys should continue to work as they do today. We will be able to verify that with our unit tests.
,
May 17 2018
Sounds good to me, too.
,
May 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e05e65805bc6f2c6f5707f68758ffaba16ab8af commit 6e05e65805bc6f2c6f5707f68758ffaba16ab8af Author: Tommy C. Li <tommycli@chromium.org> Date: Tue May 22 17:05:38 2018 Omnibox UI Experiments: Steady State Elisions - Refine drag-select host Currently, when the user selects a partial path from an elided URL, we leave out the elided portion. For instance, when the user drag selects: google.com/maps ^^^^^^^^^^ After unelision, the selection becomes: https://www.google.com/maps ^^^^^^^^^^ The user's intent here is to copy the whole first portion of the URL, so dropping the scheme and subdomain here is undesirable. This CL makes a guess when the user does a drag select on the whole first portion of the elided URL that the user wishes to copy the first portion of the unelided URL as well. It only applies this logic when the selected text looks like a URL, according to the OmniboxEditModel::IsPasteAndSearch logic, which we are renaming to OmniboxEditModel::ClassifiesAsSearch. TBR=ellyjones@chromium.org Bug: 843675 , 797354 Change-Id: I0ca9aed0fd9886b0442eb5a1e880b13601d82101 Reviewed-on: https://chromium-review.googlesource.com/1068120 Commit-Queue: Tommy Li <tommycli@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Cr-Commit-Position: refs/heads/master@{#560663} [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views.cc [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views.h [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/components/omnibox/browser/omnibox_edit_model.cc [modify] https://crrev.com/6e05e65805bc6f2c6f5707f68758ffaba16ab8af/components/omnibox/browser/omnibox_edit_model.h
,
May 22 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by tommycli@chromium.org
, May 16 2018