From bda468344448a6578abe0ab8f2be095741a88ea6 Mon Sep 17 00:00:00 2001 From: Wyatt Allen Date: Tue, 24 Jan 2017 10:49:28 -0800 Subject: [PATCH] Upgrade gr-dropdown with additional capabilities The shared dropdown component is made more-configurable, so it can be reused in more contexts. * The down-arrow is an flag that can be enabled on the dropdown, instead of added (and styled) at the use site. * Items no longer need to be links to new URLs. They can be buttons with declared handlers. * The dropdown trigger can be a link or a button, as configured by the link flag. Change-Id: Ia9db3b66bf30bc56bf2ab4ce1f2292f51ab4754d --- .../gr-account-dropdown.html | 5 ++- .../core/gr-main-header/gr-main-header.html | 19 ++------ .../elements/shared/gr-button/gr-button.js | 4 ++ .../shared/gr-dropdown/gr-dropdown.html | 43 ++++++++++++++++--- .../shared/gr-dropdown/gr-dropdown.js | 25 +++++++++++ .../shared/gr-dropdown/gr-dropdown_test.html | 10 +++++ 6 files changed, 82 insertions(+), 24 deletions(-) diff --git a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.html b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.html index cead416a01..07c922a6be 100644 --- a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.html +++ b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.html @@ -34,7 +34,10 @@ limitations under the License. vertical-align: middle; } -