fix: Update design of the conversation sidebar, chatlist (#10572)

- Increase the sidebar and chatlist width on screens bigger than 2xl
- Fix background of the copilot sidebar
- Increase the breakpoint for hiding chatlist from 1024 to 1200
This commit is contained in:
Pranav 2024-12-11 08:06:21 -08:00 committed by GitHub
parent ccb117d36a
commit a3290bfd42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 22 deletions

View File

@ -782,10 +782,10 @@ watch(conversationFilters, (newVal, oldVal) => {
<template> <template>
<div <div
class="flex flex-col flex-shrink-0 border-r conversations-list-wrap rtl:border-r-0 rtl:border-l border-slate-50 dark:border-slate-800/50" class="flex flex-col flex-shrink-0 conversations-list-wrap"
:class="[ :class="[
{ hidden: !showConversationList }, { hidden: !showConversationList },
isOnExpandedLayout ? 'basis-full' : 'w-[360px]', isOnExpandedLayout ? 'basis-full' : 'w-[360px] 2xl:w-[420px]',
]" ]"
> >
<slot /> <slot />

View File

@ -98,8 +98,10 @@ export default {
<template> <template>
<div <div
class="conversation-details-wrap bg-slate-25 dark:bg-slate-800" class="conversation-details-wrap bg-n-background"
:class="{ 'with-border-right': !isOnExpandedLayout }" :class="{
'border-l rtl:border-l-0 rtl:border-r border-n-weak': !isOnExpandedLayout,
}"
> >
<ConversationHeader <ConversationHeader
v-if="currentChat.id" v-if="currentChat.id"
@ -159,10 +161,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.conversation-details-wrap { .conversation-details-wrap {
@apply flex flex-col min-w-0 w-full; @apply flex flex-col min-w-0 w-full;
&.with-border-right {
@apply border-r border-slate-50 dark:border-slate-700;
}
} }
.dashboard-app--tabs { .dashboard-app--tabs {

View File

@ -51,7 +51,7 @@ const showCopilotTab = computed(() => {
<template> <template>
<div <div
class="ltr:border-l rtl:border-r border-n-weak h-full overflow-hidden z-10 min-w-[300px] w-[300px] flex flex-col bg-n-solid-2" class="ltr:border-l rtl:border-r border-n-weak h-full overflow-hidden z-10 min-w-[300px] w-[300px] 2xl:min-w-96 2xl:w-96 flex flex-col bg-n-background"
> >
<div v-if="showCopilotTab" class="p-2"> <div v-if="showCopilotTab" class="p-2">
<TabBar <TabBar

View File

@ -468,9 +468,7 @@ export default {
size="tiny" size="tiny"
color-scheme="secondary" color-scheme="secondary"
class="box-border fixed z-10 bg-white border border-r-0 border-solid rounded-bl-calc rtl:rotate-180 rounded-tl-calc dark:bg-slate-700 border-slate-50 dark:border-slate-600" class="box-border fixed z-10 bg-white border border-r-0 border-solid rounded-bl-calc rtl:rotate-180 rounded-tl-calc dark:bg-slate-700 border-slate-50 dark:border-slate-600"
:class=" :class="isInboxView ? 'top-52 md:top-40' : 'top-32'"
isInboxView ? 'top-52 md:top-40' : 'top-[9.5rem] md:top-[6.25rem]'
"
:icon="isRightOrLeftIcon" :icon="isRightOrLeftIcon"
@click="onToggleContactPanel" @click="onToggleContactPanel"
/> />
@ -558,6 +556,7 @@ export default {
<style scoped> <style scoped>
@tailwind components; @tailwind components;
@layer components { @layer components {
.rounded-bl-calc { .rounded-bl-calc {
border-bottom-left-radius: calc(1.5rem + 1px); border-bottom-left-radius: calc(1.5rem + 1px);

View File

@ -35,7 +35,7 @@ export default {
HELP_CENTER_DOCS_URL: HELP_CENTER_DOCS_URL:
'https://www.chatwoot.com/docs/product/others/help-center', 'https://www.chatwoot.com/docs/product/others/help-center',
TESTIMONIAL_URL: 'https://testimonials.cdn.chatwoot.com/content.json', TESTIMONIAL_URL: 'https://testimonials.cdn.chatwoot.com/content.json',
SMALL_SCREEN_BREAKPOINT: 1024, SMALL_SCREEN_BREAKPOINT: 1200,
AVAILABILITY_STATUS_KEYS: ['online', 'busy', 'offline'], AVAILABILITY_STATUS_KEYS: ['online', 'busy', 'offline'],
SNOOZE_OPTIONS: { SNOOZE_OPTIONS: {
UNTIL_NEXT_REPLY: 'until_next_reply', UNTIL_NEXT_REPLY: 'until_next_reply',

View File

@ -193,7 +193,7 @@ export default {
</script> </script>
<template> <template>
<section class="bg-white conversation-page dark:bg-slate-900"> <section class="flex w-full h-full">
<ChatList <ChatList
:show-conversation-list="showConversationList" :show-conversation-list="showConversationList"
:conversation-inbox="inboxId" :conversation-inbox="inboxId"
@ -219,11 +219,3 @@ export default {
<CmdBarConversationSnooze /> <CmdBarConversationSnooze />
</section> </section>
</template> </template>
<style lang="scss" scoped>
.conversation-page {
display: flex;
width: 100%;
height: 100%;
}
</style>