From 98be1734fa08006a9e0cf20df76f9633db2f88f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 3 Nov 2016 22:14:29 +0100 Subject: [PATCH] ux(dashboard): refining new row slide out menu, #6442 --- public/app/core/components/grafana_app.ts | 10 +++ public/app/core/services/keybindingSrv.ts | 2 +- public/app/features/dashboard/row/row.html | 8 +- public/app/features/dashboard/row/row_ctrl.ts | 25 +++--- public/app/partials/help_modal.html | 71 --------------- public/sass/_variables.dark.scss | 2 +- public/sass/components/_row.scss | 90 +++++++++---------- public/sass/pages/_dashboard.scss | 22 ++--- 8 files changed, 78 insertions(+), 152 deletions(-) delete mode 100644 public/app/partials/help_modal.html diff --git a/public/app/core/components/grafana_app.ts b/public/app/core/components/grafana_app.ts index 6630fbe9517..ee2e7ef4422 100644 --- a/public/app/core/components/grafana_app.ts +++ b/public/app/core/components/grafana_app.ts @@ -116,6 +116,16 @@ export function grafanaAppDirective(playlistSrv, contextSrv) { return; } + // for stuff that animates, slides out etc, clicking it needs to + // hide it right away + var clickAutoHide = target.closest('[data-click-hide]'); + if (clickAutoHide.length) { + clickAutoHide.toggleClass('transition-hide'); + setTimeout(function() { + clickAutoHide.toggleClass('transition-hide'); + }, 1000); + } + if (target.parents('.dash-playlist-actions').length === 0) { playlistSrv.stop(); } diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 83b03c9728b..e9f234ff68a 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -59,7 +59,7 @@ export class KeybindingSrv { } showHelpModal() { - appEvents.emit('show-modal', {templateHtml: ''}); + appEvents.emit('show-modal', {templateHtml: ''}); } bind(keyArg, fn) { diff --git a/public/app/features/dashboard/row/row.html b/public/app/features/dashboard/row/row.html index 7e282bfd55e..fe4a79ccc57 100644 --- a/public/app/features/dashboard/row/row.html +++ b/public/app/features/dashboard/row/row.html @@ -1,10 +1,9 @@ -
-