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

[Feat/#26 ] 댓글 컴포넌트 구현 #32

Merged
merged 17 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 16 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
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-issue.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "✨ Feat"
description: "새로운 기능 추가"
title: "[ Feat ] "
labels: ["feature"]
body:
- type: textarea
Expand All @@ -19,4 +20,4 @@ body:
- type: textarea
attributes:
label: 🙋🏻 참고 자료
description: 참고 자료가 있다면 작성해 주세요.
description: 참고 자료가 있다면 작성해 주세요.
7 changes: 6 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"lineWidth": 120,
"attributePosition": "auto"
},
"organizeImports": { "enabled": true },
"organizeImports": { "enabled": false },
"linter": {
"enabled": true,
"rules": {
Expand All @@ -35,6 +35,11 @@
"level": "warn",
"fix": "safe"
}
},
"style": {
"useImportType": {
"level": "off"
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
"dependencies": {
"@tanstack/react-query": "^5.62.11",
"@vanilla-extract/css": "^1.17.0",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/recipes": "^0.5.5",
"axios": "^1.7.9",
"openapi-typescript": "^7.5.2",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.1.1",
Expand Down
45 changes: 45 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions public/svgs/ic_Ellipse 57.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/svgs/ic_ellipses.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/svgs/ic_message.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/asset/svg/IcEllipse57.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from "react";
import type { SVGProps } from "react";
const SvgIcEllipse57 = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={32}
height={32}
fill="none"
{...props}
>
<circle cx={16} cy={16} r={16} fill="#E4E4E4" />
</svg>
);
export default SvgIcEllipse57;
21 changes: 21 additions & 0 deletions src/asset/svg/IcEllipses.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from "react";
import type { SVGProps } from "react";
const SvgIcEllipses = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={22}
height={22}
fill="none"
{...props}
>
<g
stroke="#222"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
>
<path d="M11 11.875a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75M11 5.75A.875.875 0 1 0 11 4a.875.875 0 0 0 0 1.75M11 18a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75" />
</g>
</svg>
);
export default SvgIcEllipses;
20 changes: 20 additions & 0 deletions src/asset/svg/IcMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from "react";
import type { SVGProps } from "react";
const SvgIcMessage = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={18}
height={18}
fill="none"
{...props}
>
<path
stroke="#BEBEBE"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M5.625 9h.008M9 9h.008m3.367 0h.008M9 15.75a6.75 6.75 0 1 0-6.256-4.212c.06.15.09.225.104.286a.7.7 0 0 1 .019.164c0 .062-.012.13-.034.265l-.445 2.668c-.046.28-.07.42-.026.52a.38.38 0 0 0 .196.197c.101.044.241.02.52-.026l2.669-.445c.135-.022.203-.034.265-.034.06 0 .105.005.164.019s.136.043.286.105c.783.318 1.64.493 2.538.493M6 9a.375.375 0 1 1-.75 0A.375.375 0 0 1 6 9m3.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0m3.375 0A.375.375 0 1 1 12 9a.375.375 0 0 1 .75 0"
/>
</svg>
);
export default SvgIcMessage;
3 changes: 3 additions & 0 deletions src/asset/svg/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export { default as IcEllipse57 } from "./IcEllipse57";
export { default as IcEllipses } from "./IcEllipses";
export { default as IcMessage } from "./IcMessage";
export { default as Plus } from "./Plus";
export { default as React } from "./React";
export { default as Vite } from "./Vite";
113 changes: 113 additions & 0 deletions src/common/component/Comment/Comment.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import { style } from "@vanilla-extract/css";
import { font, semanticColor } from "@style/styles.css";

export const commentContainer = style([
{
position: "relative",
display: "flex",
flexDirection: "column",
width: "33.5rem",
padding: "0.8rem 0rem",
gap: "0.4rem",
},
]);

export const pStyle = style({
padding: "0rem, 1.1rem, 0rem, 4rem",
});

export const containerOptionsIcon = style([
{
position: "absolute",
left: "31.1rem",
top: "0.8rem",
},
]);

export const commentItem = style([
{
display: "flex",
alignItems: "flex-start",
gap: "0.4rem",
},
]);

export const contentContainer = style([
{
flex: 1,
display: "flex",
flexDirection: "column",
gap: "0.4rem",
},
]);

export const header = style([
{
display: "flex",
alignItems: "center",
gap: "0.8rem",
},
]);

export const headerInfo = style([
{
display: "flex",
flexDirection: "column",
},
]);

export const nickname = style([
font.label01,
{
fontWeight: 600,
color: semanticColor.text.assistive,
letterSpacing: "-0.024rem",
},
]);

export const meta = style([
font.label01,
{
color: semanticColor.text.assistive,
fontWeight: 500,
letterSpacing: "-0.024rem",
},
]);

export const text = style([
font.heading03,
{
color: semanticColor.text.normal,
fontWeight: "500",
lineHeight: "2.24rem",
letterSpacing: "-0.16rem",
padding: "0rem 1.1rem 0rem 4rem",
},
]);

export const replyContainer = style([
{
display: "flex",
alignItems: "center",
padding: "0rem 1.1rem 0rem 4rem",
},
]);

export const replyText = style([
font.label01,
{
color: semanticColor.text.assistiveLight,
},
]);

export const icon = style([
{
gap: "0.4rem",
},
]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

p3) replyText와 icon이 항상 함께 사용되는데, 스타일을 따로 분리해서 작성하신 이유가 있을실까요?? 다음과 같이 한 번에 사용하지 않고 따로 사용하신 이유가 있는지 궁금합니다!
스타일이 달라지는 것이 아니라면, 한 번에 사용하는 것이 가독성에 더 좋지 않을까 싶어 남겨봅니다..!

export const replyTextWithIcon = style([
  font.label01,
  {
    display: "flex",
    alignItems: "center",
    gap: "0.4rem",
    color: semanticColor.text.assistiveLight,
    padding: "0rem 1.1rem 0rem 4rem",
  },
]);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오호 처음엔 피그마를 기반으로 replyContainer 하나, 그 안에 답글 이모티콘과 답글쓰기 태그를 따로 보고 구현했습니다!
그런데 예림님 말씀 듣고 보니 저렇게 하는게 훨씬 더 가독성이 좋네요 👏❤️ 관련사항 반영하여 수정했습니다 ! 감사합니다❤️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

반영해서 다른 것들도 수정했씁니다 ❤️❤️


export const profileImage = style({
width: "3.2rem",
height: "3.2rem",
borderRadius: "50%",
});
Loading