|
|
Chromium Code Reviews|
Created:
4 years, 3 months ago by Evan Stade Modified:
4 years, 3 months ago Reviewers:
sky CC:
chromium-reviews, Peter Beverloo, mlamouri+watch-notifications_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake notifier settings combobox a real combobox.
It looks and acts like a combobox but was actually a menu button. I
needed to change this to remove another reference to STYLE_BUTTON, and
generally to improve consistency of appearance and behavior.
I also got sucked into rearranging padding/margins.
BUG=642920
Committed: https://crrev.com/2d4a2889b976a49a743d7ba32797883190af303b
Cr-Commit-Position: refs/heads/master@{#416749}
Patch Set 1 #Patch Set 2 : remove dbg code #
Total comments: 6
Patch Set 3 : move dtor #Patch Set 4 : rebase #
Messages
Total messages: 22 (11 generated)
estade@chromium.org changed reviewers: + sky@chromium.org
https://codereview.chromium.org/2300893002/diff/20001/ui/base/models/combobox... File ui/base/models/combobox_model.h (left): https://codereview.chromium.org/2300893002/diff/20001/ui/base/models/combobox... ui/base/models/combobox_model.h:40: virtual ~ComboboxModel() {} Move to top now. In general I would prefer to keep this protected, but I get why you want it. https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... File ui/message_center/views/notifier_settings_view.cc (left): https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, group.login_info.empty() ? group.name : group.login_info); Isn't the check item different than what you get with a combobox?
https://codereview.chromium.org/2300893002/diff/20001/ui/base/models/combobox... File ui/base/models/combobox_model.h (left): https://codereview.chromium.org/2300893002/diff/20001/ui/base/models/combobox... ui/base/models/combobox_model.h:40: virtual ~ComboboxModel() {} On 2016/09/01 04:13:03, sky wrote: > Move to top now. In general I would prefer to keep this protected, but I get why > you want it. Done. https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... File ui/message_center/views/notifier_settings_view.cc (left): https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, group.login_info.empty() ? group.name : group.login_info); On 2016/09/01 04:13:03, sky wrote: > Isn't the check item different than what you get with a combobox? Normally multiple things can be checked, but in this model only one thing is checked at a time. Thus the only difference is the lack of a checkmark. This is another weird inconsistency that we're getting rid of (since normal combobox selection is indicated by what's in the main control and all menu items look the same).
The CQ bit was checked by estade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by estade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... File ui/message_center/views/notifier_settings_view.cc (left): https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, group.login_info.empty() ? group.name : group.login_info); On 2016/09/01 20:08:41, Evan Stade wrote: > On 2016/09/01 04:13:03, sky wrote: > > Isn't the check item different than what you get with a combobox? > > Normally multiple things can be checked, but in this model only one thing is > checked at a time. Thus the only difference is the lack of a checkmark. This is > another weird inconsistency that we're getting rid of (since normal combobox > selection is indicated by what's in the main control and all menu items look the > same). Should you at least change the selection to reflect the item that was previously checked?
https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... File ui/message_center/views/notifier_settings_view.cc (left): https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, group.login_info.empty() ? group.name : group.login_info); On 2016/09/01 21:52:13, sky wrote: > On 2016/09/01 20:08:41, Evan Stade wrote: > > On 2016/09/01 04:13:03, sky wrote: > > > Isn't the check item different than what you get with a combobox? > > > > Normally multiple things can be checked, but in this model only one thing is > > checked at a time. Thus the only difference is the lack of a checkmark. This > is > > another weird inconsistency that we're getting rid of (since normal combobox > > selection is indicated by what's in the main control and all menu items look > the > > same). > > Should you at least change the selection to reflect the item that was previously > checked? not sure what you mean, doesn't that happen automatically in Combobox::ComboboxMenuModel::ActivatedAt/Combobox::OnPerformAction
On 2016/09/06 17:43:50, Evan Stade wrote: > https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... > File ui/message_center/views/notifier_settings_view.cc (left): > > https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... > ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, > group.login_info.empty() ? group.name : group.login_info); > On 2016/09/01 21:52:13, sky wrote: > > On 2016/09/01 20:08:41, Evan Stade wrote: > > > On 2016/09/01 04:13:03, sky wrote: > > > > Isn't the check item different than what you get with a combobox? > > > > > > Normally multiple things can be checked, but in this model only one thing is > > > checked at a time. Thus the only difference is the lack of a checkmark. This > > is > > > another weird inconsistency that we're getting rid of (since normal combobox > > > selection is indicated by what's in the main control and all menu items look > > the > > > same). > > > > Should you at least change the selection to reflect the item that was > previously > > checked? > > not sure what you mean, doesn't that happen automatically in > Combobox::ComboboxMenuModel::ActivatedAt/Combobox::OnPerformAction When something is selected, yes, but don't you want the initial selection (before the user does anything) to reflect the checked item?
On 2016/09/06 20:25:36, sky wrote: > On 2016/09/06 17:43:50, Evan Stade wrote: > > > https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... > > File ui/message_center/views/notifier_settings_view.cc (left): > > > > > https://codereview.chromium.org/2300893002/diff/20001/ui/message_center/views... > > ui/message_center/views/notifier_settings_view.cc:240: AddCheckItem(i, > > group.login_info.empty() ? group.name : group.login_info); > > On 2016/09/01 21:52:13, sky wrote: > > > On 2016/09/01 20:08:41, Evan Stade wrote: > > > > On 2016/09/01 04:13:03, sky wrote: > > > > > Isn't the check item different than what you get with a combobox? > > > > > > > > Normally multiple things can be checked, but in this model only one thing > is > > > > checked at a time. Thus the only difference is the lack of a checkmark. > This > > > is > > > > another weird inconsistency that we're getting rid of (since normal > combobox > > > > selection is indicated by what's in the main control and all menu items > look > > > the > > > > same). > > > > > > Should you at least change the selection to reflect the item that was > > previously > > > checked? > > > > not sure what you mean, doesn't that happen automatically in > > Combobox::ComboboxMenuModel::ActivatedAt/Combobox::OnPerformAction > > When something is selected, yes, but don't you want the initial selection > (before the user does anything) to reflect the checked item? The default implementation of ComboboxModel::GetDefaultIndex() (which just returns 0) works in this case.
Evan says the first item was always checked. So, ok, LGTM
The CQ bit was checked by estade@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Make notifier settings combobox a real combobox. It looks and acts like a combobox but was actually a menu button. I needed to change this to remove another reference to STYLE_BUTTON, and generally to improve consistency of appearance and behavior. I also got sucked into rearranging padding/margins. BUG=642920 ========== to ========== Make notifier settings combobox a real combobox. It looks and acts like a combobox but was actually a menu button. I needed to change this to remove another reference to STYLE_BUTTON, and generally to improve consistency of appearance and behavior. I also got sucked into rearranging padding/margins. BUG=642920 Committed: https://crrev.com/2d4a2889b976a49a743d7ba32797883190af303b Cr-Commit-Position: refs/heads/master@{#416749} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/2d4a2889b976a49a743d7ba32797883190af303b Cr-Commit-Position: refs/heads/master@{#416749} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
