chore: Update inbox view to perform better, added sidebar on inbox views (#12077)
# Pull Request Template ## Description This PR includes improvements to Inbox view: 1. **Update the route to `:type/:id`** Previously, we used `notification_id` in the route. This has now been changed to use a more generic structure like `conversation/:id`, with `type` set to `"conversation"`. This refactor allows future support for other types like `contact`, making the route structure more flexible. It also fixes a critical issue: when a notification is open and a new notification arrives for the same conversation, the conversation view used to close unexpectedly. This issue is now resolved. 2. **Migrate components from Options API to Composition API** Both `InboxList.vue` and `InboxView.vue` have been updated to use the Composition API with `<script setup>`. 3. **Auto-scroll inbox item into view when navigating** When navigating through `InboxItemHeader`, the corresponding inbox item now automatically scrolls into view and load more notifications ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
@@ -153,7 +153,7 @@ onBeforeMount(contextMenuActions.close);
|
||||
<template>
|
||||
<div
|
||||
role="button"
|
||||
class="flex flex-col w-full gap-2 p-3 transition-all duration-300 ease-in-out cursor-pointer"
|
||||
class="flex flex-col w-full gap-1 p-3 transition-all duration-300 ease-in-out cursor-pointer"
|
||||
@contextmenu="contextMenuActions.open($event)"
|
||||
@click="emit('click')"
|
||||
>
|
||||
@@ -232,7 +232,7 @@ onBeforeMount(contextMenuActions.close);
|
||||
class="flex-shrink-0 text-n-slate-11 size-2.5"
|
||||
/>
|
||||
</div>
|
||||
<span class="text-sm text-n-slate-10">
|
||||
<span class="text-xs text-n-slate-10">
|
||||
{{ lastActivityAt }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user