Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
02ed197
chore: 모바일 톡픽 상세 페이지에 필요한 아이콘 정의
alwubin Feb 17, 2025
3c7ac07
refactor: CategoryBarChip의 size extraSmall 사이즈 스타일 정의
alwubin Feb 17, 2025
d000445
refactor: GY[4] 색상 수정
alwubin Feb 17, 2025
21f2b43
feat: 댓글 없는 상황에 대한 상수 메세지 정의
alwubin Feb 17, 2025
22f0dad
refactor: 미디어 쿼리 적용 및 객체 리터럴 형식으로 컴포넌트 모바일 스타일 수정
alwubin Feb 17, 2025
8c3ba0d
feat: TalkPickMobilePage 페이지 구현
alwubin Feb 17, 2025
4dfe1e5
feat: MobileCommentItem 컴포넌트 구현
alwubin Feb 17, 2025
b27384b
feat: MobileCommentsSection 컴포넌트 구현
alwubin Feb 17, 2025
08b2ab0
feat: 모바일 화면에서 TalkPick 페이지 라우팅 분기 처리
alwubin Feb 17, 2025
0fa1447
feat: LikeButton에 모바일 아이콘 및 스타일 적용
alwubin Feb 17, 2025
9223000
refactor: commentList 보여지는 부분에 대한 조건 수정
alwubin Feb 17, 2025
b777c9c
refactor: MobileCommentItem의 좋아요 버튼 및 답글 버튼에 대한 조건 추가
alwubin Feb 17, 2025
429be39
refactor: 컬러팔레트 수정 및 최대 길이 상수 정의
alwubin Feb 18, 2025
9522fb0
chore: CommentInput button 아이콘 정의
alwubin Feb 18, 2025
5aa90d0
feat: CommentInput 컴포넌트 및 스토리북 구현
alwubin Feb 18, 2025
1c8198d
feat: CategoryBarChip으로 첫댓글 태그에 로직 구현
alwubin Feb 18, 2025
4d20217
feat: 모바일 댓글 Input 및 모바일 댓글 로직 구현
alwubin Feb 18, 2025
27ad18a
feat: 모바일 더보기 버튼 아이콘 및 스타일 추가
alwubin Feb 20, 2025
fa32ba9
feat: 댓글 줄임 최대 길이 상수 정의
alwubin Feb 20, 2025
0c425d0
feat: 댓글 글자 제한으로 더보기 버튼 생성 로직 구현
alwubin Feb 20, 2025
622f2b4
style: 모바일 톡픽 상세 페이지 하단 마진 추가
alwubin Feb 20, 2025
877e0cf
feat: 모바일 댓글 수정 로직 구현
alwubin Feb 24, 2025
0010410
refactor: 본인 댓글일 때의 배경 관련 스타일 수정
alwubin Feb 24, 2025
d34d2e2
refactor: 댓글 수정 관련 상태 props 추가 및 주석 제거
alwubin Feb 24, 2025
e867d3e
refactor: 현재 구현되지 않은 답글 부분 함수 및 코드 제거
alwubin Mar 5, 2025
624870f
feat: MobileReportModal 컴포넌트 UI 및 스토리북 구현
alwubin Mar 5, 2025
5acd01d
feat: MobileReportModal에 대한 ModalProps 추가
alwubin Mar 5, 2025
3d054b5
feat: MobileReportModal 모바일 댓글에 로직 구현
alwubin Mar 5, 2025
e29ff66
Merge branch 'dev' into feat/300-mobile-talkpick-comment-UI
alwubin Mar 5, 2025
878f419
refactor: MobileReport 아이콘 정의 중복 제거
alwubin Mar 5, 2025
c8fe332
refactor: 상수 객체 괄호 오류 수정
alwubin Mar 5, 2025
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
6 changes: 5 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import TalkPickVotes from '@/pages/MyPage/TalkPick/TalkPickVotes';
import TalkPickComments from '@/pages/MyPage/TalkPick/TalkPickComments';
import BalanceGameWritten from '@/pages/MyPage/BalanceGame/BalanceGameWritten';
import BalanceGameEditPage from '@/pages/BalanceGameEditPage/BalanceGameEditPage';
import TalkPickMobilePage from '@/pages/mobile/TalkPickMobilePage/TalkPickMobilePage';
import ProtectedRoutes from './components/Routes/ProtectedRoutes';
import { PATH } from './constants/path';
import { useTokenRefresh } from './hooks/common/useTokenRefresh';
Expand Down Expand Up @@ -92,7 +93,10 @@ const App: React.FC = () => {
<Route path={PATH.CHANGE.PASSWORD} element={<ChangePasswordPage />} />
<Route path={PATH.TODAY_TALKPICK} element={<TalkPickPage />} />
<Route path={PATH.TALKPICK_PLACE} element={<TalkPickPlacePage />} />
<Route path={PATH.TALKPICK()} element={<TalkPickPage />} />
<Route
path={PATH.TALKPICK()}
element={isMobile ? <TalkPickMobilePage /> : <TalkPickPage />}
/>
<Route
path={PATH.BALANCEGAME.VIEW()}
element={isMobile ? <BalanceGameMobilePage /> : <BalanceGamePage />}
Expand Down
6 changes: 6 additions & 0 deletions src/assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ export { default as LogoMedium } from './svg/logo-medium.svg';
export { default as DefaultPerson } from './svg/default-person.svg';
export { default as MobileDefaultPerson } from './svg/mobile-default-person.svg';
export { default as MobilePlus } from './svg/mobile-plus.svg';
export { default as MobileComment } from './svg/mobile-comment.svg';
export { default as CryEmoji } from './svg/cry-emoji.svg';
export { default as MobileLikeButtonDF } from './svg/mobile-like-button-df.svg';
export { default as MobileLikeButtonPR } from './svg/mobile-like-button-pr.svg';
export { default as MobileArrowUp } from './svg/mobile-arrow-up.svg';
export { default as MobileArrowDown } from './svg/mobile-arrow-down.svg';
export { default as MobileReport } from './svg/mobile-report.svg';
export { default as PickIcon } from './svg/pick-icon.svg';

Expand Down
13 changes: 13 additions & 0 deletions src/assets/svg/cry-emoji.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/mobile-arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/mobile-arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/svg/mobile-comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/mobile-like-button-df.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/svg/mobile-like-button-pr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/assets/svg/mobile-report.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion src/components/atoms/CategoryBarChip/CategoryBarChip.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,25 @@ export const getStylingBySize = (
borderRadius: '25px',
padding: '0 12px',
}),
extraSmall: css({
borderRadius: '3px',
padding: '3px 6px',
}),
};

return style[size];
};

export const categoryBarChipStyling = css(typo.Comment.SemiBold, {
export const categoryBarChipStyling = css({
...typo.Comment.SemiBold,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: color.MAIN,
color: color.WT,
'@media (max-width: 430px)': {
...typo.Mobile.Text.SemiBold_10,
backgroundColor: color.WT_VIOLET,
color: color.MAIN,
},
});
2 changes: 1 addition & 1 deletion src/components/atoms/CategoryBarChip/CategoryBarChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
import * as S from './CategoryBarChip.style';

export interface CategoryBarChipProps {
size?: 'large' | 'small';
size?: 'large' | 'small' | 'extraSmall';
children?: ReactNode;
}

Expand Down
22 changes: 15 additions & 7 deletions src/components/atoms/CommentProfile/CommentProfile.style.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { css } from '@emotion/react';
import color from '@/styles/color';

export const containerStyle = css`
display: inline-flex;
padding: 5px;
align-items: center;
gap: 10px;
border-radius: 50px 50px 0 50px;
`;
export const containerStyle = css({
display: 'inline-flex',
padding: '5px',
alignItems: 'center',
gap: '10px',
borderRadius: '50px 50px 0 50px',
'@media (max-width: 430px)': {
padding: '2.7px',
borderRadius: '27.3px 27.3px 0 27.3px',
},
});

export const getProfileColor = (option: 'A' | 'B' | null) => {
const backgroundColors = {
Expand All @@ -29,6 +33,10 @@ export const profileWrapper = css({
backgroundSize: 'cover',
backgroundPosition: 'center',
cursor: 'pointer',
'@media (max-width: 430px)': {
width: '24.5px',
height: '24.5px',
},
});

export const profileImage = css({
Expand Down
96 changes: 56 additions & 40 deletions src/components/atoms/LikeButton/LikeButton.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,62 @@ import { css } from '@emotion/react';
import color from '@/styles/color';
import typo from '@/styles/typo';

export const likeButton = css`
display: inline-flex;
align-items: center;
flex-direction: row;
background-color: transparent;
border: none;
cursor: pointer;
transition:
background-color 0.3s,
color 0.3s;
`;
export const likeButton = css({
display: 'inline-flex',
alignItems: 'center',
flexDirection: 'row',
backgroundColor: 'transparent',
border: 'none',
cursor: 'pointer',
transition: 'background-color 0.3s, color 0.3s',
'@media (max-width: 430px)': {
display: 'flex',
padding: 0,
},
});

export const icon = css`
width: 22px;
height: 22px;
object-fit: contain;
`;
export const icon = css({
width: '22px',
height: '22px',
objectFit: 'contain',
'@media (max-width: 430px)': {
width: '16px',
height: '16px',
},
});

export const defaultLabel = css`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 22px;
height: 29px;
${typo.Number.Medium_18}
color: ${color.GY[1]};
padding: 0;
margin: 0;
`;
export const defaultLabel = css({
...typo.Number.Medium_18,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
width: '22px',
height: '29px',
color: color.GY[1],
padding: 0,
margin: 0,
'@media (max-width: 430px)': {
...typo.Mobile.Main.Regular_12,
width: '15px',
height: '15px',
},
});

export const pressedLabel = css`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 22px;
height: 29px;
${typo.Number.Medium_18}
color: ${color.MAIN};
padding: 0;
margin: 0;
`;
export const pressedLabel = css({
...typo.Number.Medium_18,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
width: '22px',
height: '29px',
color: color.MAIN,
padding: 0,
margin: 0,
'@media (max-width: 430px)': {
...typo.Mobile.Main.Regular_12,
width: '15px',
height: '15px',
},
});
43 changes: 35 additions & 8 deletions src/components/atoms/LikeButton/LikeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,53 @@
import React, { forwardRef } from 'react';
import type { ComponentPropsWithRef, ForwardedRef } from 'react';
import { LikeButtonDF, LikeButtonPR } from '@/assets';
import {
LikeButtonDF,
LikeButtonPR,
MobileLikeButtonDF,
MobileLikeButtonPR,
} from '@/assets';
import * as S from './LikeButton.style';

export interface LikeButtonProps extends ComponentPropsWithRef<'button'> {
likeCount: number;
likeState?: boolean;
isMobile?: boolean;
}

const LikeButton = (
{ likeCount, likeState = false, ...attributes }: LikeButtonProps,
{
likeCount,
likeState = false,
isMobile = false,
...attributes
}: LikeButtonProps,
ref: ForwardedRef<HTMLButtonElement>,
) => {
let Icon;

switch (true) {
case likeState && isMobile:
Icon = MobileLikeButtonPR;
break;
case likeState && !isMobile:
Icon = LikeButtonPR;
break;
case !likeState && isMobile:
Icon = MobileLikeButtonDF;
break;
case !likeState && !isMobile:
Icon = LikeButtonDF;
break;
default:
Icon = LikeButtonDF;
break;
}

return (
<button type="button" ref={ref} css={S.likeButton} {...attributes}>
{likeState ? (
<LikeButtonPR css={S.icon} />
) : (
<LikeButtonDF css={S.icon} />
)}
<Icon css={S.icon} />
<span css={[S.defaultLabel, likeState && S.pressedLabel]}>
{likeCount}
{isMobile && likeCount === 0 ? '좋아요' : likeCount}
</span>
</button>
);
Expand Down
15 changes: 14 additions & 1 deletion src/components/atoms/MenuTap/MenuTap.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,16 @@ export const menuStlying = css({
borderRadius: '10px',
overflow: 'hidden',
boxShadow: '1px 2px 10px rgba(0, 0, 0, 0.07)',
'@media (max-width: 430px)': {
width: '58px',
backgroundColor: color.WT,
border: `1px solid ${color.GY[3]}`,
borderRadius: '6px',
},
});

export const menuItemStyling = css(typo.Comment.SemiBold, {
export const menuItemStyling = css({
...typo.Comment.SemiBold,
width: '100%',
padding: '10px',
cursor: 'pointer',
Expand All @@ -35,4 +42,10 @@ export const menuItemStyling = css(typo.Comment.SemiBold, {
':last-child': {
borderBottom: 'none',
},
'@media (max-width: 430px)': {
...typo.Mobile.Text.Medium_12,
padding: '7px',
color: color.GY[1],
borderBottom: `1px solid ${color.GY[3]}`,
},
});
14 changes: 11 additions & 3 deletions src/components/atoms/MoreButton/MoreButton.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ export const moreButtonStyling = (icon: Required<MoreButtonProps>['icon']) =>
gap: '7px',
color: icon === 'plus' ? color.GY[1] : color.MAIN,
cursor: 'pointer',
'@media (max-width: 430px)': {
...typo.Mobile.Text.SemiBold_14,
},
'@media (max-width: 430px)':
icon === 'arrow'
? {
...typo.Mobile.Text.Medium_12,
color: color.GY[1],
gap: '3px',
}
: {
...typo.Mobile.Text.SemiBold_14,
color: color.GY[1],
},
});
11 changes: 9 additions & 2 deletions src/components/atoms/MoreButton/MoreButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { forwardRef, ComponentPropsWithRef, ForwardedRef } from 'react';
import { More, MoreReply, MoreSmall } from '@/assets';
import { MobileArrowDown, More, MoreReply, MoreSmall } from '@/assets';
import * as S from './MoreButton.style';

export interface MoreButtonProps extends ComponentPropsWithRef<'button'> {
Expand All @@ -12,7 +12,14 @@ const MoreButton = (
ref: ForwardedRef<HTMLButtonElement>,
) => {
const getIcon = () => {
if (size === 'small') return <MoreSmall />;
if (size === 'small') {
switch (icon) {
case 'arrow':
return <MobileArrowDown />;
default:
return <MoreSmall />;
}
}
return icon === 'plus' ? <More /> : <MoreReply />;
};

Expand Down
1 change: 0 additions & 1 deletion src/components/atoms/ToastModal/ToastModal.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const toastModalStyling = css({
padding: '20px 30px',
borderRadius: '35px',
boxShadow: '1px 1px 10px rgba(0, 0, 0, 0.07)',

'@media (max-width: 430px)': {
...typo.Mobile.Text.SemiBold_12,
padding: '14px 24px',
Expand Down
Loading
Loading