From 4375b694c42238aba0d3347bb73746c095040829 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Mon, 26 Dec 2022 13:43:35 +0530 Subject: [PATCH] feat: Uses expanded layout as default if the breakpoint is below 992px --- .../assets/scss/widgets/_conv-header.scss | 6 +- .../scss/widgets/_conversation-view.scss | 1 + .../dashboard/components/ChatList.vue | 13 +- .../dashboard/components/layout/Sidebar.vue | 3 - .../components/widgets/WootWriter/Editor.vue | 4 + .../widgets/conversation/ConversationBox.vue | 6 +- .../conversation/ConversationHeader.vue | 116 ++++++++++-------- .../widgets/conversation/bubble/Actions.vue | 1 + .../dashboard/routes/dashboard/Dashboard.vue | 28 +++++ .../conversation/ConversationView.vue | 5 +- .../helpcenter/components/Sidebar/Sidebar.vue | 9 +- 11 files changed, 118 insertions(+), 74 deletions(-) diff --git a/app/javascript/dashboard/assets/scss/widgets/_conv-header.scss b/app/javascript/dashboard/assets/scss/widgets/_conv-header.scss index c0d6b1bb6..b6332860d 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_conv-header.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_conv-header.scss @@ -42,7 +42,6 @@ $resolve-button-width: 13.2rem; margin-right: var(--space-normal); min-width: 0; - .user--profile__meta { align-items: flex-start; display: flex; @@ -54,7 +53,6 @@ $resolve-button-width: 13.2rem; } } - .header-actions-wrap { align-items: center; display: flex; @@ -65,4 +63,8 @@ $resolve-button-width: 13.2rem; &.has-open-sidebar { justify-content: flex-end; } + + @include breakpoint(640px down) { + margin-top: var(--space-small); + } } diff --git a/app/javascript/dashboard/assets/scss/widgets/_conversation-view.scss b/app/javascript/dashboard/assets/scss/widgets/_conversation-view.scss index b67932e6d..4203ec3ca 100644 --- a/app/javascript/dashboard/assets/scss/widgets/_conversation-view.scss +++ b/app/javascript/dashboard/assets/scss/widgets/_conversation-view.scss @@ -326,6 +326,7 @@ .is-text { display: inline-flex; text-align: start; + align-items: center; @include breakpoint(xxxlarge up) { display: flex; diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index a957ff78b..50b0e6784 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -794,16 +794,16 @@ export default { .conversations-list-wrap { flex-shrink: 0; - width: 34rem; + flex-basis: 34rem; overflow: hidden; @include breakpoint(large up) { - width: 36rem; + flex-basis: 36rem; } @include breakpoint(xlarge up) { - width: 35rem; + flex-basis: 38rem; } @include breakpoint(xxlarge up) { - width: 38rem; + flex-basis: 42rem; } @include breakpoint(xxxlarge up) { flex-basis: 46rem; @@ -814,10 +814,7 @@ export default { } &.list--full-width { - width: 100%; - @include breakpoint(xxxlarge up) { - flex-basis: 100%; - } + flex-basis: 100%; } } .filter--actions { diff --git a/app/javascript/dashboard/components/layout/Sidebar.vue b/app/javascript/dashboard/components/layout/Sidebar.vue index b919be2cd..24b289bab 100644 --- a/app/javascript/dashboard/components/layout/Sidebar.vue +++ b/app/javascript/dashboard/components/layout/Sidebar.vue @@ -233,9 +233,6 @@ export default { width: 40rem; } } -.off-canvas-content.is-open-left { - transform: translateX(18.8rem); -} .secondary-sidebar { overflow-y: auto; diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue index b6614dcc0..5552f9149 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue @@ -376,6 +376,10 @@ export default { display: flex; flex-direction: column; + .ProseMirror-menubar { + min-height: var(--space-two) !important; + } + > .ProseMirror { padding: 0; word-break: break-word; diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue index a8ad8e36c..7aa7c4d3a 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationBox.vue @@ -166,11 +166,15 @@ export default { .conversation-sidebar-wrap { height: auto; flex: 0 0; - overflow: hidden; + z-index: var(--z-index-low); overflow: auto; background: white; flex-basis: 28rem; + @include breakpoint(768px down) { + flex-basis: fit-content; + } + @include breakpoint(large up) { flex-basis: 30em; } diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue index 666072ef2..52f11b122 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue @@ -1,53 +1,55 @@ @@ -165,14 +167,26 @@ export default {