From 9b6830a610496be4e03b95fa52ee4adf1110c390 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 5 Dec 2024 03:18:12 +0530 Subject: [PATCH] fix: Update UI issues with sidebar (#10535) This PR fixes a few UI issues with the sidebar 1. `z-index` issues with sidebar dropdowns 2. Move the event listener to the root of the dropdown container, it allows more consistent behaviour of the trigger, earlier the click on the trigger when the dropdown was open would cause the container to re-render 3. Use `perserve-open` for the status switcher menu item in the profile menu. 4. Use `sessionStorage` instead of `localStorage` to preserve sidebar dropdown info. When opening the dashboard without directly going to a specific route, any previous known item would get expanded even if it's link was not active, this caused issues across tabs too, this fixes it. 5. Use `snakeCaseKeys` instead of `decamelize` we had two packages doing the same thing 6. Update `vueuse` the new version is vue3 only --- .../dropdown-menu/base/DropdownContainer.vue | 4 +- .../components-next/sidebar/Sidebar.vue | 2 +- .../sidebar/SidebarProfileMenuStatus.vue | 4 +- .../store/modules/contacts/actions.js | 6 +- package.json | 5 +- pnpm-lock.yaml | 211 +++++++++++++----- 6 files changed, 166 insertions(+), 66 deletions(-) diff --git a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue index a3b53f955..373bb526f 100644 --- a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue +++ b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue @@ -21,9 +21,9 @@ provideDropdownContext({