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-fe: 평가 필터 팝오버 컴포넌트 구현 #804

Merged
merged 15 commits into from
Oct 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 11, 2024

Original issue description

목적

평가 필터 팝오버 컴포넌트 구현

작업 세부사항

  • 평가 필터 팝오버 컴포넌트 구현

참고 사항

image

아래의 별표줄 밑에 요구사항 ID만 작성해주세요. Prefix 금지!


RATING_FILTER_POPOVER

closes #803

다음과 같은 부분을 봐주시면 좋을 것 같아요!

  1. Popover 공통 컴포넌트를 구현하였습니다.
    PopoverProvider를 Popover 컴포넌트에서만 사용하도록 구현하기 위해서 Popove 내부에 Provider를 사용하신 걸 보실 수 있습니다. 사용자 입장에서 isOpen state를 자유롭게 사용하면서도 Provider를 사용하지 않으면서도 내부 children에는 Prop을 주입하지 않아도 되는 형태를 생각해봤어요!
  2. 스토리북에 action을 적절히 사용해봤습니다! 이 부분은 익히시면 좋은 기능이라고 생각합니다~

@github-actions github-actions bot added feature 새로운 기능 frontend 프론트엔드 labels Oct 11, 2024
Copy link
Contributor Author

1728972223.636189

Copy link
Contributor Author

1728972224.071979

Copy link
Contributor Author

1728972224.040259

Copy link
Contributor Author

1728972234.523699

Copy link
Contributor

@seongjinme seongjinme left a comment

Choose a reason for hiding this comment

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

러기 고생하셨어요! 복잡한 Input 요소를 포함한 컴포넌트를 멋지게 잘 만들어주셔서 감사합니다. 일부 브라우저에서 Slider 드래그 요소가 일그러지는 이슈가 있어서 RC 코멘트를 하나 드렸고, UI 아이디어 차원의 코멘트도 하나 남겨드렸으니 체크를 부탁드릴게요. 👍

appearance: none;

&::-moz-range-thumb {
width: 1.6rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Firefox에서 시험해보면 아래 이미지와 같이 SliderThumb 요소가 찌그러집니다.

image

요 부분에 한해서 width를 1rem으로 맞춰주면 정상적으로 출력되네요 :)

image
Suggested change
width: 1.6rem;
width: 1rem;

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 68 to 71
<Slider
{...sliderProps}
onRangeChange={handleRangeChange}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

현재는 RatingFilter에서 "평가 상태"를 "평가 없음"으로 체크하더라도 평점 범위를 그대로 선택 가능해요. 다만 이 경우엔 평점을 드래그해서 선택하는 일이 무의미하기 때문에, UI 상에서 '평점'을 선택할 수 없다는 것을 명시적으로 드러내도록 Slider 요소를 회색 처리하는 것은 어떨지 제안드려 봅니다. 시급도가 높은 작업은 아니기 때문에 이에 대한 적용 여부는 같이 논의 후 결정하면 좋을 것 같아요 🙏

image

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

@llqqssttyy llqqssttyy left a comment

Choose a reason for hiding this comment

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

popover 리팩토링한 거 너무 좋아요~ 간단한 제안 남겼으니 확인해주세요!

if (!isDisabled) {
const newMinValue = Math.min(Number(e.target.value), Number(maxValue - step));
setMinValue(newMinValue);
onRangeChange(newMinValue, maxValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

새로운 값이 이전 값과 다른 경우에만 핸들러를 실행시켜서 최적화시켜줄 수도 있을 것 같아요~

Suggested change
onRangeChange(newMinValue, maxValue);
if (newMinValue !== minValue) onRangeChange(newMinValue, maxValue);

Copy link
Contributor

@lurgi lurgi Oct 15, 2024

Choose a reason for hiding this comment

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

포매팅을 해주는 input에서는 이게 필수군요.. 한 수 배웠슴당 👍

Copy link
Contributor

@seongjinme seongjinme left a comment

Choose a reason for hiding this comment

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

러기 고생하셨어요! 구현 및 개선 과정에서 여러 실험들을 진행해주시고, 그 과정에서 고민하신 지점과 대응책들을 세세히 공유해주셔서 정말 감사합니다. 기능, 구성, 디자인 측면에서 더 피드백 드릴 내용이 없어 Approve 드리겠습니다. 🙏

@lurgi lurgi merged commit ff9d2a2 into fe/develop Oct 16, 2024
1 check passed
@lurgi lurgi deleted the fe-803-ATING_FILTER_POPOVER branch October 16, 2024 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 새로운 기능 frontend 프론트엔드
Projects
Status: 완료
Development

Successfully merging this pull request may close these issues.

3 participants