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

impl document viewer page #83

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open

Conversation

sparcscasio
Copy link
Contributor

@sparcscasio sparcscasio commented Jan 24, 2025

요약 *

It closes #82

스크린샷

image

생각해보니 페이지를 /example/casio로 만들고 있었네요..?
작업 끝나면 파일 위치 변경 예정

"use client";

import TimelineTable from "@sparcs-students/web/features/document/components/TimelineTable";

const CompoenentPage: React.FC = () => {
  const mockTimeLine = [
    {
      startDate: new Date("2025-01-24"),
      endDate: new Date("2025-01-28"),
      content: "집행운영회 운영",
    },
    {
      startDate: new Date("2025-01-24"),
      endDate: new Date("2025-01-28"),
      content: "메모가 있는 경우",
      memo: "기이이이이ㅣ이이이이이ㅣ이이ㅣ이이이이이ㅣ이이ㅣ이이이이이ㅣ이이ㅣ이이이이이ㅣ이이ㅣ이이이이이ㅣ이이인메모",
    },
  ];

  return <TimelineTable contents={mockTimeLine} />;
};

export default CompoenentPage;

이후 Task *

  • table 구현하기

@sparcscasio sparcscasio added enhancement New feature or request frontend labels Jan 24, 2025
@sparcscasio sparcscasio self-assigned this Jan 24, 2025
@sparcscasio sparcscasio changed the title feat: impl text area, scroll, index impl document viewer page Jan 24, 2025
Comment on lines 29 to 33
const RowWrapper = styled.div`
display: flex;
flex-direction: row;
gap: 60px;
`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 flexwrapper로 대체 가능할 것 같아요

Comment on lines 35 to 40
const TitleWrapper = styled.div`
display: flex;
flex-direction: column;
gap: 10px;
padding-bottom: 48px;
`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 flexwrapper로 쓰고 padding 대신 아래에 있는 컴포넌트랑 gap 가지게 묶어주세요

Comment on lines 72 to 74
{ name: "카테고리", path: "/category" },
{ name: "서브카테고리", path: "/category/subcategory" },
{ name: "상세 페이지", path: "/category/subcategory/detail" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사업명 까지는 못 맞춰도 예결산 조회 / 사업 계획서 까지는 맞춰주세요

/>
<TextAreaWithHeader header="사업 일시" contents={["contents1"]} />
</RowWrapper>
<div ref={thirdRow}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rowwrapper 쓰다가 중간에 div로 바뀐 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 맨 위에 주석으로 어떤 컴포넌트인지 메모 남겨주면 좋을 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/features/report 로 옮겨주세요

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 /features/report 로 옮겨주세요

@sparcscasio sparcscasio marked this pull request as ready for review January 24, 2025 14:54
Comment on lines +31 to +35
const RowWrapper = styled.div`
display: flex;
flex-direction: row;
gap: 60px;
`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 flexwrapper로 대체하는거 수정 안 됐어요

Comment on lines +81 to +104
{/* <TableHeader>
<TableCell type="Header" width="60px">
번호
</TableCell>
<TableCell type="Header" width="260px">
날짜
</TableCell>
<TableCell type="Header" width="302px">
내용
</TableCell>
<TableCell type="Header" width="170px">
비고
</TableCell>
</TableHeader>
{contents.map((elm, index) => (
<React.Fragment key={index}>
<TableRow isLast={index === contents.length - 1}>
<TableCell type="Default" width="60px">
{index + 1}
</TableCell>
<TableCell
type="Default"
width="260px"
>{`${formatDate(elm.startDate)} - ${formatDate(elm.endDate)}`}</TableCell>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 왜 주석처리 된건가요?

Comment on lines +99 to +134
<ContentsArea>
<RowWrapper ref={firstRow}>
<TextAreaWithHeader header="사업명" contents={["contents1"]} />
<TextAreaWithHeader header="사업 개요" contents={["contents1"]} />
</RowWrapper>
<RowWrapper ref={secondRow}>
<TextAreaWithHeader
header="사업 준비 기간"
contents={["contents1"]}
/>
<TextAreaWithHeader header="사업 일시" contents={["contents1"]} />
</RowWrapper>
<RowWrapper ref={thirdRow}>
<TextAreaWithHeader
header="담당부서 / 담당자"
contents={["contents1", "contents2"]}
/>
</RowWrapper>
<RowWrapper ref={fourthRow}>
<TextAreaWithHeader
header="사업 추진 목적"
contents={["contents1"]}
/>
</RowWrapper>
<RowWrapper ref={fifthRow}>
<TextAreaWithHeader
header="사업 수혜 대상자"
contents={["contents1"]}
/>
</RowWrapper>
<RowWrapper ref={sixthRow}>
<TextAreaWithHeader
header="세부 사업 내용"
contents={["contents1"]}
/>
</RowWrapper>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 mapping 해서 좀 더 깔끔하게 쓸 수 있을 것 같아요

Comment on lines +44 to +50
const firstRow = useRef<HTMLDivElement>(null);
const secondRow = useRef<HTMLDivElement>(null);
const thirdRow = useRef<HTMLDivElement>(null);
const fourthRow = useRef<HTMLDivElement>(null);
const fifthRow = useRef<HTMLDivElement>(null);
const sixthRow = useRef<HTMLDivElement>(null);
const seventhRow = useRef<HTMLDivElement>(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

각각 무슨 내용 가리키는지 변수 이름에 나타나면 좋을 것 같아요

</Typography>
<TimelineTable contents={mockTimeLine} />
</RowWrapper>
<TableArea />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 따로 컴포넌트 안 만들고 주석 한 줄 남겨도 될 것 같아요

Comment on lines +29 to +31
fs={24}
lh={24}
fw="REGULAR"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 실제로 보니까 꽤 큰 것 같은데 디자이너 확인 필요할 것 같아요 @ChaeyeonAhn
스크린샷 2025-02-03 오후 4 35 53

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네! 24 말고 20 어떠신가요..! 디자인도 수정해 놓겠습니다

스크린샷 2025-02-03 오후 11 02 03 스크린샷 2025-02-03 오후 11 02 13

`;

const BreadCrumb: React.FC<BreadCrumbProps> = ({
items,
enableLast = false,
}) => {
const itemsWithMain = [{ name: "메인", path: "/" }, ...items];
const itemWithMain: BreadCrumbItemDetails[] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변수명 그대로 itemsWithMain이 적절할 것 같아요

Comment on lines +161 to +163
const style = rowStyleResolver
? rowStyleResolver(row.original)
: undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 어떤 prop인지 주석 남겨주세요


const TextAreaWithHeader: React.FC<TextAreaProps> = ({ header, contents }) => (
<TextAreaWithHeaderWrapper>
<div>{header}</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여긴 왜 div 쓴건가요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

impl document viewer page
3 participants