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

[FE] 유저프로필 페이지 css + api요청 (+ 마크다운 라이브러리 변경) #163

Merged
merged 37 commits into from
Aug 31, 2022

Conversation

kimyouknow
Copy link
Contributor

@kimyouknow kimyouknow commented Aug 31, 2022

About

  1. 유저프로필수정 페이지 css
  2. 유저프로필수정 api 요청
  3. 마크다운 라이브러리 변경

Description

1. 유저프로필수정 페이지 css

피그마에 나와있는대로 만들지 않았습니다. 피그마에는 빠진 입력창이 있어 수정했습니다. 필수정보 입력시 필요한 입력창을 기준으로 임의대로 추가했습니다. 추후 피그마가 업데이트되면 반영이 필요합니다.

스토리북은 페이지에서 필요한 mocking 변수(함수, api요청 등등)이 과도하게 필요해 생략했습니다. 추후 mocking 하는 방법을 학습한 뒤 적용할 예정입니다.

2. 유저프로필수정 api 요청

api요청 상에는 문제가 없습니다. (network 탭 양호, spring에러 발생하지 않음, react에러도 발생하지 않음)
하지만 수정 요청 이후에 다시 유저 정보를 조회하면 반영이 되지 않은 문제가 발생했습니다. 추후 백엔드와 논의 후 수정할 부분이 필요하다면 반영이 필요합니다.

결과

유저프로필수정 페이지

스크린샷 2022-08-31 오후 10 51 08

수정 요청 이후 데이터가 최신화되지 않은 에러 결과

123.mov

3. 마크다운 라이브러리 변경

자세한 내용은 노션링크 - 마크다운 에디터 라이브러리 수정을 참고하세요!

기존에 사용하던 라이브러리 - toast ui react-markdown editor 가 다음과 같은 문제가 있어
대체 라이브러리로 변경했습니다. 공식문서 설명도 깔끔하고 codesandbox 예제로 이것저것 태스트해봤는데 잘 되는 것 같아 변경했습니다.

Ref

#161

gnb만큼 padding-top, margin-top 추가
@toast-ui/react-editor -> @uiw/react-md-editor
label, placeholder 구분 및 css 수정
width, height 속성 추가
Select(ul): 위치조정
label, placeholder 구분 및 css 수정
width, height 속성 추가
Select(ul): 위치조정
lable, placholder 구분
get 유저 디테일 정보
post 유저 디테일 정보
@kimyouknow kimyouknow added Feat 기능 FE 프론트 관련 Design css 등 사용자 ui 디자인 변경 labels Aug 31, 2022
@kimyouknow kimyouknow self-assigned this Aug 31, 2022
@kimyouknow kimyouknow changed the title [FE] 유저프로필 페이지 css + api요청 [FE] 유저프로필 페이지 css + api요청 (+ 마크다운 라이브러리 변경) Aug 31, 2022
Copy link
Collaborator

@hoeun0723 hoeun0723 left a comment

Choose a reason for hiding this comment

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

모두 확인 완료 했습니다. 바로 merge 해도 좋을 거 같아요 !

Comment on lines +63 to +91
<S.ProfileImageContainer>
{imageFile ? (
<S.InputTypeImageHandler htmlFor="profileImage">
<S.ImageThunbnail alt="upload" src={URL.createObjectURL(imageFile)} />
<Button
type="button"
theme="secondary"
customStyle={S.ImageEditButton}
onClick={onUploadButtonClick}
>
수정
</Button>
</S.InputTypeImageHandler>
) : (
<S.InputTypeImageHandler htmlFor="profileImage">
<div>
<S.PlusSolid />
</div>
</S.InputTypeImageHandler>
)}
<S.HiddenInputHandler
ref={inputFileRef}
id="profileImage"
name="profileImage"
type="file"
accept="image/*"
onChange={onChangeFile}
/>
</S.ProfileImageContainer>
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 부분이 NewTeamPost 에도 반복되어 코드 작성에 고민을 하고 있는 중이었는데, 이렇게 imageFile 유무에 따른 조건문으로 처리해주면 되겠군요
코드 작성 후 저는 htmlFor에 대하여 좀 더 공부해봐야 할 거 같네요😭
좋은 예시 감사합니다.

이건 그냥 제안인데, 이 부분도 component로 만들면 어떨까요 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

앗 너무 좋습니다! 우선 merge하고 별도 이슈를 생성해서 작업해봐요👍

@kimyouknow kimyouknow merged commit f4d0df5 into develop Aug 31, 2022
@kimyouknow kimyouknow deleted the FE/#161-edit_user_profile_css branch January 10, 2023 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design css 등 사용자 ui 디자인 변경 FE 프론트 관련 Feat 기능
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants