From 8710f5f53233237e6aefa7f3e581e2e59e8096a8 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 20 Oct 2021 13:04:05 +0100 Subject: [PATCH] Added animation of sidebar between main and contextual menus refs https://github.com/TryGhost/Team/issues/1149 - added `ember-css-transitions` library that provides a modifier that adds/removes classes used for animating elements in and out, automatically creating a clone for destroyed elements - added a wrapper class around the `main` and `design` nav menu contents so they could be individually animated - used the new `{{css-transition}}` modifier to animate the sidebar menus in/out - ensured main menu doesn't animate on first render of the parent `` component so there's no animation when Admin is loaded --- ghost/admin/app/components/gh-nav-menu.hbs | 4 +- ghost/admin/app/components/gh-nav-menu.js | 3 + .../app/components/gh-nav-menu/design.hbs | 78 +++--- .../admin/app/components/gh-nav-menu/main.hbs | 260 +++++++++--------- ghost/admin/app/styles/layouts/main.css | 44 +++ ghost/admin/package.json | 1 + ghost/admin/yarn.lock | 9 + 7 files changed, 230 insertions(+), 169 deletions(-) diff --git a/ghost/admin/app/components/gh-nav-menu.hbs b/ghost/admin/app/components/gh-nav-menu.hbs index e3ed74b09d..86daf887e2 100644 --- a/ghost/admin/app/components/gh-nav-menu.hbs +++ b/ghost/admin/app/components/gh-nav-menu.hbs @@ -1,7 +1,7 @@ -