From 3c109a7577a09cb065cee5dc3ec87a44ecce9009 Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:49:22 +0200 Subject: [PATCH] Feat/change request comments formatting (#7360) --- frontend/package.json | 2 -- .../ChangeRequestComment.tsx | 4 +-- frontend/yarn.lock | 32 ------------------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index baaa5787d0..efc0d3a809 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -58,7 +58,6 @@ "@types/node": "^20.12.12", "@types/react": "18.2.79", "@types/react-dom": "18.2.25", - "@types/react-linkify": "1.0.4", "@types/react-router-dom": "5.3.3", "@types/react-table": "7.7.20", "@types/react-test-renderer": "18.0.7", @@ -105,7 +104,6 @@ "react-error-boundary": "3.1.4", "react-hooks-global-state": "2.1.0", "react-joyride": "^2.5.3", - "react-linkify": "^1.0.0-alpha", "react-markdown": "^8.0.4", "react-router-dom": "6.16.0", "react-table": "7.8.0", diff --git a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestComments/ChangeRequestComment.tsx b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestComments/ChangeRequestComment.tsx index 51d7bde398..9d90aca49f 100644 --- a/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestComments/ChangeRequestComment.tsx +++ b/frontend/src/component/changeRequest/ChangeRequestOverview/ChangeRequestComments/ChangeRequestComment.tsx @@ -1,10 +1,10 @@ import type { FC } from 'react'; +import { Markdown } from 'component/common/Markdown/Markdown'; import Paper from '@mui/material/Paper'; import { Box, styled, Typography, Tooltip } from '@mui/material'; import TimeAgo from 'react-timeago'; import { StyledAvatar } from './StyledAvatar'; import type { IChangeRequestComment } from '../../changeRequest.types'; -import Linkify from 'react-linkify'; const ChangeRequestCommentWrapper = styled(Box)(({ theme }) => ({ display: 'flex', @@ -46,7 +46,7 @@ export const ChangeRequestComment: FC<{ comment: IChangeRequestComment }> = ({ - {comment.text} + {comment.text} diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 1a07b0be4e..cdc0558652 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1964,13 +1964,6 @@ dependencies: "@types/react" "*" -"@types/react-linkify@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@types/react-linkify/-/react-linkify-1.0.4.tgz#ed9d7696f1eb049a21973074ef2fa02de1e06bcb" - integrity sha512-NOMw4X3kjvjY0lT5kXQdxZCXpPNi2hOuuqG+Kz+5EOQpi9rDUJJDitdE1j2JRNmrTnNIjrLnYG0HKyuOWN/uKA== - dependencies: - "@types/react" "*" - "@types/react-router-dom@5.3.3": version "5.3.3" resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.3.3.tgz#e9d6b4a66fcdbd651a5f106c2656a30088cc1e83" @@ -4538,13 +4531,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -linkify-it@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" - integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== - dependencies: - uc.micro "^1.0.1" - listr2@^3.8.3: version "3.14.0" resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" @@ -5676,14 +5662,6 @@ react-joyride@^2.5.3: tree-changes "^0.11.2" type-fest "^4.18.2" -react-linkify@^1.0.0-alpha: - version "1.0.0-alpha" - resolved "https://registry.yarnpkg.com/react-linkify/-/react-linkify-1.0.0-alpha.tgz#b391c7b88e3443752fafe76a95ca4434e82e70d5" - integrity sha512-7gcIUvJkAXXttt1fmBK9cwn+1jTa4hbKLGCZ9J1U6EOkyb2/+LKL1Z28d9rtDLMnpvImlNlLPdTPooorl5cpmg== - dependencies: - linkify-it "^2.0.3" - tlds "^1.199.0" - react-markdown@^8.0.4: version "8.0.7" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-8.0.7.tgz#c8dbd1b9ba5f1c5e7e5f2a44de465a3caafdf89b" @@ -6416,11 +6394,6 @@ tinyspy@^2.2.0: resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== -tlds@^1.199.0: - version "1.252.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.252.0.tgz#71d9617f4ef4cc7347843bee72428e71b8b0f419" - integrity sha512-GA16+8HXvqtfEnw/DTcwB0UU354QE1n3+wh08oFjr6Znl7ZLAeUgYzCcK+/CCrOyE0vnHR8/pu3XXG3vDijXpQ== - tmp@~0.2.1: version "0.2.3" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" @@ -6601,11 +6574,6 @@ typescript@5.4.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== -uc.micro@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== - ufo@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344"