New issue
Advanced search Search tips

Issue 658369 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

MD Settings: Migrate cups_add_printer_dialog_util.html to use settings-action-menu.

Project Member Reported by dpa...@chromium.org, Oct 21 2016

Issue description

It currently uses an iron-dropdown to display a list of printers to be selected, see [1].

I briefly attempted to migrate this code myself, but I couldn't figure out how it works (or if it works). At first glance it seems fairly complicated (nested dialogs), but also the event that is triggering this flow called 'open-manufacturer-model-dialog' (see [2]) is not fired anywhere, so maybe this is dead code for now?

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html?l=65
[2] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js?l=323
 

Comment 1 by dpa...@chromium.org, Oct 21 2016

Cc: x...@chromium.org

Comment 2 by x...@chromium.org, Oct 21 2016

Cc: -x...@chromium.org dpa...@chromium.org
Owner: x...@chromium.org
I'll work on this later and will try to make it in M56. 
About [2], thanks for the digging! It is dead code now. I must have forgotten to remove it during the code refactoring.

Comment 3 by dbeam@chromium.org, Oct 26 2016

Status: Assigned (was: Untriaged)

Comment 4 by x...@chromium.org, Nov 4 2016

Cc: weifangsun@chromium.org
I took a look at this issue today and there were some issues while I tried to migrate 'iron-dropdown' to 'cr-action-menu'. I think we might need a PM or UX decision here.

The below description is summarized based on the offline discussion with dpapad@.

- In my case, 'iron-dropdown' was used to implement a search box with recommendations dropdown list. When the user clicks on the search field or enters search term in the search field, a recommendation dropdown list will show up and the user can select one of them from the list (see https://drive.google.com/corp/drive/u/0/folders/0B4R9nvLdzmC9d3o2WDNyNGRjejQ for the demo (titled in "drop-down-search-box"))

- after the migration, I noticed that closing the 'cr-action-menu' will also close its parent dialog, which is incorrect. It might because in my case,'cr-action-menu' is opened by a model dialog, while 'cr-action-menu' itself is also implemented as a model dialog. There might be some bug in cr-action-menu or in the cups printer setting code. Don't know the reason yet.

- As an alternative, dpapad@ suggested that we probably can migrate to use the native select dropdown list (see an example of native select: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select). Native select also has built in keyboard search support as you start typing it changes the selection. But we'll lost the functionality of the search and filter the recommendations list based on the user's input.

So my question is:
1) Is the migration a must-do?
2) If it is, is this fine to use the native select? (I think it's a PM's call)
Cc: adlr@chromium.org
Components: Internals>Printing>CUPS
Labels: Week-1647

Comment 7 by dbeam@chromium.org, Jan 31 2017

Labels: Hotlist-MD-Settings-CloudPrint
Labels: M-59
dpapad@ - How much of a win is this at this point? Eliminating iron-dropdown seems like a good thing, but it sounds like someone with more Polymer experience is going to need to step in and help.

I think we should either target this for 59 or resolve WontFix.

@stevenjb: Previous discussion (summarized at comment#4) concludes that using cr-action-menu is not appropriate, since a search box is also displayed. So the UX question is whether could use a native select (which has integrated prefix search), or just do nothing. So basically the title of this bug is not accurate anymore.

Regarding whether it is worth removing iron-dropdown, in theory yes, since it has quite a few deps (see https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown.html?q=iron-dropdown.html&sq=package:chromium&dr&l=10-16). I have not done any analysis on exactly how much it would save though.
Labels: -M-59 M-64
Cc: x...@chromium.org
Labels: -M-64
Owner: weifangsun@chromium.org
Cc: baileyberro@chromium.org
Status: WontFix (was: Assigned)
I am closing this since there has been no activity.  Also baileyberro@ is planning to re-use that pattern elsewhere, so I guess iron-dropdown will stay for now.

Sign in to add a comment