From 19ff5bdd5e53c576edef43b07ab171f46fcdcfdd Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 13 Dec 2024 07:12:22 +0530 Subject: [PATCH] feat: Add new message bubbles (#10481) --------- Co-authored-by: Pranav --- .../dashboard/assets/scss/_woot.scss | 8 +- .../components-next/icon/FileIcon.story.vue | 36 + .../components-next/icon/FileIcon.vue | 38 + .../components-next/message/Message.vue | 352 ++++ .../components-next/message/MessageError.vue | 31 + .../components-next/message/MessageMeta.vue | 77 + .../components-next/message/MessageStatus.vue | 93 + .../message/bubbles/Activity.vue | 16 + .../message/bubbles/Attachments.vue | 30 + .../components-next/message/bubbles/Audio.vue | 44 + .../components-next/message/bubbles/Base.vue | 90 + .../message/bubbles/BaseAttachment.vue | 78 + .../message/bubbles/Contact.vue | 137 ++ .../components-next/message/bubbles/Dyte.vue | 109 ++ .../message/bubbles/Email/EmailMeta.vue | 98 ++ .../message/bubbles/Email/Index.vue | 133 ++ .../message/bubbles/Email/removeReply.js | 126 ++ .../components-next/message/bubbles/File.vue | 73 + .../components-next/message/bubbles/Image.vue | 111 ++ .../message/bubbles/InstagramStory.vue | 89 + .../message/bubbles/Location.vue | 108 ++ .../message/bubbles/Text/FormattedContent.vue | 31 + .../message/bubbles/Text/Index.vue | 65 + .../message/bubbles/Unsupported.vue | 9 + .../components-next/message/bubbles/Video.vue | 84 + .../message/chips/AttachmentChips.vue | 106 ++ .../components-next/message/chips/Audio.vue | 133 ++ .../components-next/message/chips/File.vue | 72 + .../components-next/message/chips/Image.vue | 52 + .../components-next/message/chips/Video.vue | 52 + .../components-next/message/constants.js | 72 + .../message/fixtures/emailConversation.js | 382 +++++ .../message/fixtures/instagramConversation.js | 1096 ++++++++++++ .../message/fixtures/newsletterEmail.js | 156 ++ .../message/fixtures/simpleEmail.js | 85 + .../message/fixtures/textOnly.js | 715 ++++++++ .../message/fixtures/textWithMedia.js | 1526 +++++++++++++++++ .../components-next/message/provider.js | 33 + .../message/stories/EmailMessages.story.vue | 45 + .../stories/InstagramBubbles.story.vue | 137 ++ .../stories/InstagramMessages.story.vue | 44 + .../message/stories/MediaBubbles.story.vue | 260 +++ .../message/stories/MessageBubbles.story.vue | 181 ++ .../message/stories/TextMessages.story.vue | 45 + .../dashboard/composables/useTransformKeys.js | 12 +- .../dashboard/i18n/locale/en/chatlist.json | 7 +- .../i18n/locale/en/conversation.json | 13 +- .../dashboard/i18n/locale/en/settings.json | 4 + package.json | 2 + pnpm-lock.yaml | 269 +++ tailwind.config.js | 132 +- theme/colors.js | 1 + theme/icons.js | 116 ++ 53 files changed, 7781 insertions(+), 33 deletions(-) create mode 100644 app/javascript/dashboard/components-next/icon/FileIcon.story.vue create mode 100644 app/javascript/dashboard/components-next/icon/FileIcon.vue create mode 100644 app/javascript/dashboard/components-next/message/Message.vue create mode 100644 app/javascript/dashboard/components-next/message/MessageError.vue create mode 100644 app/javascript/dashboard/components-next/message/MessageMeta.vue create mode 100644 app/javascript/dashboard/components-next/message/MessageStatus.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Activity.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Attachments.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Audio.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Base.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Contact.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Dyte.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Email/EmailMeta.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Email/Index.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Email/removeReply.js create mode 100644 app/javascript/dashboard/components-next/message/bubbles/File.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Image.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/InstagramStory.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Location.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Text/FormattedContent.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Text/Index.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Unsupported.vue create mode 100644 app/javascript/dashboard/components-next/message/bubbles/Video.vue create mode 100644 app/javascript/dashboard/components-next/message/chips/AttachmentChips.vue create mode 100644 app/javascript/dashboard/components-next/message/chips/Audio.vue create mode 100644 app/javascript/dashboard/components-next/message/chips/File.vue create mode 100644 app/javascript/dashboard/components-next/message/chips/Image.vue create mode 100644 app/javascript/dashboard/components-next/message/chips/Video.vue create mode 100644 app/javascript/dashboard/components-next/message/constants.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/emailConversation.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/instagramConversation.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/newsletterEmail.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/simpleEmail.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/textOnly.js create mode 100644 app/javascript/dashboard/components-next/message/fixtures/textWithMedia.js create mode 100644 app/javascript/dashboard/components-next/message/provider.js create mode 100644 app/javascript/dashboard/components-next/message/stories/EmailMessages.story.vue create mode 100644 app/javascript/dashboard/components-next/message/stories/InstagramBubbles.story.vue create mode 100644 app/javascript/dashboard/components-next/message/stories/InstagramMessages.story.vue create mode 100644 app/javascript/dashboard/components-next/message/stories/MediaBubbles.story.vue create mode 100644 app/javascript/dashboard/components-next/message/stories/MessageBubbles.story.vue create mode 100644 app/javascript/dashboard/components-next/message/stories/TextMessages.story.vue create mode 100644 theme/icons.js diff --git a/app/javascript/dashboard/assets/scss/_woot.scss b/app/javascript/dashboard/assets/scss/_woot.scss index fdd467f5f..c6304cf19 100644 --- a/app/javascript/dashboard/assets/scss/_woot.scss +++ b/app/javascript/dashboard/assets/scss/_woot.scss @@ -135,6 +135,7 @@ --solid-active: 255 255 255; --solid-amber: 252 232 193; --solid-blue: 218 236 255; + --solid-iris: 230 231 255; --alpha-1: 67, 67, 67, 0.06; --alpha-2: 201, 202, 207, 0.15; @@ -142,10 +143,10 @@ --black-alpha-1: 0, 0, 0, 0.12; --black-alpha-2: 0, 0, 0, 0.04; --border-blue: 39, 129, 246, 0.5; - --white-alpha: 255, 255, 255, 0.1; + --white-alpha: 255, 255, 255, 0.8; } - body.dark { + .dark { /* slate */ --slate-1: 17 17 19; --slate-2: 24 25 27; @@ -221,6 +222,7 @@ --solid-active: 53 57 66; --solid-amber: 42 37 30; --solid-blue: 16 49 91; + --solid-iris: 38 42 101; --text-blue: 126 182 255; --alpha-1: 36, 36, 36, 0.8; @@ -230,7 +232,7 @@ --black-alpha-2: 0, 0, 0, 0.2; --border-blue: 39, 129, 246, 0.5; --border-container: 236, 236, 236, 0; - --white-alpha: 255, 255, 255, 0.1; + --white-alpha: 255, 255, 255, 0.8; } /* NEXT COLORS END */ diff --git a/app/javascript/dashboard/components-next/icon/FileIcon.story.vue b/app/javascript/dashboard/components-next/icon/FileIcon.story.vue new file mode 100644 index 000000000..3a831b96f --- /dev/null +++ b/app/javascript/dashboard/components-next/icon/FileIcon.story.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/javascript/dashboard/components-next/icon/FileIcon.vue b/app/javascript/dashboard/components-next/icon/FileIcon.vue new file mode 100644 index 000000000..8dd9e7ce1 --- /dev/null +++ b/app/javascript/dashboard/components-next/icon/FileIcon.vue @@ -0,0 +1,38 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue new file mode 100644 index 000000000..07bcc203b --- /dev/null +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -0,0 +1,352 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/MessageError.vue b/app/javascript/dashboard/components-next/message/MessageError.vue new file mode 100644 index 000000000..128ab0b06 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/MessageError.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/MessageMeta.vue b/app/javascript/dashboard/components-next/message/MessageMeta.vue new file mode 100644 index 000000000..237fb7c5b --- /dev/null +++ b/app/javascript/dashboard/components-next/message/MessageMeta.vue @@ -0,0 +1,77 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/MessageStatus.vue b/app/javascript/dashboard/components-next/message/MessageStatus.vue new file mode 100644 index 000000000..d8f996cf5 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/MessageStatus.vue @@ -0,0 +1,93 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Activity.vue b/app/javascript/dashboard/components-next/message/bubbles/Activity.vue new file mode 100644 index 000000000..72fa1a3b9 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Activity.vue @@ -0,0 +1,16 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Attachments.vue b/app/javascript/dashboard/components-next/message/bubbles/Attachments.vue new file mode 100644 index 000000000..af3593d82 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Attachments.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Audio.vue b/app/javascript/dashboard/components-next/message/bubbles/Audio.vue new file mode 100644 index 000000000..eed369abc --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Audio.vue @@ -0,0 +1,44 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Base.vue b/app/javascript/dashboard/components-next/message/bubbles/Base.vue new file mode 100644 index 000000000..a6530f743 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Base.vue @@ -0,0 +1,90 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue new file mode 100644 index 000000000..45880d521 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/BaseAttachment.vue @@ -0,0 +1,78 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Contact.vue b/app/javascript/dashboard/components-next/message/bubbles/Contact.vue new file mode 100644 index 000000000..ce16e1b1e --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Contact.vue @@ -0,0 +1,137 @@ + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Dyte.vue b/app/javascript/dashboard/components-next/message/bubbles/Dyte.vue new file mode 100644 index 000000000..63932c18d --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Dyte.vue @@ -0,0 +1,109 @@ + + +