iachat/app/javascript/dashboard/components-next/sidebar
Shivam Mishra 6e6c5a2f02
refactor: use css only last item detection (#10363)
The last item in the sidebar top level group has an indicator specified,
the problem in our case is that the structure can be nested and have sub
groups. So selecting the last item correctly can be tricky.

Previous implementation relied on the using DOM queries to find the last
item from a flat list of children, it would trigger on a `watch`. This
was error-prone as well as non idiomatic. The new approach is CSS-only
and reduces the unnecessary compute required.

Codepen for reference: https://codepen.io/scmmishra/pen/yLmKNLW

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-10-31 09:39:18 +05:30
..
ChannelLeaf.vue feat: new colors (#10352) 2024-10-28 14:27:08 +05:30
provider.js feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
Sidebar.vue feat(v4): Update the help center portal design (#10296) 2024-10-23 22:09:36 -07:00
SidebarAccountSwitcher.vue fix: Fix the issues with the new sidebar (#10348) 2024-10-28 20:41:43 -07:00
SidebarGroup.vue refactor: use css only last item detection (#10363) 2024-10-31 09:39:18 +05:30
SidebarGroupEmptyLeaf.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarGroupHeader.vue feat: new colors (#10352) 2024-10-28 14:27:08 +05:30
SidebarGroupLeaf.vue refactor: use css only last item detection (#10363) 2024-10-31 09:39:18 +05:30
SidebarGroupSeparator.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarNotificationBell.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarProfileMenu.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarProfileMenuStatus.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
SidebarSubGroup.vue feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
useSidebarKeyboardShortcuts.js feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00