From bf578021caa8a8808d9953a2de6acd1ef08dbe2f Mon Sep 17 00:00:00 2001 From: mushka-n Date: Fri, 20 Oct 2023 15:04:47 +0300 Subject: [PATCH 1/2] fixed room name truncation in history --- .../Home/InfoPanel/Body/styles/history.js | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js b/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js index 107948f689..7df0f7e6b0 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js @@ -9,7 +9,7 @@ const StyledHistoryList = styled.div` const StyledHistorySubtitle = styled.div` position: sticky; - background: ${props => props.theme.infoPanel.backgroundColor}; + background: ${(props) => props.theme.infoPanel.backgroundColor}; top: 80px; z-index: 100; @@ -17,7 +17,7 @@ const StyledHistorySubtitle = styled.div` font-weight: 600; font-size: 13px; line-height: 20px; - color: ${props => props.theme.infoPanel.history.subtitleColor}; + color: ${(props) => props.theme.infoPanel.history.subtitleColor}; `; const StyledUserNameLink = styled.span` @@ -63,7 +63,7 @@ const StyledHistoryBlock = styled.div` .info { width: calc(100% - 40px); max-width: calc(100% - 40px); - display: ${props => `solid 1px ${props.theme.infoPanel.borderColor}`}; + display: ${(props) => `solid 1px ${props.theme.infoPanel.borderColor}`}; flex-direction: column; gap: 2px; @@ -81,7 +81,7 @@ const StyledHistoryBlock = styled.div` .date { white-space: nowrap; display: inline-block; - ${props => + ${(props) => props.theme.interfaceDirection === "rtl" ? css` margin-right: auto; @@ -91,12 +91,12 @@ const StyledHistoryBlock = styled.div` `} font-weight: 600; font-size: 12px; - color: ${props => props.theme.infoPanel.history.dateColor}; + color: ${(props) => props.theme.infoPanel.history.dateColor}; } } } - ${props => + ${(props) => props.isUserAction && css` .info { @@ -104,7 +104,7 @@ const StyledHistoryBlock = styled.div` flex-wrap: wrap; .message { display: inline-block; - ${props => + ${(props) => props.theme.interfaceDirection === "rtl" ? css` margin-left: 4px; @@ -125,21 +125,24 @@ const StyledHistoryBlockMessage = styled.div` display: flex; gap: 4px; + .main-message { + width: max-content; + max-width: 100%; + } + strong { + max-width: 100%; + display: inline-block; + vertical-align: top; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } - .main-message { - width: max-content; - white-space: nowrap; - } - .folder-label { max-width: 100%; - color: ${props => props.theme.infoPanel.history.locationIconColor}; + color: ${(props) => props.theme.infoPanel.history.locationIconColor}; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; @@ -151,12 +154,12 @@ const StyledHistoryBlockFilesList = styled.div` display: flex; flex-direction: column; padding: 8px 0; - background: ${props => props.theme.infoPanel.history.fileBlockBg}; + background: ${(props) => props.theme.infoPanel.history.fileBlockBg}; border-radius: 3px; .show_more-link { cursor: pointer; - ${props => + ${(props) => props.theme.interfaceDirection === "rtl" ? css` margin: 10px 20px 3px 0; @@ -209,12 +212,12 @@ const StyledHistoryBlockFile = styled.div` .exst { flex-shrink: 0; - color: ${props => props.theme.infoPanel.history.fileExstColor}; + color: ${(props) => props.theme.infoPanel.history.fileExstColor}; } } .location-btn { - ${props => + ${(props) => props.theme.interfaceDirection === "rtl" ? css` margin-right: auto; From 024fd2f6414ac491e9050dea33656afa8b591ce3 Mon Sep 17 00:00:00 2001 From: mushka-n Date: Wed, 25 Oct 2023 14:07:14 +0300 Subject: [PATCH 2/2] fix main-message width --- packages/client/src/pages/Home/InfoPanel/Body/styles/history.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js b/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js index 7df0f7e6b0..0fcb9ccd65 100644 --- a/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js +++ b/packages/client/src/pages/Home/InfoPanel/Body/styles/history.js @@ -128,6 +128,7 @@ const StyledHistoryBlockMessage = styled.div` .main-message { width: max-content; max-width: 100%; + min-width: max-content; } strong {