From 400150e67bf9a08ff3871065a93bf9802175ce61 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 5 Apr 2017 14:08:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove=20unused=20popover=20comp?= =?UTF-8?q?onents=20(#620)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - `gh-popover` and `gh-popover-button` are no longer used in the codebase - removing them seems prudent as we are moving towards a different approach for dropdowns/popovers/tethers etc --- .../admin/app/components/gh-popover-button.js | 22 ------- ghost/admin/app/components/gh-popover.js | 7 --- ghost/admin/app/services/dropdown.js | 2 +- ghost/admin/app/styles/app-dark.css | 1 - ghost/admin/app/styles/app.css | 1 - .../admin/app/styles/components/popovers.css | 59 ------------------- 6 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 ghost/admin/app/components/gh-popover-button.js delete mode 100644 ghost/admin/app/components/gh-popover.js delete mode 100644 ghost/admin/app/styles/components/popovers.css diff --git a/ghost/admin/app/components/gh-popover-button.js b/ghost/admin/app/components/gh-popover-button.js deleted file mode 100644 index 52c57a3684..0000000000 --- a/ghost/admin/app/components/gh-popover-button.js +++ /dev/null @@ -1,22 +0,0 @@ -import injectService from 'ember-service/inject'; -import DropdownButton from 'ghost-admin/components/gh-dropdown-button'; - -function K() { - return this; -} - -export default DropdownButton.extend({ - dropdown: injectService(), - - click: K, - - mouseEnter() { - this._super(...arguments); - this.get('dropdown').toggleDropdown(this.get('popoverName'), this); - }, - - mouseLeave() { - this._super(...arguments); - this.get('dropdown').toggleDropdown(this.get('popoverName'), this); - } -}); diff --git a/ghost/admin/app/components/gh-popover.js b/ghost/admin/app/components/gh-popover.js deleted file mode 100644 index fe0c726b04..0000000000 --- a/ghost/admin/app/components/gh-popover.js +++ /dev/null @@ -1,7 +0,0 @@ -import injectService from 'ember-service/inject'; -import GhostDropdown from 'ghost-admin/components/gh-dropdown'; - -export default GhostDropdown.extend({ - classNames: 'ghost-popover', - dropdown: injectService() -}); diff --git a/ghost/admin/app/services/dropdown.js b/ghost/admin/app/services/dropdown.js index d2d0427d81..23e169879f 100644 --- a/ghost/admin/app/services/dropdown.js +++ b/ghost/admin/app/services/dropdown.js @@ -1,6 +1,6 @@ import Service from 'ember-service'; import Evented from 'ember-evented'; -// This is used by the dropdown initializer (and subsequently popovers) to manage closing & toggling +// This is used by the dropdown initializer to manage closing & toggling import BodyEventListener from 'ghost-admin/mixins/body-event-listener'; export default Service.extend(Evented, BodyEventListener, { diff --git a/ghost/admin/app/styles/app-dark.css b/ghost/admin/app/styles/app-dark.css index e58714bca0..00d12e319d 100644 --- a/ghost/admin/app/styles/app-dark.css +++ b/ghost/admin/app/styles/app-dark.css @@ -26,7 +26,6 @@ @import "components/dropdowns.css"; @import "components/pagination.css"; @import "components/badges.css"; -@import "components/popovers.css"; @import "components/settings-menu.css"; @import "components/selectize.css"; @import "components/power-select.css"; diff --git a/ghost/admin/app/styles/app.css b/ghost/admin/app/styles/app.css index 059a985393..0cf28da528 100644 --- a/ghost/admin/app/styles/app.css +++ b/ghost/admin/app/styles/app.css @@ -26,7 +26,6 @@ @import "components/dropdowns.css"; @import "components/pagination.css"; @import "components/badges.css"; -@import "components/popovers.css"; @import "components/settings-menu.css"; @import "components/selectize.css"; @import "components/power-select.css"; diff --git a/ghost/admin/app/styles/components/popovers.css b/ghost/admin/app/styles/components/popovers.css deleted file mode 100644 index ba456af432..0000000000 --- a/ghost/admin/app/styles/components/popovers.css +++ /dev/null @@ -1,59 +0,0 @@ -/* Popovers -/* ---------------------------------------------------------- */ - -.popover-item { - position: relative; - display: inline-block; - padding: 11px 26px 13px 16px; - min-width: 300px; - max-width: 400px; - background: var(--darkgrey); - border-radius: 6px; - color: var(--midgrey); - font-size: 1.2rem; -} - -.popover-title { - color: #fff; - font-size: 1.4rem; - font-weight: 300; -} - -.popover-desc { - margin-top: -4px; -} - -.popover-body { - margin-top: 11px; - line-height: 1.7; -} - -.popover-body b { - color: #fff; -} - -.popover-body > *:last-child { - margin: 0; -} - - -/* Open / Close -/* ---------------------------------------------------------- */ - -.popover { - position: relative; - display: inline-block; -} - -.popover .popover-item { - position: absolute; - z-index: 20; -} - -.popover .popover-item.open { - display: block; -} - -.popover .popover-item.closed { - display: none; -}