From 2af337be10282f6df2a5c7a0281388ab2fe41ec8 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 23 Dec 2022 03:37:11 +0530 Subject: [PATCH] feat: Add the ability to toggle the secondary sidebar in all display breakpoints (#6118) Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com> Co-authored-by: Pranav Raj S --- .../assets/scss/widgets/_sidemenu.scss | 6 +-- .../dashboard/components/SidemenuIcon.vue | 22 ++++---- .../layout/sidebarComponents/Secondary.vue | 9 +--- .../__snapshots__/SidemenuIcon.spec.js.snap | 13 ++--- .../dashboard/routes/dashboard/Dashboard.vue | 46 ++++------------ .../conversation/search/PopOverSearch.vue | 42 +++++++++------ .../components/HelpCenterLayout.vue | 54 ++++++------------- 7 files changed, 72 insertions(+), 120 deletions(-) diff --git a/app/javascript/dashboard/assets/scss/widgets/_sidemenu.scss b/app/javascript/dashboard/assets/scss/widgets/_sidemenu.scss index a10ef530f..75cd8a513 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_sidemenu.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_sidemenu.scss @@ -59,12 +59,8 @@ .hamburger--menu { cursor: pointer; - display: none; + display: block; margin-right: $space-normal; - - @media screen and (max-width: 1200px) { - display: block; - } } .header--icon { diff --git a/app/javascript/dashboard/components/SidemenuIcon.vue b/app/javascript/dashboard/components/SidemenuIcon.vue index fc565b718..dfdfb1596 100644 --- a/app/javascript/dashboard/components/SidemenuIcon.vue +++ b/app/javascript/dashboard/components/SidemenuIcon.vue @@ -1,7 +1,12 @@ diff --git a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue index 1d8ced445..4d75e363e 100644 --- a/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue +++ b/app/javascript/dashboard/components/layout/sidebarComponents/Secondary.vue @@ -261,14 +261,7 @@ export default { width: 20rem; flex-shrink: 0; overflow-y: hidden; - - @include breakpoint(xlarge down) { - position: absolute; - } - - @include breakpoint(xlarge up) { - position: unset; - } + position: unset; &:hover { overflow-y: hidden; diff --git a/app/javascript/dashboard/components/specs/__snapshots__/SidemenuIcon.spec.js.snap b/app/javascript/dashboard/components/specs/__snapshots__/SidemenuIcon.spec.js.snap index 58e820fc2..32e293da6 100644 --- a/app/javascript/dashboard/components/specs/__snapshots__/SidemenuIcon.spec.js.snap +++ b/app/javascript/dashboard/components/specs/__snapshots__/SidemenuIcon.spec.js.snap @@ -1,10 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SidemenuIcon matches snapshot 1`] = ` - + `; diff --git a/app/javascript/dashboard/routes/dashboard/Dashboard.vue b/app/javascript/dashboard/routes/dashboard/Dashboard.vue index af5818cdb..9b573863f 100644 --- a/app/javascript/dashboard/routes/dashboard/Dashboard.vue +++ b/app/javascript/dashboard/routes/dashboard/Dashboard.vue @@ -2,14 +2,14 @@
-
+
= 1200) { - this.isOnDesktop = true; - } else { - this.isOnDesktop = false; - } - }, toggleSidebar() { - this.isSidebarOpen = !this.isSidebarOpen; + this.updateUISettings({ + show_secondary_sidebar: !this.isSidebarOpen, + }); }, openCreateAccountModal() { this.showAccountModal = false; @@ -142,8 +121,3 @@ export default { }, }; - diff --git a/app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue b/app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue index 7f7fb67df..40a0ae159 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/search/PopOverSearch.vue @@ -1,20 +1,22 @@