-
Notifications
You must be signed in to change notification settings - Fork 6
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]Refactor/#145 UI 조정 및 머지 후 자잘한 오류 수정 #183
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
b32b076
fix: 지도를 클릭하여 핀 추가 시 주소 정보가 입력되지 않던 오류 수정
semnil5202 67a12a2
refactor: 핀 미리보기 상세내용을 3줄까지만 보여주고 ellipsis 하도록 변경
semnil5202 1fcf652
refactor: PinDetail 페이지 및 PinPreview space 수정
semnil5202 8f02f35
refactor: 전반적인 space 수정 및 임시 토픽 생성자명 수정
semnil5202 9f14101
refactor: 토픽카드 띠 어둡게 처리하여 가독성 개선
semnil5202 60eca62
design: 태그 컴포넌트 크기 및 글자크기 조정
semnil5202 c243db9
refactor: 확인 버튼 우측으로 이동 및 기본 이미지 삽입
semnil5202 a109094
refactor: 핀 수정하기 페이지 저장 버튼 우측으로 이동
semnil5202 30a93f7
feat: 각 첫 input 태그에 autoFocus 기능 추가
semnil5202 c01527b
refactor: 핀 주소 입력시 keyDown 이벤트를 감지하여 검색창 띄울 수 있도록 변경
semnil5202 4ffa90f
refactor: tabIndex 적용하여 우측 확인버튼 선택 편리성 고려
semnil5202 f73bed1
refactor: 토픽 공유 기능 추가 및 불필요한 코드 제거
semnil5202 1927776
refactor: 불필요한 import 제거
semnil5202 34dd1bf
refactor: 토픽 추가하기 버튼 포지션 조정
semnil5202 f9fcb8b
refactor: 토픽 카드 그림자 추가 및 띠 투명도 조절
semnil5202 f368f46
rename: Tag 디렉토리 위치 변경
semnil5202 f37bf23
refactor: 링크 복사 alert 메세지 수정
semnil5202 928f36f
design: 불필요한 코드 제거
semnil5202 7b7cd2c
design: 피그마 시안과 맞지 않는 부분 수정
semnil5202 9931b2c
fix: 같이보기 취소 시에 체크 박스가 해제되지 않던 오류 수정
semnil5202 9546e50
refactor: 사용하지 않는 함수 제거 및 멘트 수정
semnil5202 f1182f6
design: 누락된 height 값 추가 및 클릭 영역 확대
semnil5202 fb1e1a4
design: 대체 이미지 기능 구현 및 여백 수정
semnil5202 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 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: 4 additions & 3 deletions
7
frontend/src/components/common/Tag/index.tsx → frontend/src/components/Tag/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
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
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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ import Space from '../components/common/Space'; | |
import Button from '../components/common/Button'; | ||
import Textarea from '../components/common/Textarea'; | ||
import { postApi } from '../utils/postApi'; | ||
import { FormEvent, useContext, useEffect, useState } from 'react'; | ||
import { FormEvent, useContext, useEffect, useRef, useState } from 'react'; | ||
import { getApi } from '../utils/getApi'; | ||
import { getAddress } from '../utils/getAddress'; | ||
import { TopicType } from '../types/Topic'; | ||
|
@@ -32,6 +32,7 @@ const NewPin = () => { | |
images: [], | ||
}); | ||
const { routePage } = useNavigator(); | ||
const addressRef = useRef<HTMLInputElement | null>(null); | ||
|
||
const goToBack = () => { | ||
routePage(-1); | ||
|
@@ -41,7 +42,7 @@ const NewPin = () => { | |
await postApi('/pins', { | ||
topicId: topic?.id || 'error', | ||
name: formValues.name, | ||
address: formValues.address, | ||
address: addressRef.current?.value, | ||
description: formValues.description, | ||
latitude: clickedCoordinate.latitude, | ||
longitude: clickedCoordinate.longitude, | ||
|
@@ -76,10 +77,6 @@ const NewPin = () => { | |
onComplete: async function (data: any) { | ||
const addr = data.roadAddress; // 주소 변수 | ||
|
||
setFormValues((prev) => { | ||
return { ...prev, address: addr }; | ||
}); | ||
|
||
//data를 통해 받아온 값을 Tmap api를 통해 위도와 경도를 구한다. | ||
const { ConvertAdd } = await getAddress( | ||
`https://apis.openapi.sk.com/tmap/geo/convertAddress?version=1&format=json&callback=result&searchTypCd=NtoO&appKey=P2MX6F1aaf428AbAyahIl9L8GsIlES04aXS9hgxo&coordType=WGS84GEO&reqAdd=${addr}`, | ||
|
@@ -155,6 +152,8 @@ const NewPin = () => { | |
value={formValues.name} | ||
onChange={onChangeInput} | ||
placeholder="지도를 클릭하거나 장소의 이름을 입력해주세요." | ||
autoFocus={true} | ||
tabIndex={1} | ||
/> | ||
</section> | ||
|
||
|
@@ -174,9 +173,11 @@ const NewPin = () => { | |
<Input | ||
name="address" | ||
readOnly | ||
value={clickedCoordinate.address ?? formValues.address} | ||
onChange={onChangeInput} | ||
value={clickedCoordinate.address} | ||
onClick={onClickAddressInput} | ||
onKeyDown={onClickAddressInput} | ||
Comment on lines
+176
to
+178
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 와우 탭 된 후에 사용자가 키보드로 입력할 경우까지 생각해 onKeyDown을...굿굿! |
||
ref={addressRef} | ||
tabIndex={2} | ||
placeholder="지도를 클릭하거나 장소의 위치를 입력해주세요." | ||
/> | ||
</section> | ||
|
@@ -199,17 +200,25 @@ const NewPin = () => { | |
value={formValues.description} | ||
onChange={onChangeInput} | ||
placeholder="장소에 대한 의견을 자유롭게 남겨주세요." | ||
tabIndex={3} | ||
/> | ||
</section> | ||
|
||
<Space size={6} /> | ||
|
||
<Flex $justifyContent="end"> | ||
<Button variant="primary">추가하기</Button> | ||
<Space size={3} /> | ||
<Button type="button" variant="secondary" onClick={goToBack}> | ||
<Button | ||
tabIndex={5} | ||
type="button" | ||
variant="secondary" | ||
onClick={goToBack} | ||
> | ||
취소하기 | ||
</Button> | ||
<Space size={3} /> | ||
<Button tabIndex={4} variant="primary"> | ||
추가하기 | ||
</Button> | ||
</Flex> | ||
</Flex> | ||
</form> | ||
|
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.
세인 혹시 이 부분은 blur처리 관련해서 추가된 코드일까요?!!
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.
네 맞습니다 블러 처리 뒤에 검은 배경입니다. 따라서 기존의 블러 효과를 유지하면서 배경을 어둡게하고 글씨를 흰색으로 바꿔서 좀 더 잘 보이도록 했습니다.