Skip to content

Feat: 게시물 등록 UI 및 API 연동#57

Merged
hwidung merged 9 commits intodevelopfrom
feat/#56-notice-board-write
May 16, 2025
Merged

Feat: 게시물 등록 UI 및 API 연동#57
hwidung merged 9 commits intodevelopfrom
feat/#56-notice-board-write

Conversation

@hwidung
Copy link
Copy Markdown
Collaborator

@hwidung hwidung commented May 12, 2025

📌 𝗜𝘀𝘀𝘂𝗲𝘀

📎 𝗪𝗼𝗿𝗸 𝗗𝗲𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻

  • 게시물 등록 UI
  • 게시물 등록 API 연동

📷 𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁

2025-05-12.4.46.40.mov

😅 Uncompleted Tasks

  • 남은 API 들 열심히 연결하고 QA 하기...

💬 𝗧𝗼 𝗥𝗲𝘃𝗶𝗲𝘄𝗲𝗿𝘀

정처기 화이팅!

@hwidung hwidung requested a review from t1nm1ksun May 12, 2025 07:47
@hwidung hwidung self-assigned this May 12, 2025
@hwidung hwidung changed the title Feat/#56 게시물 등록 UI 및 API 연동 Feat: 게시물 등록 UI 및 API 연동 May 12, 2025
Copy link
Copy Markdown
Collaborator

@t1nm1ksun t1nm1ksun left a comment

Choose a reason for hiding this comment

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

깔끔하네요 고생하셨습니다!

viewModel.setSideEffect(NoticeBoardWriteContract.NoticeBoardWriteSideEffect.NavigateToBack)
},
writeCompleteButtonClicked = {
// viewModel.setSideEffect(NoticeBoardWriteContract.NoticeBoardWriteSideEffect.NavigateToNoticeBoardList)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이친구는 뭔가요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

어엇;; 안지웠네요... 바로 삭제!!

Comment on lines +104 to +109
Column(
modifier =
modifier
.fillMaxSize()
.padding(paddingValues),
) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

화면 배경색 지정안해줘도 되는 부분일까요??

Comment on lines +52 to +68
postNoticeBoardWriteUseCase(
postNoticeBoardWrite =
PostNoticeBoardWrite(
title = currentState.titleText,
text = currentState.contentText,
likeCount = 0,
isAnonymous = currentState.selectIsAnonymous,
articleKind = currentState.selectCategory?.name.toString(),
articleImages = emptyList(),
anonymous = currentState.selectIsAnonymous,
),
)
if (result.isSuccess) {
setSideEffect(NoticeBoardWriteContract.NoticeBoardWriteSideEffect.NavigateToNoticeBoardList)
} else {
setSideEffect(NoticeBoardWriteContract.NoticeBoardWriteSideEffect.ShowServerErrorToast)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

result가 isSuccess인거랑 저희가 평소에 사용하던 onSuccess랑 뭐가 다를까요?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Result 의 결과 관련 반환 값으로만 생각하고 있었는데,
isSuccess -> 성공 여부만 확인, 조건문으로 명시적 분기
onSuccess -> 성공 시 실행할 코드 블록 작성, 람다 내부 처리
이것이 대표적인 차이점인 것 같아요.

result 의 반환 값을 꺼내야 할 때는 onSuccess 을 써야겠네요.
반면 result을 Unit으로 처리했을 땐, 이 구조가 더 깔끔한 것 같아요!!

Base automatically changed from feat/#44-notice-board-detail to develop May 16, 2025 19:09
@hwidung hwidung merged commit e77b9e3 into develop May 16, 2025
1 check passed
@hwidung hwidung deleted the feat/#56-notice-board-write branch May 16, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 게시글 작성 구현

2 participants