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

Issue 708190 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Oct 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 686345

Blocking:
issue 686347
issue 687776



Sign in to add a comment

Code cleanup in the HoverHighlightView class

Project Member Reported by tdander...@chromium.org, Apr 4 2017

Issue description

Once the non-MD code is removed from HoverHighlightView ( issue 686345 ), perform subsequent refactorings and further cleanup of dead code.
 
Blocking: 686347
Cc: tdander...@chromium.org
List of further cleanup items:

* Verify that AddLabelDeprecated() (re-named in https://codereview.chromium.org/2795143005/) as used in tray_bluetooth.cc can in fact be replaced with a call to AddLabel() and, if so, remove AddLabelDeprecated() and rip out any resulting dead code.

* Remove the |highlight| member from the NetworkInfo struct, possibly performing a small re-write of the network ordering logic in NetworkListView::OrderNetworks() as a result.

* AddIconAndLabelForDefaultView() is used as a one-off right now. Reevaluate if that should remain as part of the HoverHighlightView API. Similarly, determine if SetExpandable() in fact needs to be / should be part of the HHV API.

* Determine if |custom_height_| is in fact still required.

* The GetTooltipText() override may no longer be necessary, take a look.

* It seems a bit strange that we're implementing SetAccessibilityState(); perhaps this is already / this could be implemented higher up the view class hierarchy. Investigate this.

* Reexamine public API and the plumbing through to private helpers; simplify as necessary. Update any remaining class- or function-level documentation.

* Finally, either remove the class entirely (see issue 686347) or at the very least re-name it (there is no highlighting performed on hover anymore).
Labels: -M-59 M-60

Comment 4 by moh...@chromium.org, Apr 13 2017

Blocking: 687776
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 20 2017

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

commit bba159d855e4880a71fb5e3cdfb3b5e9c81608a1
Author: tdanderson <tdanderson@chromium.org>
Date: Thu Apr 20 15:16:50 2017

[Ash] Remove |highlight| field from NetworkInfo struct

Remove the now-unused |highlight| field from
the NetworkInfo struct.

BUG= 708190 
TEST=manual

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

[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_info.cc
[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_info.h
[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_list.cc

Project Member

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

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

commit bba159d855e4880a71fb5e3cdfb3b5e9c81608a1
Author: tdanderson <tdanderson@chromium.org>
Date: Thu Apr 20 15:16:50 2017

[Ash] Remove |highlight| field from NetworkInfo struct

Remove the now-unused |highlight| field from
the NetworkInfo struct.

BUG= 708190 
TEST=manual

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

[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_info.cc
[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_info.h
[modify] https://crrev.com/bba159d855e4880a71fb5e3cdfb3b5e9c81608a1/ash/system/network/network_list.cc

Project Member

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

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

commit 0dfa9b6dfb54257572995b17dd2f81ea07454d1d
Author: tdanderson <tdanderson@chromium.org>
Date: Thu Apr 20 15:17:54 2017

[Ash] Remove HoverHighlightView::AddLabelDeprecated()

Removes the function AddLabelDeprecated() in HoverHighlightView
and replaces its only call site with a new function
TrayPopupUtils::CreateInfoLabelRowView(), which creates a
MD-compliant non-clickable row used to display the
"Scanning for devices..." message in the Bluetooth detailed view.

This CL also removes the unnecessary member variables
|tooltip_| and |custom_height_| from HoverHighlightView, along
with corresponding dead code.

BUG= 708190 ,687778
TEST=manual

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

[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/bluetooth/tray_bluetooth.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/network/network_state_list_detailed_view.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/palette/common_palette_tool.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/hover_highlight_view.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/hover_highlight_view.h
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/tray_constants.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/tray_constants.h
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/tray_popup_item_style.h
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/tray_popup_utils.cc
[modify] https://crrev.com/0dfa9b6dfb54257572995b17dd2f81ea07454d1d/ash/system/tray/tray_popup_utils.h

Labels: -M-60 M-61
Status: Assigned (was: Started)
Cc: tbuck...@chromium.org zork@chromium.org fukino@chromium.org
Owner: jamescook@chromium.org
Status: Untriaged (was: Assigned)
James, do you mind assisting with the re-triage of this ash/system code health bug?

tbuckley@, zork@, fukino@: FYI in case you know of a good owner.
Labels: -M-61
Owner: satorux@chromium.org
Satoru, is this something your team could look at as part of the new touch system menu work? I'm not sure how much is still relevant with the new design.

Cc: yoshiki@chromium.org
Owner: tetsui@chromium.org
Status: Available (was: Untriaged)
tetsui@ and yoshiki@, this might be a good code health item to do when you are blocked for UI specs, etc.
UnifiedSystemTray will replace existing SystemTray view code. The code will be removed in the end so we might not have to do this.
Status: Assigned (was: Available)
Status: Archived (was: Assigned)

Sign in to add a comment