-
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
[FE] feat: 형광펜 메뉴 및 툴팁 구현 #874
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
68438f6
refactor: line 관련 변수명 변경 (blockElement -> lineElement)
BadaHertz52 a0b692a
feat: HighlightMenu 컴포넌트 훅 생성 및 기존 관련 코드 변경
BadaHertz52 04f04fb
fix: 하이라이트 적용과 미적용 같이 있을 때, isForwardDrag 값 오류 수정
BadaHertz52 462bb03
refactor: 하이라이트 메뉴 사이즈 관련 변수 수정
BadaHertz52 d817bdd
design: 하이라이트 메뉴 버튼 스타일 변경 (사이즈 조정 및 hover시 배경색 변경)
BadaHertz52 f97f414
fix: 모아보기 페이지- 주관식 답변 개행에도 li marker 표시되는 오류 수정
BadaHertz52 77f76c2
refactor: 하이라이트 메뉴 위치 초기화하는 함수명 변경
BadaHertz52 973daf0
fix: 길게 눌렀을 때 삭제되는 버튼 안 뜨는 오류 수정 및 상태명 변경
BadaHertz52 9eb233e
feat: 형광펜 기능 알려주는 툴팁 구현
BadaHertz52 461f270
chore: 불필요한 콘솔 삭제
BadaHertz52 c1e8346
fix: useMutateHighlight 테스트 오류 수정
BadaHertz52 6228290
design: 형광펜 스위치 버튼 디자인 수정
BadaHertz52 52ca34e
fix: 리뷰 모아보기 데이터 타입 차이로 인한, 형광펜 적용 안되는 오류 수정
BadaHertz52 cd6d8ec
design: EditorLineBlock 스타일 컴포넌트 삭제
BadaHertz52 1ba7d4b
chore: 리뷰 모아보기 목 데이터 변경(형광펜 적용 추가)
BadaHertz52 e92c960
chore: 불필요한 코드 삭제
BadaHertz52 a0bc79a
feat: 리뷰 모아보기- 주관식 답변 Dot 선택되지 않게 처리 및 UndraggableWrapper에 min-width 적용
BadaHertz52 ff817ba
feat: 형광펜 메뉴 위치 - 에디터 상단 넘는지 확인하는 기능 추가
BadaHertz52 067de8d
design: 툴팁 그림자, 문자 졍렬 변경
BadaHertz52 54a3be7
chore: 주석처리 제거
BadaHertz52 cebd3da
chore: sr-only 삭제
BadaHertz52 1447d44
chore: 답변 항목 구문자 alt 빈문자열로 변경
BadaHertz52 693e38a
design: 그림자 폭 수정
BadaHertz52 178f3f6
fix:span 자동 줄넘김 오류 수정
BadaHertz52 04d1129
fix : list 마크와 답변 정렬 안되는 오류 수정 및 마크 이미지 삭제
BadaHertz52 733e4bc
chore: 불필요한 콘솔 삭제
BadaHertz52 aab8168
refactor: block -> line으로 변경
BadaHertz52 465b5bc
fix: 형광펜 더하기 시, endIndex 오류 수정
BadaHertz52 e36b1ae
docs: 리뷰 모아보기 페이지 하이라이트 목 데이터 변경
BadaHertz52 8829c36
style: Syntax에 prettier 적용
BadaHertz52 6a1f189
fix: 글자의 마지막에만 형광펜 칠해지지 않는 오류 수정
BadaHertz52 83e0473
fix: 형광펜 있는 영역을 포함한 여러 답변에서 형광펜 더할 때 offset 오류 수정
BadaHertz52 e133509
refactor: block -> line으로 변경
BadaHertz52 5127a70
chore: 하이라이트 목 핸들러 필요 없는 response 삭제
BadaHertz52 7af6617
fix: 하이라이트 API오류 시, fallback 실행으로 isEditable 세션스토리지 값 삭제되는 오류 수정
BadaHertz52 043d35b
chore: 불필요한 타입(Highlight 삭제)
BadaHertz52 b124bbc
fix: 같은 답변 다른 줄, 드래그 방향 오류 수정
BadaHertz52 2842694
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-r…
BadaHertz52 ec4db4e
fix: 같은 답변 다른 줄 드래그 방향 계산 오류 수정
BadaHertz52 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
frontend/src/components/highlight/components/DragHighlightButtonContainer/index.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
frontend/src/components/highlight/components/EditorLineBlock/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const Line = styled.p` | ||
word-break: break-all; | ||
overflow-wrap: break-word; | ||
white-space: normal; | ||
`; |
44 changes: 6 additions & 38 deletions
44
frontend/src/components/highlight/components/HighlightButton/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 9 additions & 25 deletions
34
frontend/src/components/highlight/components/HighlightButton/style.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { HIGHLIGHT_BUTTON_SIZE } from '@/constants'; | ||
import { Position } from '@/types'; | ||
|
||
export const Button = styled.button<{ $position: Position; $width: number }>` | ||
position: absolute; | ||
top: ${(props) => props.$position.top}; | ||
left: ${(props) => props.$position.left}; | ||
import { HIGHLIGHT_BUTTON_WIDTH } from '@/constants'; | ||
|
||
export const Button = styled.button` | ||
display: flex; | ||
gap: 0.8rem; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
width: ${(props) => `${props.$width / 10}rem`}; | ||
height: ${() => `${HIGHLIGHT_BUTTON_SIZE.height / 10}rem`}; | ||
padding: 0.5rem 0.8rem; | ||
width: ${`${HIGHLIGHT_BUTTON_WIDTH / 10}rem`}; | ||
padding: 0.5rem; | ||
|
||
background-color: ${({ theme }) => theme.colors.white}; | ||
border-radius: ${({ theme }) => theme.borderRadius.basic}; | ||
-webkit-box-shadow: 0 0 ${() => `${HIGHLIGHT_BUTTON_SIZE.shadow / 10}rem`} -0.2rem #343434b8; | ||
box-shadow: 0 0 ${() => `${HIGHLIGHT_BUTTON_SIZE.shadow / 10}rem`} -0.2rem #343434b8; | ||
|
||
&:hover { | ||
background-color: ${({ theme }) => theme.colors.palePurple}; | ||
background-color: ${({ theme }) => theme.colors.lightPurple}; | ||
} | ||
`; | ||
|
||
export const ButtonIcon = styled.img` | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
`; | ||
|
||
export const Color = styled.div` | ||
width: 1.5rem; | ||
height: 1.5rem; | ||
background-color: ${({ theme }) => theme.colors.primary}; | ||
border-radius: 50%; | ||
width: 1.6rem; | ||
height: 1.6rem; | ||
`; |
4 changes: 2 additions & 2 deletions
4
frontend/src/components/highlight/components/HighlightEditor/hooks/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
이 훅이 단순히 형광펜이 쳐진 영역을 리턴하는 게 아니라 형광펜이 쳐진 영역의 범위를 체크하는 훅이라, 이름에 부가적으로 Range 같은 정보가 들어가면 좋겠...지만 지금도 이해하는 데 어려움은 없습니다ㅎㅎ