Skip to content

Conversation

@fecapark
Copy link
Collaborator

1️⃣ 어떤 작업을 했나요? (Summary)

SearchBar 컴포넌트를 구현했어요.

2025-01-28.19.19.23.mov

figma: https://www.figma.com/design/gvwhMF6iNkuYKzxipKzkaG/Handy-v1-(demo)?node-id=1789-7208&t=aOdj3XKfL4y7Xgfm-1

변경사항

큰 변경사항들은 없어요. 단순 피처 구현이에요.

2️⃣ 알아두시면 좋아요!

피그마 상에서 모바일 뷰의 SearchBar를 따로 구현해두지는 않았어요.

스크린샷 2025-01-28 19 23 21

모바일뷰 vs 데스크탑뷰 의 차이점은

  • 양 옆 functional 아이콘의 여부
  • clearButton (데스크탑에서도 있을 수 있음)

양 옆 아이콘이 SearchBar 컴포넌트의 맥락에서 많이 벗어난다고 생각해서
이 구현체에서 따로 제공해주지 않고, 사용처에서 구현하는 것으로 책임을 전가했어요.

그리고 제공한다고 하더라도, 화면 렌더링 이후에 발생하는 미디어 쿼리 감지 이펙트 로직으로 두 컴포넌트를 화면 크기에 따라 다르게 렌더링 시켜야 하는데, 저희 쪽에서 이 리소스를 감당하게 되면 사용처에 많은 제약을 줄 것 같아 따로 제공하지 않는 판단을 했어요.

3️⃣ 추후 작업

요청사항 대응

4️⃣ 체크리스트 (Checklist)

  • main 브랜치의 최신 코드를 pull 받았나요?

@nijuy
Copy link
Collaborator

nijuy commented Jan 28, 2025

작업 내용에 대한 코멘트는 아니라서 먼저 달아둡니다!

PR 제목이나 커밋 메시지를 봤을 때, 기존 형식이랑 다르게 작성된 게 눈에 띄어서요.
릴리즈 노트에 PR 제목이 그대로 들어간다는 점에서
의도하신 바가 없다면 일관성 유지를 위해 기존 형식에 맞춰주시면 좋을 거 같아요.

저는 일관성만 유지되면 형식 변경은 상관 없는 쪽이라 이에 대한 얘기를 나눠봐도 좋구용~~

@fecapark
Copy link
Collaborator Author

fecapark commented Jan 28, 2025

@nijuy

feat: 같은 일반적인 컨벤션 케이스들과, ✨ 같은 깃모지 방식에서
직관성 측면에서는 깃모지가 이길 수 밖에 없다고 생각되어요.

여러 케이스별로 깃모지가 나은 전략인지 판단해볼게요.


  1. PR 제목 자체는 히스토리 관리 차원에서 큰 중요도가 있지는 않다고 생각되어서,
    깃모지 혹은 일반 컨벤션 어떤거를 사용해도 괜찮다는 생각입니다.

  2. 그렇다면 히스토리 관리 차원에서의 커밋 메시지인데,
    깃모지를 사용해보면서 텍스트 컨벤션에 비해 굉장히 커밋별 카테고라이징이 쉽더라고요. 이게 깃모지가 직관적이니까 오히려 아토믹 커밋도 이 깃모지에 따라 정확하게 하려는 행동도 생기게 되었고요.

  3. 남은건 커밋 메시지를 보는 리뷰어 입장인데,
    보는 입장에서 (깃모지를 배우는 러닝커브를 제하고 보았을 때) feat, style 등등 보다는 깃모지 방식이 더 직관적이라고 생각돼요.

그래서 저는 러닝커브만 문제가 안된다면 깃모지가 훨씬 더 낫다고 생각하는 입장입니다.


많은 깃모지들 중에서 아래 깃모지만 알면 큰 문제는 없긴해요.
(사실 웬만한 경우에 ✨ 만 사용하긴 해요)

  • 🐛 버그 수정
  • 🔥 파일 제거
  • ✨ 새로운 피처
  • 💄 UI 및 스타일 혹은 마크업
  • ♻️ 리팩토링
  • 💩 추후 제거할 코드 혹은 (테스트 등을 위해) 임시로 작성해놓은 코드
  • 📦 패키지 업뎃

그리고 이 부분들이 어렵다면 커밋 단축어로 pre-commit 시간에 한번에 깃모지를 작성해주는 스크립트를 짤 생각도 있어요.

> git commit -m "s 새로운 피처"
===> ✨ 새로운 피처

> git commit -m "b 버그버그"
===> 🐛 버그버그

Copy link
Collaborator

@nijuy nijuy left a comment

Choose a reason for hiding this comment

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

피그마 상에서 모바일 뷰의 SearchBar를 따로 구현해두지는 않았어요.

네! 관련 내용 자세히 적어주셔서 이해했고, 저도 이 방향에 동의합니다.
아래는 왜 동의하는지에 대한 생각이라 가볍게 읽어만 주시면 될 거 같아요~!

양 옆 아이콘이 SearchBar 컴포넌트의 맥락에서 많이 벗어난다고 생각해서

그러게요
양 옆 아이콘을 property로 두면 피그마에서 화면 설계할 땐 편한데
Search Bar 밖에 있는 아이콘을 굳이 여기서 관리해야.. 할까? 싶엇음

그리고 clearButton을 PC Web에서 사용하지 않은 이유에 대해 혀니가 남긴 코멘트도 봤는데요 (링크)
들어주신 이유가 사실 디자이너마다 의견이 달라질 수 있는 부분이라
지금처럼 사용처에서 clearButton 유무를 결정하는 방식이 더 유연해보이네요

코멘트가 몇 개 있는데, 기능상 문제를 주는 영역은 아니라 어푸룹 해두겠습니다
연휴에 고생 많으셨어요!!!!!!!!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

현재 IcSearchLine만 추가된 상태인데, 아이콘이 추가될 때 Line과 Filled가 각각 두 가지 형태로 제공되어야 할 거 같습니다!
Search Bar에서는 Line 형태만 사용하지만, 디자이너들이 Filled 형태도 핸디에서 사용 가능하다고 인지할 가능성이 클 거 같아서요.

IcSearchFilled도 추가하자고 제안합니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 30 to 40
### SearchBar.CloseButton

SearchBar에 입력된 검색어를 초기화하기 위한 UI 버튼을 제공합니다.<br />

```tsx
import { SearchBar } from '@yourssu/design-system-react';

<SearchBar>
<SearchBar.Input placeholder="검색어를 입력해주세요" />
<SearchBar.CloseButton />
</SearchBar>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### SearchBar.CloseButton
SearchBar에 입력된 검색어를 초기화하기 위한 UI 버튼을 제공합니다.<br />
```tsx
import { SearchBar } from '@yourssu/design-system-react';
<SearchBar>
<SearchBar.Input placeholder="검색어를 입력해주세요" />
<SearchBar.CloseButton />
</SearchBar>;
### SearchBar.ClearButton
SearchBar에 입력된 검색어를 초기화하기 위한 UI 버튼을 제공합니다.<br />
```tsx
import { SearchBar } from '@yourssu/design-system-react';
<SearchBar>
<SearchBar.Input placeholder="검색어를 입력해주세요" />
<SearchBar.ClearButton />
</SearchBar>;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


return (
<StyledContainer ref={ref} {...props} onSubmit={onSubmit}>
<IcSearchLine size="20px" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

IcSearchLine에 color 지정이 필요합니다!

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@fecapark fecapark changed the title ✨ SearchBar 컴포넌트를 구현했어요 feat: SearchBar 컴포넌트를 구현했어요 Jan 28, 2025
@fecapark fecapark merged commit c00d0cf into develop Jan 28, 2025
@nijuy nijuy added the feat label Jan 28, 2025
fecapark added a commit that referenced this pull request Jan 28, 2025
fecapark added a commit that referenced this pull request Jan 28, 2025
* feat: IcSearchLine/Filled 아이콘 추가

* feat: SearchBar 구현

* feat: SearchBar > ClearButton 구현

* docs: SearchBar 문서 작성
fecapark added a commit that referenced this pull request Jan 28, 2025
* feat: IcSearchLine/Filled 아이콘 추가

* feat: SearchBar 구현

* feat: SearchBar > ClearButton 구현

* docs: SearchBar 문서 작성
@nijuy nijuy deleted the searchbar branch January 31, 2025 10:36
@nijuy nijuy restored the searchbar branch January 31, 2025 11:19
@nijuy nijuy deleted the searchbar branch January 31, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants