-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 알림 페이지 UI 구현 및 로직 연결 #153
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
370e5f4
[Add] #145 - 알림 탭 페이징 컨트롤러 ui 구현
JinUng41 e30c60f
[Add] #145 - 알림 탭 셀 및 활동 페이지 UI 구현
JinUng41 a718b27
[Feat] #145 - 앰플리튜드 태그 추가
JinUng41 acb6b25
[Add] #145 - 정보노티 페이지 UI 임시 구현
JinUng41 ebe3517
[Merge] branch 'develop' into feat/#145-notification-ui
JinUng41 61bce48
[Add] #145 - 정보노티 페이지 뷰모델 구현
JinUng41 82275d7
[Chore] #145 - 변수 네이밍 수정 및 개행 삭제
JinUng41 28546e1
[Feat] #145 - 정보 알림 페이지 Mock 레포지토리 구현
JinUng41 34287f9
[Style] #145 - 와블세그먼트컨트롤 폰트 설정
JinUng41 f541137
[Style] #145 - UI 수정
JinUng41 10c2246
[Refactor] #145 - 변수명 변경
JinUng41 2e670e3
[Feat] #145 - String 익스텐션 구현
JinUng41 7386bca
[Refactor] #145 - 활동 알림 셀 바인딩 설정
JinUng41 3970743
[Feat] #145 - 뷰모델 연겲 및 유즈케이스 구현
JinUng41 8df4790
[Delete] #145 - Mock 레포지토리 삭제
JinUng41 b0d6deb
[Chore] #145 - 오타 수정
JinUng41 309a7da
[Refactor] #145 - 약어 네이밍 수정
JinUng41 d3719bd
[Chore] #145 - 마크 주석 추가
JinUng41 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
43 changes: 43 additions & 0 deletions
43
Wable-iOS/Presentation/Notification/Activity/Model/ActivityNotification+.swift
This file contains hidden or 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,43 @@ | ||
| // | ||
| // ActivityNotification+.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by 김진웅 on 3/30/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| extension ActivityNotification { | ||
| var message: String { | ||
| guard let type else { | ||
| return "" | ||
| } | ||
|
|
||
| switch type { | ||
| case .contentLike: | ||
| return "\(triggerUserNickname)님이 \(userNickname)님의 게시물을 좋아합니다." | ||
| case .commentLike: | ||
| return "\(triggerUserNickname)님이 \(userNickname)님의 댓글을 좋아합니다." | ||
| case .comment: | ||
| return "\(triggerUserNickname)님이 댓글을 작성했습니다." | ||
| case .contentGhost: | ||
| return "\(userNickname)님, 작성하신 게시글로 인해 점점 투명해지고 있어요." | ||
| case .commentGhost: | ||
| return "\(userNickname)님, 작성하신 댓글로 인해 점점 투명해지고 있어요." | ||
| case .beGhost: | ||
| return "\(userNickname)님, 투명해져서 당분간 글을 작성할 수 없어요." | ||
| case .actingContinue: | ||
| return "\(userNickname)님, 이제 글을 다시 작성할 수 있어요! 오랜만에 와블에 인사를 남겨주세요!" | ||
| case .userBan: | ||
| return "\(userNickname)님, 신고가 누적되어 작성하신 글이 블라인드 처리되었습니다. 자세한 내용은 문의사항으로 남겨주세요." | ||
| case .popularWriter: | ||
| return "\(userNickname)님이 작성하신 글이 인기글로 선정 되었어요!🥳🥳" | ||
| case .popularContent: | ||
| return "어제 가장 인기있던 글이에요." | ||
| case .childComment: | ||
| return "\(triggerUserNickname)님이 \(userNickname)님에게 대댓글을 작성했습니다." | ||
| case .childCommentLike: | ||
| return "\(triggerUserNickname)님이 \(userNickname)님의 대댓글을 좋아합니다." | ||
| } | ||
| } | ||
| } |
84 changes: 84 additions & 0 deletions
84
Wable-iOS/Presentation/Notification/Activity/Model/ActivityNotificationTriggerType+.swift
This file contains hidden or 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,84 @@ | ||
| // | ||
| // ActivityNotificationTriggerType+.swift | ||
| // Wable-iOS | ||
| // | ||
| // Created by 김진웅 on 3/30/25. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| extension TriggerType.ActivityNotification { | ||
| /// 알림 셀에서 프로필 이미지 뷰를 눌렀을 때, 상호작용이 필요한 경우를 정의합니다. | ||
| /// | ||
| /// 이 Set에 포함된 알림 유형들은 사용자가 프로필 이미지를 탭했을 때 | ||
| /// 해당 사용자의 프로필로 이동하거나 추가 정보를 표시하는 등의 | ||
| /// 인터랙션이 필요한 알림 유형들입니다. | ||
| /// | ||
| /// - 포함된 알림 유형: | ||
| /// - `.commentLike`: 댓글에 좋아요를 받은 경우 | ||
| /// - `.contentLike`: 게시물에 좋아요를 받은 경우 | ||
| /// - `.comment`: 게시물에 댓글을 받은 경우 | ||
| /// - `.childComment`: 댓글에 대댓글을 받은 경우 | ||
| /// - `.childCommentLike`: 대댓글에 좋아요를 받은 경우 | ||
| /// | ||
| /// - Note: 이 Set에 포함되지 않은 알림 유형(예: 시스템 알림)은 | ||
| /// 프로필 이미지 탭 시 아무런 동작을 수행하지 않습니다. | ||
| static let profileInteractionTypes: Set<TriggerType.ActivityNotification> = [ | ||
| .commentLike, | ||
| .contentLike, | ||
| .comment, | ||
| .childComment, | ||
| .childCommentLike | ||
| ] | ||
|
|
||
| /// 알림 셀을 눌렀을 때, 게시물 상세 페이지로 이동해야 하는 경우를 정의합니다. | ||
| /// | ||
| /// 이 Set에 포함된 알림 유형들은 셀을 탭했을 때 관련된 게시물로 이동해야 하는 | ||
| /// 인터랙션이 필요한 알림 유형들입니다. | ||
| /// | ||
| /// - 포함된 알림 유형: | ||
| /// - `.contentLike`: 게시물에 좋아요를 받은 경우 | ||
| /// - `.comment`: 게시물에 댓글을 받은 경우 | ||
| /// - `.commentLike`: 댓글에 좋아요를 받은 경우 | ||
| /// - `.popularContent`: 어제 가장 인기 있었던 글의 경우 | ||
| /// - `.popularWriter`: 인기글로 선정된 경우 | ||
| /// - `.childComment`: 댓글에 대댓글을 받은 경우 | ||
| /// - `.childCommentLike`: 대댓글에 좋아요를 받은 경우 | ||
| /// - `.contentGhost`: 작성한 게시물로 인해 투명도가 낮아진 경우 | ||
| /// - `.commentGhost`: 작성한 댓글로 인해 투명도가 낮아진 경우 | ||
| /// - `.beGhost`: 작성 제한이 되버린 경우 | ||
| static let contentTypes: Set<TriggerType.ActivityNotification> = [ | ||
| .contentLike, | ||
| .comment, | ||
| .commentLike, | ||
| .popularContent, | ||
| .popularWriter, | ||
| .childComment, | ||
| .childCommentLike, | ||
| .contentGhost, | ||
| .commentGhost, | ||
| .beGhost | ||
| ] | ||
|
|
||
| /// 알림 셀을 눌렀을 때, 글쓰기 페이지로 이동해야 하는 경우를 정의합니다. | ||
| /// | ||
| /// 이 Set에 포함된 알림 유형들은 셀을 탭했을 때 글쓰기 게시물로 이동해야 하는 | ||
| /// 인터랙션이 필요한 알림 유형들입니다. | ||
| /// | ||
| /// - 포함된 알림 유형: | ||
| /// - `.actingContinue`: 작성 제한이 풀린 경우 | ||
| static let writeContentTypes: Set<TriggerType.ActivityNotification> = [ | ||
| .actingContinue | ||
| ] | ||
|
|
||
| /// 알림 셀을 눌렀을 때, 구글폼으로 이동해야 하는 경우를 정의합니다. | ||
| /// | ||
| /// 이 Set에 포함된 알림 유형들은 셀을 탭했을 때 구글폼으로 이동해야 하는 | ||
| /// 인터랙션이 필요한 알림 유형들입니다. | ||
| /// | ||
| /// - 포함된 알림 유형: | ||
| /// - `.userBan`: 유저가 밴이 된 경우 | ||
| static let googleFormTypes: Set<TriggerType.ActivityNotification> = [ | ||
| .userBan | ||
| ] | ||
| } |
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.
🛠️ Refactor suggestion
Replace long GitHub URL with a more reliable placeholder.
The hardcoded GitHub URL is lengthy and might expire. Consider using a more permanent placeholder service URL.
private enum Constant { - static let imageURLText: String = "https://private-user-images.githubusercontent.com/80394340/349682631-566a0a8c-c673-4650-b9f4-3b74d7443aa9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDMzODUwNjMsIm5iZiI6MTc0MzM4NDc2MywicGF0aCI6Ii84MDM5NDM0MC8zNDk2ODI2MzEtNTY2YTBhOGMtYzY3My00NjUwLWI5ZjQtM2I3NGQ3NDQzYWE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzMxVDAxMzI0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRiMjJlZDIyOGU2M2E3NTBiMGQyMjUyNWI0MGQxYTk0ZGVkZmIyNWY2ZjY0YjVmZTQxNzdiMzQ0NzkxNTMzNmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.fslk0G5432-vBjha8bXJ6OAcCOusEowIPST_de3arwU" + static let imageURLText: String = "https://picsum.photos/200" }📝 Committable suggestion