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

[FE] πŸš€ ν…ŒμŠ€νŠΈ μ„œλ²„ 배포 #994

Merged
merged 26 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ece77ba
πŸ’„ 마이 νŽ˜μ΄μ§€ PairRoomButton 및 RetrospectButton hover μ‹œ 투λͺ…도 쑰절
greetings1012 Dec 15, 2024
5ed84a0
πŸ’„ μ™„λ£Œλœ νŽ˜μ–΄λ£Έ Todo 색상 μ—°ν•˜κ²Œ μˆ˜μ •
greetings1012 Dec 15, 2024
03270a5
πŸ’„ μ™„λ£Œλœ νŽ˜μ–΄λ£Έ 레퍼런슀 링크 빈 이미지 μΉ΄λ“œ μˆ˜μ •
greetings1012 Dec 15, 2024
c743cf0
πŸ’„ μ—­ν•  라벨 색상이 일관적이지 μ•Šλ˜ 였λ₯˜ ν•΄κ²°
greetings1012 Dec 15, 2024
33012c8
πŸ’„ νšŒμ›κ°€μž… λ²„νŠΌμ΄ λ„ˆλ¬΄ μ–‡λ˜ 문제 ν•΄κ²°
greetings1012 Dec 15, 2024
2652c5c
πŸ’„ νŽ˜μ–΄λ£Έ μ’…λ£Œ 툴팁이 보이지 μ•Šλ˜ 문제 ν•΄κ²°
greetings1012 Dec 15, 2024
9d1e19d
πŸ’„ μΉ΄ν…Œκ³ λ¦¬ λ²„νŠΌ λ„ˆλΉ„κ°€ μ˜¬λ°”λ₯΄κ²Œ ν‘œμ‹œλ˜μ§€ μ•Šλ˜ 문제 ν•΄κ²°
greetings1012 Dec 15, 2024
8885d31
Merge pull request #984 from woowacourse-teams/FE/feature/#982
greetings1012 Dec 17, 2024
6df0994
:recycle: νŽ˜μ–΄ 정보 μ—°λ™ν•˜κΈ° λͺ¨λ‹¬ λ²„νŠΌ 톡일
anttiey Dec 18, 2024
d7be41e
:recycle: 회고 μž‘μ„± νŽ˜μ΄μ§€μ—μ„œ μž‘μ„± μ™„λ£Œ λ²„νŠΌμ΄ μž‘μ•„μ§€λŠ” 문제 ν•΄κ²°
anttiey Dec 18, 2024
712e023
:recycle: λͺ¨λ‹¬ 크기λ₯Ό μ€„μ˜€μ„ λ•Œ 컨텐츠가 κ°€λ €μ§€λŠ” 문제 ν•΄κ²°
anttiey Dec 18, 2024
9660cee
:sparkles: μ»€μŠ€ν…€ ν›… useClickEnterKey κ΅¬ν˜„
anttiey Dec 18, 2024
ab0fc1b
:recycle: μ»€μŠ€ν…€ ν›… useClickEnterKey 적용
anttiey Dec 18, 2024
242452c
πŸ› νŽ˜μ΄μ§€ λ’€λ‘œκ°€κΈ° 였λ₯˜ ν•΄κ²°
greetings1012 Dec 20, 2024
fee7398
Merge pull request #990 from woowacourse-teams/FE/feature/#989
greetings1012 Dec 21, 2024
d7362f4
Merge pull request #987 from woowacourse-teams/FE/feature/#986
anttiey Dec 21, 2024
f9b2bf8
πŸ’„ FloatingSidebar μœ„μΉ˜ 및 μ„  길이 μˆ˜μ •
dle234 Dec 22, 2024
b4fe129
✏️ DocsImage 리슀트둜 받도둝 μˆ˜μ •
dle234 Dec 22, 2024
c3671c7
✏️ CoduoDocs ν•˜λ“œμ½”λ”© 된 λΆ€λΆ„ constant 둜 뢄리
dle234 Dec 22, 2024
4860f57
🚚 DocsImages->Steps 둜 파일 이름 λ³€κ²½
dle234 Dec 22, 2024
cae7157
πŸ’¬ Docs νŽ˜μ΄μ§€ νŽ˜μ–΄ν”„λ‘œκ·Έλž˜λ° κ°œλ… constant μΆ”κ°€
dle234 Dec 22, 2024
a010d12
♻️ νŽ˜μ–΄ν”„λ‘œκ·Έλž˜λ° κ°œλ… 및 μ„€λͺ… νŽ˜μ΄μ§€ constant 뢄리
dle234 Dec 22, 2024
8481110
♻️ Header 의 'μ½”λ”©ν•΄λ“€μ˜€ μ‹œμž‘ν•˜κΈ°' 문ꡬ μˆ˜μ •
dle234 Dec 22, 2024
695db6c
♻️ νŽ˜μ–΄μ΄λ¦„ μž…λ ₯ν•˜κΈ°μ— 동일 id λΆ€μ—¬
dle234 Dec 23, 2024
9d32483
πŸ’¬ μ˜€νƒ€ μˆ˜μ •(λ„€λΉ„κ²Œμ΄ν„°-> λ‚΄λΉ„κ²Œμ΄, 클둠-> clone)
dle234 Dec 23, 2024
4e03131
Merge pull request #993 from woowacourse-teams/FE/feature/#991
dle234 Dec 23, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const ContentItem = styled(Link)<{ $isActive: boolean }>`
left: -2rem;

width: 3px;
height: 140%;
height: 160%;

background-color: ${({ $isActive, theme }) => ($isActive ? theme.color.secondary[500] : theme.color.black[200])};

Expand Down
19 changes: 0 additions & 19 deletions frontend/src/components/CoduoDocs/DocsImage/DocsImage.stories.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions frontend/src/components/CoduoDocs/DocsImage/DocsImage.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import ContentBox from '@/components/CoduoDocs/ContentBox/ContentBox';
import FloatingSidebar from '@/components/CoduoDocs/FloatingSidebar/FloatingSidebar';

import { START_CONTENT } from '@/constants/coduoDocs';
import { PAIR_PROGRAMMING_CONCEPT } from '@/constants/coduoDocs';

const meta = {
title: 'component/CoduoDocs/FloatingSidebar',
Expand All @@ -17,7 +17,7 @@ type Story = StoryObj<typeof FloatingSidebar>;
export const Default: Story = {
render: () => (
<FloatingSidebar>
<ContentBox title="μ‹œμž‘ν•˜κΈ°" contents={START_CONTENT} activeSection="input-name" />
<ContentBox title="μ‹œμž‘ν•˜κΈ°" contents={PAIR_PROGRAMMING_CONCEPT} activeSection="input-name" />
</FloatingSidebar>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const Layout = styled.div`
gap: 2.3rem;

position: fixed;
top: 15rem;
top: 12rem;
left: 4%;

background-color: ${({ theme }) => theme.color.black[0]};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CoduoDocs/Quote/Quote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface QuoteProps {
isNewBrowserOpen?: boolean;
}

const Quote = ({ text, href, linkText, isNewBrowserOpen = false }: QuoteProps) => {
const Quote = ({ text, href, linkText, isNewBrowserOpen = true }: QuoteProps) => {
return (
<S.Container>
<S.QuoteBar>|</S.QuoteBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export const Container = styled.div`
padding: 3rem 4rem;
border-radius: 0.5rem;

background-color: ${({ theme }) => theme.color.black[200]};
background-color: ${({ theme }) => theme.color.black[800]};
`;

export const Content = styled.p`
color: ${({ theme }) => theme.color.black[900]};
color: ${({ theme }) => theme.color.black[100]};
font-size: ${({ theme }) => theme.fontSize.base};
line-height: 1.8;
white-space: pre-wrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ export const Container = styled.div`
display: flex;
flex-direction: column;
gap: 2rem;

margin-top: 3rem;
`;
export const Contents = styled.p`
color: ${({ theme }) => theme.color.black[900]};
font-size: ${({ theme }) => theme.fontSize.lg};
`;

export const Image = styled.img`
width: 90rem;
height: 50rem;
width: 80rem;

object-fit: cover;
object-position: center;

@media (width <= 1000px) {
width: 60rem;
height: 30rem;
}
`;
35 changes: 35 additions & 0 deletions frontend/src/components/CoduoDocs/Steps/Steps.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Quote from '@/components/CoduoDocs/Quote/Quote';
import SourceCode from '@/components/CoduoDocs/SourceCode/SourceCode';

import * as S from './Steps.styles';

interface Data {
title?: string;
src?: string;
id?: string;
info?: string;
sourceCode?: string[];
}

interface DocsImageProps {
steps?: Data[];
}

const Steps = ({ steps }: DocsImageProps) => {
return (
<>
{steps?.map((data, index) => {
return (
<S.Container key={index} id={data.id}>
{data.title && <S.Contents>{data.title}</S.Contents>}
{data.info && <Quote text={data.info} />}
{data.src && <S.Image src={data.src} alt={data.id} />}
{data.sourceCode?.map((sourceCode, index) => <SourceCode key={index} code={sourceCode}></SourceCode>)}
</S.Container>
);
})}
</>
);
};

export default Steps;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Header = ({ selectedCategoryName, onButtonClick }: React.PropsWithChildren
<IoIosLink size={theme.fontSize.h6} color={theme.color.primary[700]} />
<p>링크</p>
</S.Container>
<Button size="sm" width="fit-content" rounded={true} onClick={handleButtonClick}>
<Button size="sm" rounded={true} onClick={handleButtonClick}>
{selectedCategoryName}
</Button>
</S.Layout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import { MdClose } from 'react-icons/md';
import styled, { css } from 'styled-components';

export const Layout = styled.div<{ $columns: number }>`
display: flex;
flex-grow: 1;
flex-direction: column;
align-items: ${({ $columns }) => ($columns > 2 ? 'center' : '')};
align-items: ${({ $columns }) => $columns > 2 && 'center'};
gap: 1rem;
overflow-y: auto;

padding: 3rem;
`;

export const EmptyLayout = styled.div`
flex-grow: 1;

height: 0;
padding: 2rem;

color: ${({ theme }) => theme.color.black[400]};
font-size: ${({ theme }) => theme.fontSize.md};
`;

export const List = styled.ul<{ $columns: number }>`
gap: 3rem 0;

Expand All @@ -35,16 +46,6 @@ export const List = styled.ul<{ $columns: number }>`
}
`;

export const EmptyLayout = styled.div`
flex-grow: 1;

height: 0;
padding: 2rem;

color: ${({ theme }) => theme.color.black[400]};
font-size: ${({ theme }) => theme.fontSize.md};
`;

export const Item = styled.div`
display: flex;
flex-direction: column;
Expand All @@ -53,7 +54,7 @@ export const Item = styled.div`

width: 17rem;
height: 20rem;
border: 1px solid ${({ theme }) => theme.color.black[300]};
border: 1px solid ${({ theme }) => theme.color.black[100]};
border-radius: 1.5rem;
`;

Expand All @@ -74,8 +75,8 @@ export const EmptyImage = styled.div`
width: 100%;
height: 10rem;

background-color: ${({ theme }) => theme.color.black[400]};
color: ${({ theme }) => theme.color.black[700]};
background-color: ${({ theme }) => theme.color.black[200]};
color: ${({ theme }) => theme.color.black[300]};
font-size: ${({ theme }) => theme.fontSize.sm};
line-height: 1.3;

Expand Down Expand Up @@ -123,3 +124,24 @@ export const Content = styled.p`
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
`;

export const DeleteButton = styled(MdClose)`
position: absolute;
top: 1rem;
right: 1rem;

width: 2rem;
height: 2rem;
padding: 0.3rem;
border-radius: 100%;

background-color: ${({ theme }) => theme.color.black[900]};
opacity: 0.6;
color: ${({ theme }) => theme.color.black[50]};

cursor: pointer;

&:hover {
opacity: 1;
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Layout = styled.div<{ $isChecked: boolean; $isIconHovered: boolean
padding: 1.6rem;
border-radius: 1rem;

background: ${({ $isChecked, theme }) => ($isChecked ? theme.color.black[300] : theme.color.secondary[200])};
background: ${({ $isChecked, theme }) => ($isChecked ? theme.color.black[200] : theme.color.secondary[100])};
font-size: ${({ theme }) => theme.fontSize.md};

transition: background 0.1s ease;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Link } from 'react-router-dom';
import Button from '@/components/_common/Button/Button';
import { Modal } from '@/components/_common/Modal';

import useClickEnterKey from '@/hooks/_common/customEvent/useClickEnterKey';

import { theme } from '@/styles/theme';

import * as S from './PairRoomCreateModal.styles';
Expand All @@ -13,6 +15,8 @@ interface PairRoomCreateModalProps {
}

const PairRoomCreateModal = ({ isOpen, closeModal }: PairRoomCreateModalProps) => {
const { buttonRef } = useClickEnterKey(isOpen);

return (
<Modal isOpen={isOpen} close={closeModal} size="60rem">
<Modal.Header title="νŽ˜μ–΄λ£Έ 선택" subTitle="μ–΄λ–€ λ°©μ‹μœΌλ‘œ νŽ˜μ–΄λ£Έμ„ λ§Œλ“€κΉŒμš”?" />
Expand All @@ -26,7 +30,7 @@ const PairRoomCreateModal = ({ isOpen, closeModal }: PairRoomCreateModalProps) =
to="/onboarding?mission=true"
aria-label="μ½”λ”©ν•΄λ“€μ˜€κ°€ κΉƒν—ˆλΈŒ λ¦¬ν¬μ§€ν† λ¦¬λ‘œ μ œκ³΅ν•˜λŠ” λ―Έμ…˜κ³Ό ν•¨κ»˜ μ‹œμž‘ν• λž˜μš”"
>
<Button size="lg" width="100%" height="6rem" fontSize={theme.fontSize.lg} color="secondary">
<Button ref={buttonRef} size="lg" width="100%" height="6rem" fontSize={theme.fontSize.lg} color="secondary">
λ―Έμ…˜κ³Ό ν•¨κ»˜ μ‹œμž‘ν• λž˜μš”
</Button>
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import useToastStore from '@/stores/toastStore';

import { getPairRoomExists } from '@/apis/pairRoom';

import useClickEnterKey from '@/hooks/_common/customEvent/useClickEnterKey';
import useInput from '@/hooks/_common/useInput';

interface PairRoomEntryModal {
Expand All @@ -19,7 +20,9 @@ const PairRoomEntryModal = ({ isOpen, closeModal }: PairRoomEntryModal) => {
const navigate = useNavigate();

const { addToast } = useToastStore();

const { value, resetValue, handleChange } = useInput();
const { buttonRef } = useClickEnterKey(isOpen);

const enterPairRoom = async () => {
const { exists } = await getPairRoomExists(value);
Expand Down Expand Up @@ -50,7 +53,7 @@ const PairRoomEntryModal = ({ isOpen, closeModal }: PairRoomEntryModal) => {
<Button size="lg" onClick={closeModal} filled={false}>
λ‹«κΈ°
</Button>
<Button size="lg" disabled={!value} onClick={enterPairRoom}>
<Button ref={buttonRef} size="lg" disabled={!value} onClick={enterPairRoom}>
μ™„λ£Œ
</Button>
</Modal.Footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const PairRoomButton = styled.button<{ $status: PairRoomStatus; $color: '

&:hover::before {
background-position: 105.8% 0;
opacity: 1;
opacity: 0.9;
}

&:hover ${StatusText} {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/PairRoom/GuideModal/GuideModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Modal } from '@/components/_common/Modal';

import useToastStore from '@/stores/toastStore';

import useClickEnterKey from '@/hooks/_common/customEvent/useClickEnterKey';
import useCopyClipBoard from '@/hooks/_common/useCopyClipboard';

import { theme } from '@/styles/theme';
Expand All @@ -27,6 +28,7 @@ const GuideModal = ({ isOpen, close, accessCode }: GuideModalProps) => {
const { addToast } = useToastStore();

const [, onCopy] = useCopyClipBoard();
const { buttonRef } = useClickEnterKey(isOpen);

const checkPermission = () => {
if (Notification.permission !== 'granted') {
Expand Down Expand Up @@ -104,7 +106,7 @@ const GuideModal = ({ isOpen, close, accessCode }: GuideModalProps) => {
<Modal.Footer position="CENTER">
<S.ButtonContainer>
<p>λͺ¨λ‘ ν™•μΈν•˜μ…¨λ‚˜μš”?</p>
<Button width="18rem" size="lg" onClick={close}>
<Button ref={buttonRef} width="18rem" size="lg" onClick={close}>
μ‹œμž‘ν•˜κΈ°
</Button>
</S.ButtonContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ export const Layout = styled.div<{ $isOpen: boolean }>`

transition: min-width 0.3s;
`;

export const Sidebar = styled.div`
overflow: hidden;
`;
10 changes: 4 additions & 6 deletions frontend/src/components/PairRoom/PairListCard/PairListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ const PairListCard = ({ driver, navigator, missionUrl, accessCode }: PairListCar
<S.Layout $isOpen={isOpen} aria-label="νŽ˜μ–΄ λͺ©λ‘">
<PairRoomCard>
<Header isOpen={isOpen} toggleOpen={toggleOpen} />
<S.Sidebar>
<AccessCodeSection isOpen={isOpen} accessCode={accessCode} />
{missionUrl !== '' && <RepositorySection isOpen={isOpen} missionUrl={missionUrl} />}
<PairListSection isOpen={isOpen} driver={driver} navigator={navigator} />
<CompleteRoomButton isOpen={isOpen} openModal={openModal} />
</S.Sidebar>
<AccessCodeSection isOpen={isOpen} accessCode={accessCode} />
{missionUrl !== '' && <RepositorySection isOpen={isOpen} missionUrl={missionUrl} />}
<PairListSection isOpen={isOpen} driver={driver} navigator={navigator} />
<CompleteRoomButton isOpen={isOpen} openModal={openModal} />
</PairRoomCard>
<ConfirmModal
isOpen={isModalOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ const RoleLabel = styled.div`
`;

export const DriverLabel = styled(RoleLabel)`
background-color: ${({ theme }) => theme.color.secondary[600]};
background-color: ${({ theme }) => theme.color.secondary[500]};
`;

export const NavigatorLabel = styled(RoleLabel)`
background-color: ${({ theme }) => theme.color.primary[800]};
background-color: ${({ theme }) => theme.color.primary[600]};
`;

export const DriverText = styled.p`
Expand Down
Loading
Loading