From 1f8fc41c90c9014bc40ee9b09e707a07f02a831f Mon Sep 17 00:00:00 2001 From: Daniel Sousa Date: Mon, 6 Jun 2022 12:08:27 +0100 Subject: [PATCH 1/3] fix: merge errors --- .../Board/Card/CardItem/CardItem.tsx | 1 + .../src/components/Board/Card/DeleteCard.tsx | 1 + .../Primitives/AlertCustomDialog/index.tsx | 7 +++++-- .../Primitives/AlertCustomDialog/styles.tsx | 21 ++++++++++++++----- frontend/src/pages/boards/[boardId].tsx | 4 ++-- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/Board/Card/CardItem/CardItem.tsx b/frontend/src/components/Board/Card/CardItem/CardItem.tsx index 387caec1f..4292a8edb 100644 --- a/frontend/src/components/Board/Card/CardItem/CardItem.tsx +++ b/frontend/src/components/Board/Card/CardItem/CardItem.tsx @@ -121,6 +121,7 @@ const CardItem: React.FC = React.memo( )} {deleting && ( 100} text={ <> Do you really want to delete {cardTitle} card? diff --git a/frontend/src/components/Primitives/AlertCustomDialog/index.tsx b/frontend/src/components/Primitives/AlertCustomDialog/index.tsx index c60135426..7518e2449 100644 --- a/frontend/src/components/Primitives/AlertCustomDialog/index.tsx +++ b/frontend/src/components/Primitives/AlertCustomDialog/index.tsx @@ -30,6 +30,7 @@ interface BoardAlertDialog { children?: ReactNode; css?: CSSProps; variant?: 'primary' | 'danger'; + addEllipsis?: boolean; } const AlertCustomDialog = ({ @@ -42,6 +43,7 @@ const AlertCustomDialog = ({ confirmText, children, css, + addEllipsis, variant = 'primary' }: BoardAlertDialog) => { return ( @@ -62,7 +64,7 @@ const AlertCustomDialog = ({ - + {text} @@ -82,7 +84,8 @@ AlertCustomDialog.defaultProps = { handleClose: undefined, children: undefined, css: undefined, - variant: 'primary' + variant: 'primary', + addEllipsis: false }; export default AlertCustomDialog; diff --git a/frontend/src/components/Primitives/AlertCustomDialog/styles.tsx b/frontend/src/components/Primitives/AlertCustomDialog/styles.tsx index 499e78399..2de44e401 100644 --- a/frontend/src/components/Primitives/AlertCustomDialog/styles.tsx +++ b/frontend/src/components/Primitives/AlertCustomDialog/styles.tsx @@ -24,15 +24,26 @@ const DialogText = styled(Flex, { px: '$32', pt: '$24', + variants: { + ellipsis: { + true: { + '&>p': { + '&>span': { + display: '-webkit-box', + '-webkit-line-clamp': 3 /* number of lines to show */, + lineClamp: 3, + '-webkit-box-orient': 'vertical', + textOverflow: 'ellipsis' + } + } + } + } + }, + '&>p': { margin: 0, '&>span': { - display: '-webkit-box', - '-webkit-line-clamp': 3 /* number of lines to show */, - lineClamp: 3, - '-webkit-box-orient': 'vertical', - textOverflow: 'ellipsis', wordBreak: 'break-all', overflow: 'hidden', diff --git a/frontend/src/pages/boards/[boardId].tsx b/frontend/src/pages/boards/[boardId].tsx index 278847610..9f19a02d9 100644 --- a/frontend/src/pages/boards/[boardId].tsx +++ b/frontend/src/pages/boards/[boardId].tsx @@ -3,7 +3,7 @@ import { dehydrate, QueryClient, useQueryClient } from 'react-query'; import { GetServerSideProps } from 'next'; import Link from 'next/link'; import { useSession } from 'next-auth/react'; -import { useSetRecoilState } from 'recoil'; +import { useRecoilState, useSetRecoilState } from 'recoil'; import { DragDropContext, DropResult } from '@react-forked/dnd'; import { io, Socket } from 'socket.io-client'; @@ -21,7 +21,7 @@ import Flex from 'components/Primitives/Flex'; import { countBoardCards } from 'helper/board/countCards'; import useBoard from 'hooks/useBoard'; import useCards from 'hooks/useCards'; -import { boardInfoState } from 'store/board/atoms/board.atom'; +import { boardInfoState, newBoardState } from 'store/board/atoms/board.atom'; import MergeCardsDto from 'types/board/mergeCard.dto'; import UpdateCardPositionDto from 'types/card/updateCardPosition.dto'; import { NEXT_PUBLIC_BACKEND_URL } from 'utils/constants'; From 227a0f53e4c56925c65879a3b29998d0e1e298a8 Mon Sep 17 00:00:00 2001 From: Daniel Sousa Date: Mon, 6 Jun 2022 12:12:55 +0100 Subject: [PATCH 2/3] fix: imports paths --- .../CardBoard/CardBody/CardTitle/partials/Title/styles.tsx | 5 +++-- .../src/components/Primitives/AlertCustomDialog/index.tsx | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/CardBoard/CardBody/CardTitle/partials/Title/styles.tsx b/frontend/src/components/CardBoard/CardBody/CardTitle/partials/Title/styles.tsx index 53270951e..afa9b6312 100644 --- a/frontend/src/components/CardBoard/CardBody/CardTitle/partials/Title/styles.tsx +++ b/frontend/src/components/CardBoard/CardBody/CardTitle/partials/Title/styles.tsx @@ -1,5 +1,6 @@ -import { styled } from '../../../../../../stitches.config'; -import Text from '../../../../../Primitives/Text'; +import { styled } from '@stitches/react'; + +import Text from 'components/Primitives/Text'; const StyledBoardTitle = styled(Text, { fontWeight: '$bold', diff --git a/frontend/src/components/Primitives/AlertCustomDialog/index.tsx b/frontend/src/components/Primitives/AlertCustomDialog/index.tsx index 7518e2449..538b0933d 100644 --- a/frontend/src/components/Primitives/AlertCustomDialog/index.tsx +++ b/frontend/src/components/Primitives/AlertCustomDialog/index.tsx @@ -1,6 +1,5 @@ import { ReactNode } from 'react'; - -import { CSSProps } from 'styles/stitches/stitches.config'; +import { CSS } from '@stitches/react/types/css-util'; import Icon from 'components/icons/Icon'; import { @@ -28,7 +27,7 @@ interface BoardAlertDialog { title: ReactNode; handleClose?: () => void; children?: ReactNode; - css?: CSSProps; + css?: CSS; variant?: 'primary' | 'danger'; addEllipsis?: boolean; } From cf59bd6575f59553488ea7b50cd892165be06e6c Mon Sep 17 00:00:00 2001 From: Daniel Sousa Date: Mon, 6 Jun 2022 12:17:09 +0100 Subject: [PATCH 3/3] fix: favicon path --- frontend/src/pages/_document.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/_document.tsx b/frontend/src/pages/_document.tsx index 3cc193ab1..b73dda4c0 100644 --- a/frontend/src/pages/_document.tsx +++ b/frontend/src/pages/_document.tsx @@ -15,7 +15,7 @@ export default function Document() { />