-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Refactor] SideNavBar qa 해결 #451
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 ~!! 요고 참고해서 제 PR 머지시킬게요 !
const handleWorkspaceClick = () => { | ||
if (data && data?.data && data?.data?.belongTeamGetResponses.length >= MAX_TEAM_COUNT) { | ||
createToast(`워크스페이스는 최대 ${MAX_TEAM_COUNT}개까지 생성 가능합니다.`, 'error'); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요고는 기디측의 요구사항이였나용 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 8개 이상이 되면 아이콘들이 겹치는 뷰가 나와서 마우스 스크롤 보다는 개수제한이 리소스적으로 나을것 같아서 일단 개수제한을 두기로 했습니다!
해당 이슈 번호
closed #447
체크리스트
📌 내가 알게 된 부분
snb qa 해결했습니다!
💎 PR Point
✅ ToolTip 화살표 빈칸 해결
기존에 툴팁 컴포넌트는 화살표를 svg 파일로 사용해주었습니다. 즉 svg + div 태그의 조합으로 툴팁을 구현했는데 화면을 확대했을 때 소수점 단위의 px 계산의 오차로 1px씩 사이가 벌어지는 버그가 있었습니다.
이 오류를 어떻게 해결해야하나 구글을 떠돌다가 해당 자료에서의 Tooltip 구현 코드를 참고하여 문제를 해결해주었습니다!
after
선택자로 글씨가 담겨있는 툴팁의 몸통의 뒤에 가상요소를 만들어줍니다. 이때content='""'
으로 빈값을 주어 내용이 없는 요소를 만들어줍니다. 이 요소에 border 값을 주면 다음과 같이 상하좌우로 4개의 삼각형이 만들어집니다. (한눈에 파악할 수 있게 각 border에 다른 색상을 주었습니다.)만일 content가 있는 상태라면 사실 border는 이렇게 끝부분이 반 잘려있는 형태의 모습인거죠!
이 삼각형 모양의 border를 이용하여 저희는 툴팁의 화살표를 구현할 수 있습니다.
원하는 크기만큼
borderWidth
값을 줍니다. 그리고 원하는 방향의 삼각형을 제외하고는borderColor
에transparent
속성을 주어 배경과 색이 같게 합니다. 이렇게 만들어진 화살표의 위치를 잘 조정해주면 다음과 같이 툴팁을 구현할 수 있습니다!📌스크린샷 (선택)