Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]: Merge Errors #225

Merged
merged 3 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/components/Board/Card/CardItem/CardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const CardItem: React.FC<CardItemProps> = React.memo(
)}
{deleting && (
<DeleteCard
cardTitle={item.text}
boardId={boardId}
cardId={cardGroupId}
socketId={socketId}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Board/Card/DeleteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const DeleteCard = ({
title="Delete card"
defaultOpen
variant="danger"
addEllipsis={cardTitle.length > 100}
text={
<>
Do you really want to delete <span>{cardTitle}</span> card?
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
12 changes: 7 additions & 5 deletions frontend/src/components/Primitives/AlertCustomDialog/index.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -28,8 +27,9 @@ interface BoardAlertDialog {
title: ReactNode;
handleClose?: () => void;
children?: ReactNode;
css?: CSSProps;
css?: CSS;
variant?: 'primary' | 'danger';
addEllipsis?: boolean;
}

const AlertCustomDialog = ({
Expand All @@ -42,6 +42,7 @@ const AlertCustomDialog = ({
confirmText,
children,
css,
addEllipsis,
variant = 'primary'
}: BoardAlertDialog) => {
return (
Expand All @@ -62,7 +63,7 @@ const AlertCustomDialog = ({
</AlertDialogCancel>
</DialogTitleContainer>
<Separator css={{ backgroundColor: '$primary100' }} />
<DialogText direction="column">
<DialogText ellipsis={addEllipsis} direction="column">
<StyledAlertDialogDescription>{text}</StyledAlertDialogDescription>
</DialogText>
<DialogButtons justify="end" gap="24">
Expand All @@ -82,7 +83,8 @@ AlertCustomDialog.defaultProps = {
handleClose: undefined,
children: undefined,
css: undefined,
variant: 'primary'
variant: 'primary',
addEllipsis: false
};

export default AlertCustomDialog;
21 changes: 16 additions & 5 deletions frontend/src/components/Primitives/AlertCustomDialog/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Document() {
/>
<link
rel="shortcut icon"
href="/Users/danielsousa/Developer/open-source/divide-and-conquer/frontend/public/favicon.svg"
href="/favicon.svg"
type="image/svg+xml"
/>
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/boards/[boardId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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';
Expand Down