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 : implemented styling for each state and refactor the code for b… #137

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

SamTheKorean
Copy link
Contributor

@SamTheKorean SamTheKorean commented Jul 13, 2024

…etter readibility

Checklist before merging

  • Link an issue with the pull request
  • Ensure no errors or warnings on the browser console
  • Avoid additional major pushes after approval (if necessary, request a new review)

@SamTheKorean SamTheKorean requested a review from a team as a code owner July 13, 2024 16:36
@SamTheKorean
Copy link
Contributor Author

Screen.Recording.2024-07-13.at.12.37.02.PM.mov

피그마 나온대로 상태별 구현해봤습니다! 의도하신 바와 다른 부분이 있다면 피드백 부탁드리겠습니다~! button-link 컴포넌트에 관한 상태별 스타일링은 header에서는 관여하지 않았습니다!

@SamTheKorean SamTheKorean linked an issue Jul 13, 2024 that may be closed by this pull request
@@ -171,41 +209,30 @@ class Header extends HTMLElement {
<header>
<div class="header-content">
<a href="/">
<img src="images/logo.png" alt="logo" />
<svg id="logo" width="45" height="22" viewBox="0 0 45 22" fill="none" xmlns="http://www.w3.org/2000/svg">
Copy link
Contributor

Choose a reason for hiding this comment

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

어떤 연유로 외부 이미지 파일을 쓰시다가 svg 파일을 embed하시기로 하셨는지 궁금하네요.

Copy link
Contributor Author

@SamTheKorean SamTheKorean Jul 13, 2024

Choose a reason for hiding this comment

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

active일 때 img들 색상을 쉽게 변경해주기 위해서 svg파일로 변경했습니다! img를 다른 이미지로 대체해서 변경해 주는 방법도 있겠지만, 타 button에 있는 이미지들까지 마우스 클릭하는 순간만 잠시 이미지를 변경하는 방식으로하면 코드양이 너무 많아지고 오히려 복잡해지는 것 같아서 svg파일로 사용하고 바로 active 일 때 path에 접근해서 색상을 변경해주는 방식으로 통일했습니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

다시 svg 파일로 빼기로 하셨나 보네요 ㅋ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

구현을 바꾸지는 않았는데, 포멧팅하거나 커밋 정리하는 과정에서 수정돼서 outdated된 것 같습니다...!

Copy link
Contributor

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

항상 스크린 리코딩을 떠서 PR에 넣어주시는 것을 칭찬드리고 싶습니다 💯
덕분에 코드 리뷰가 참 수월한 것 같습니다 :)

components/header.js Outdated Show resolved Hide resolved
components/header.js Outdated Show resolved Hide resolved
@SamTheKorean SamTheKorean force-pushed the sam/135 branch 3 times, most recently from f4e70b9 to 6379c88 Compare July 13, 2024 21:37
Copy link
Contributor

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

포멧팅 관련 문제가 계속 반복되고 있는 것 같은데 차주에 시간 내서 같이 설정을 점검해보시죠!
코드 리뷰 중에 자꾸 포멧팅 관련 코멘트를 드리게 되면 서로 귀중한 시간이 낭비가 될 것 같습니다.

components/header.js Outdated Show resolved Hide resolved
components/header.js Outdated Show resolved Hide resolved
components/header.js Outdated Show resolved Hide resolved
@SamTheKorean
Copy link
Contributor Author

포멧팅 관련 문제가 계속 반복되고 있는 것 같은데 차주에 시간 내서 같이 설정을 점검해보시죠!

코드 리뷰 중에 자꾸 포멧팅 관련 코멘트를 드리게 되면 서로 귀중한 시간이 낭비가 될 것 같습니다.

Prettier가 의도한대로 작동을 안하는 것 같은데 제가 시간내서 점검을 해보고 안되면 피드백 부탁드리겠습니다!

@SamTheKorean SamTheKorean force-pushed the sam/135 branch 4 times, most recently from ed5892a to 0198da2 Compare July 14, 2024 19:09
Comment on lines 131 to 144
&:focus {
outline: 3px solid #846de9;
outline-offset: 2px;
border-radius: 10px;
}

&:focus-visible {
outline: 3px solid #24eaca;
outline-offset: 2px;
border-radius: 10px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

outline에 들어가는 컬러코드 저희 공통 변수로 사용해주시면 더 좋을 것 같아요!
var(--primary)
var(--secondary)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

고쳤습니다! 피드백 감사합니다!

}

&:active svg path {
fill: #160b46;
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도 마찬가지로요~ var(--text-900)

Comment on lines 166 to 187
&:focus {
outline: 3px solid #846de9;
outline-offset: 2px;
border-radius: 10px;
}

&:focus-visible {
outline: 3px solid #24eaca;
outline-offset: 2px;
border-radius: 10px;
}

&:hover {
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
}

&:active svg path {
fill: #846de9;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도 전체적으로 공통변수 적용되어있지 않은 부분 공통변수 사용하는걸로 수정해주시면 더 좋을 것 같습니다~

@SamTheKorean
Copy link
Contributor Author

남겨주신 피드백 전부 반영했습니다!

Copy link
Contributor

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

마침내 Prettier 이슈가 해결되어 정말 다행입니다! :)

@SamTheKorean SamTheKorean merged commit 221c4cf into main Jul 15, 2024
@SamTheKorean SamTheKorean deleted the sam/135 branch July 15, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style links by state in header
3 participants