New issue
Advanced search Search tips

Issue 635172 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 630357
issue 605025
issue 635166



Sign in to add a comment

Implement or remove all bubble anchoring types for MD/Harmony

Project Member Reported by est...@chromium.org, Aug 5 2016

Issue description

This is a little tangential from core Harmony work, but there are new specifications for the positioning of dialogs.

We should make sure that individual dialog instances have a small number of options to choose from and all positioning logic is concentrated in a single shared location. (Don't allow infinite flexibility the way BubbleDialogDelegate::set_anchor_view_insets does)
 
Blocking: 605025

Comment 2 by est...@chromium.org, Sep 19 2016

Owner: est...@chromium.org
Status: Started (was: Available)

Comment 5 by dbeam@chromium.org, Oct 11 2016

Cc: dbeam@chromium.org

Comment 7 by est...@chromium.org, Oct 28 2016

Labels: -M-55
Owner: shrike@chromium.org
Status: Assigned (was: Started)
most of the work is done here, but some anchor alignments are still not supported. Reassigning for triage.
Owner: est...@chromium.org
Evan, can you clarify what anchor alignments are unsupported?  Basically, what remains to be done here, especially that wouldn't be covered under specific bugs for individual dialogs?

You can assign to me for triage when the scope of this is clear.

Comment 9 by est...@chromium.org, Jan 25 2017

this is where you can see which alignments are already done: https://cs.chromium.org/chromium/src/ui/views/bubble/bubble_border.cc?rcl=0&l=218
Owner: pkasting@chromium.org
Summary: Implement or remove all bubble anchoring types for MD/Harmony (was: Harmony - positioning of dialogs)
OK, so the task here is primarily to take the enum values not in the if statement in comment 9, audit their uses, determine what we want them to do in Harmony, and then either convert to existing implemented types, or implement the additional enum values as appropriate.

I'm a good owner for that task.
Labels: Proj-HarmonyDialogs Proj-MaterialDesign-NativeUI
Labels: -Pri-2 Pri-3
Owner: tapted@chromium.org
I'm kicking this over to tapted as he has proved his worth at audit-and-evaluate :).  (See comment 11 for what needs to happen here.)

Leaving as P2, because this is more of a "we should evaluate this before we ship to make sure we haven't missed anything" task than a "blocks other work, will make conversion significantly easier" task.
hehe - yeah there's lots of scope to simplify the anchoring code. But it's tricky while we still support all the old UI.

Also I suspect some are still wanted for Ash (or at least will hang around until Ash is MD-ified). There's obscure stuff like Shift+Click on the Chrome icon in the shelf to get a list of your tabs (by page title) in a list .. and of course your shelf can be left/right/bottom of screen, so suddenly we have arrows potentially in a bunch places/orientations.

And I nearly removed BubbleBorder::set_arrow_offset() in https://codereview.chromium.org/2693833002/, but it's used for a specific use case still (see  Issue 691445  -- i.e. aligning the chrome icons per  http://crbug.com/513479#c2  )
For some of those cases, we'll need to understand how they're supposed to work in Harmony -- what the anchor points will be etc.  This will tell us what would theoretically be going away in Harmony.  Then maybe in some of those cases we can elect to make a visible behavior change to pre-Harmony UI now and eliminate the functionality.

For the set_arrow_offset() usage you mention, it seems like Harmony arrows should always be inset 16 DIP from the edge like that, no?  That is, it seems like this should be set in a more global way than by a per-caller use of that function.
(note I may have misinterpreted the question, but I probably confused things by mentioning set_arrow_offset())

I think for harmony the fix is mostly "no arrows". So set_arrow_offset() shouldn't come into it. The site info bubble for chrome:// sites is using a custom arrow offset so that all of: "(a) favicon-chrome-logo, (b) bubble-arrow-center, and (c) chrome-logo-in-bubble" are vertically aligned. Harmony removes (b) and (c) so there's no longer anything to align (i.e. all the global defaults for Harmony should be fine, as you say).

The simplification in https://codereview.chromium.org/2693833002/ might be a good example of a cleanup we can do while "regressing" non-Harmony slightly. i.e. if we remove (c) chrome-logo-in-bubble from both dialogs (per the spec in  Issue 652028 ), we can use the default (non-harmony) arrow alignment, and not use set_arrow_offset().  (sadly set_arrow_offset() is also used in Ash for a few things, so we can't go much further than that.)
Project Member

Comment 17 by bugdroid1@chromium.org, Jul 6 2017

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

commit c06fedb0d6a4463cc87ffd6e67375124f9c8426a
Author: tapted <tapted@chromium.org>
Date: Thu Jul 06 00:34:12 2017

Mac: Fix up location bar decoration bubble anchoring.

Content settings bubbles currently anchor wrong both with and without
--secondary-ui-md.

Without --secondary-ui-md the y-offset just needs to match the bookmark
star. Expose StarDecoration::GetStarBubblePointInFrame() for this.

With --secondary-ui-md the bubble should anchor to the corner of the
location bar frame. This was also slightly off for the bookmark star,
which currently anchors to the location icon decoration hover
background. Fix by consolidating codepaths for obtaining the anchor from
LocationBarView.

Screenshots:  http://crbug.com/77157#c18 

BUG= 77157 , 635172

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

[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h
[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/star_decoration.h
[modify] https://crrev.com/c06fedb0d6a4463cc87ffd6e67375124f9c8426a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm

Sign in to add a comment