diff --git a/app/theme/client/imports/components/messageBubble.css b/app/theme/client/imports/components/messageBubble.css index cbfc98104706f..2643f24f57944 100644 --- a/app/theme/client/imports/components/messageBubble.css +++ b/app/theme/client/imports/components/messageBubble.css @@ -7,23 +7,114 @@ padding: 0 15px; .message-body-wrapper { - overflow: hidden; - width: fit-content; max-width: 75%; margin-top: 2px; - border-radius: 20px; - font-family: 'Source Sans Pro', sans-serif; font-weight: 400; .body { position: relative; + overflow: hidden; + width: 100%; height: 100%; padding: 11px 16px; + + border-radius: 21px; + } + + .reaction { + position: relative; + + display: flex; + + width: 100%; + height: 0; + + transition: height 0.18s ease-out; + justify-content: flex-start; + + > .reactions-container { + position: absolute; + + display: flex; + + width: 175px; + + transition: width 0.1s ease-in-out, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); + transform: translate(calc(12px - 100%), -16px) scale(0); + + border-radius: 25px; + + > .reaction-icon { + z-index: 2; + + display: flex; + + height: 25px; + padding: 4px; + + transition: transform 0.18s ease-out, margin 0.1s ease-in-out; + + border: 2px solid white; + border-radius: 25px; + background-color: var(--friendly-message-color); + align-items: center; + justify-content: center; + + &:not(:first-of-type) { + transform: scale(0); + } + + > .rc-icon { + flex: 1; + + width: 13px; + height: 13px; + + color: white; + } + + > .reaction-count { + margin: 0 2px; + + user-select: none; + + color: white; + + font-size: 12px; + } + } + + > .reaction-more { + position: absolute; + z-index: 1; + + width: 25px; + height: 25px; + + transform: translate(3px, 1px); + + border: 2px solid white; + border-radius: 25px; + background-color: var(--friendly-message-color); + } + + &:hover, + &:active, + &:focus { + > .reaction-more { + display: none; + } + + > .reaction-icon { + transform: scale(1); + } + } + } } } @@ -258,27 +349,37 @@ &.messageSent { align-items: flex-end; - .message-body-wrapper .body { - color: #ffffff; + .message-body-wrapper { + .body { + color: #ffffff; - * { - color: #ffffff !important; + * { + color: #ffffff; + } + background-color: var(--friendly-message-color); + } + + .reaction { + > .reactions-container { + flex-direction: row-reverse; + } } - background-color: var(--friendly-message-color); } - &.firstMsg > .message-body-wrapper { + &.firstMsg { margin-top: 10px; - border-bottom-right-radius: 6px; + > .message-body-wrapper .body { + border-bottom-right-radius: 6px; + } } - &.midMsg > .message-body-wrapper { + &.midMsg > .message-body-wrapper .body { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } - &.lastMsg > .message-body-wrapper { + &.lastMsg > .message-body-wrapper .body { border-top-right-radius: 6px; } @@ -294,31 +395,81 @@ &.messageReceived { align-items: flex-start; - .message-body-wrapper .body { - color: #202e39; - background-color: #dee4e8; + .message-body-wrapper { + .body { + color: #202e39; + + * { + color: #202e39; + } + background-color: #dee4e8; + } + + .reaction { + justify-content: flex-end; - * { - color: #202e39 !important; + > .reactions-container { + flex-direction: row; + + transform: translate(calc(100% - 12px), -16px) scale(0); + + > .reaction-icon { + right: -6px; + left: unset; + + background-color: #dee4e8; + + > .rc-icon, + .reaction-count { + color: var(--friendly-message-color); + } + } + + > .reaction-more { + transform: translate(-3px, 1px); + + background-color: #ccd4da; + } + } } } - &.firstMsg > .message-body-wrapper { + &.firstMsg { margin-top: 10px; - border-bottom-left-radius: 6px; + > .message-body-wrapper .body { + border-bottom-left-radius: 6px; + } } - &.midMsg > .message-body-wrapper { + &.midMsg > .message-body-wrapper .body { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } - &.lastMsg > .message-body-wrapper { + &.lastMsg > .message-body-wrapper .body { border-top-left-radius: 6px; } } + &.hasReactions { + .message-body-wrapper .reaction { + height: 8px; + + > .reactions-container { + transform: translate(calc(12px - 100%), -16px) scale(1); + } + } + + &.messageReceived { + .message-body-wrapper .reaction { + > .reactions-container { + transform: translate(calc(100% - 12px), -16px) scale(1); + } + } + } + } + &.bigEmoji { .message-body-wrapper .body { background-color: transparent !important; diff --git a/app/theme/client/imports/general/base_old.css b/app/theme/client/imports/general/base_old.css index 7a8068481a6fc..82975790b269a 100644 --- a/app/theme/client/imports/general/base_old.css +++ b/app/theme/client/imports/general/base_old.css @@ -1481,6 +1481,105 @@ word-wrap: break-word; -webkit-overflow-scrolling: touch; + + > ul { + > li { + transition: opacity 0.15s ease-out; + } + + > .reactions-backdrop { + position: fixed; + top: 0; + left: 0; + + display: none; + + width: 100%; + height: 100%; + } + + > .reactions { + --reactionSize: 45px; + + position: absolute; + + display: flex; + overflow: hidden; + + box-sizing: content-box; + + height: var(--reactionSize); + padding: 6px 15px; + + transition: transform 0.15s ease-out, opacity 0.15s linear; + transform: translateY(30px) scale(0.6); + + pointer-events: none; + + opacity: 0; + border-radius: var(--reactionSize); + background-color: white; + box-shadow: 0 0 5px 0 #cccccc; + gap: 6px; + + > .reaction-icon { + width: var(--reactionSize); + height: var(--reactionSize); + padding: 10px; + + border-radius: 50%; + + > .rc-icon { + width: 100%; + height: 100%; + + pointer-events: none; + + color: var(--friendly-message-color); + } + + @media (hover: hover) { + &:hover { + background-color: var(--friendly-message-color); + + > .rc-icon { + color: #ffffff; + } + } + } + + &:active { + background-color: var(--friendly-message-color); + + > .rc-icon { + color: #ffffff; + } + } + } + } + } + + &.show-reactions { + > ul { + > li { + pointer-events: none; + + opacity: 0.35; + } + + > .reactions-backdrop { + display: unset; + } + + > .reactions { + transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.18s linear; + transform: translateY(0) scale(1); + pointer-events: all; + + opacity: 1; + } + } + } } & .footer { diff --git a/app/ui-master/public/icons.svg b/app/ui-master/public/icons.svg index eef102df4ea8f..87567bba282c8 100644 --- a/app/ui-master/public/icons.svg +++ b/app/ui-master/public/icons.svg @@ -112,6 +112,10 @@ + + + + @@ -183,6 +187,9 @@ + + + @@ -300,6 +307,9 @@ + + + @@ -385,6 +395,12 @@ + + + + + + diff --git a/app/ui-master/public/icons/exclamation.svg b/app/ui-master/public/icons/exclamation.svg new file mode 100644 index 0000000000000..832c0607233b5 --- /dev/null +++ b/app/ui-master/public/icons/exclamation.svg @@ -0,0 +1,4 @@ + + + + diff --git a/app/ui-master/public/icons/heart.svg b/app/ui-master/public/icons/heart.svg new file mode 100644 index 0000000000000..2c7bd966feb3e --- /dev/null +++ b/app/ui-master/public/icons/heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/ui-master/public/icons/question.svg b/app/ui-master/public/icons/question.svg new file mode 100644 index 0000000000000..0f607b4d9f76a --- /dev/null +++ b/app/ui-master/public/icons/question.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/ui-master/public/icons/thumbsdown.svg b/app/ui-master/public/icons/thumbsdown.svg new file mode 100644 index 0000000000000..0db3eecdaefd4 --- /dev/null +++ b/app/ui-master/public/icons/thumbsdown.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/ui-master/public/icons/thumbsup.svg b/app/ui-master/public/icons/thumbsup.svg new file mode 100644 index 0000000000000..c968bb478c30b --- /dev/null +++ b/app/ui-master/public/icons/thumbsup.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/ui-message/client/messageBubble.html b/app/ui-message/client/messageBubble.html index d9f59192efe64..5ef945f6d4af8 100644 --- a/app/ui-message/client/messageBubble.html +++ b/app/ui-message/client/messageBubble.html @@ -1,5 +1,5 @@