Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class FakeHomeRepository : HomeRepository {
override suspend fun getHomeDashboard(): Result<HomeDashboard> {
return Result.success(
HomeDashboard(
userName = "000",
greetingDescription = "상상은 여기서 현실이 됩니다.\n당신의 프로젝트와 팀을 찾아보세요",
userName = "000님",
greetingDescription = "당신의 포트폴리오 첫 줄이 바뀝니다.\n당신과 딱 맞는 파트너를 찾아줘요",
projectCount = HomeProjectCount(
applyingCount = 3,
participatingCount = 1,
Expand All @@ -22,49 +22,49 @@ class FakeHomeRepository : HomeRepository {
recommendedProjects = listOf(
HomeRecommendedProject(
id = "recommended-ai-planner",
title = "AI 기반 학습 플래너 [0부0부]",
title = "AI 기반 학습 플래너 [0수어부]",
recruitingSummary = "백엔드 개발자 1명 모집",
statusText = "모집 중",
statusText = "모집중",
techStacks = listOf("Back-end"),
participantSummary = "IoT과ㆍ2명, SW과 1명 참여"
participantSummary = "IoT과 2명, SW전공 1명 참여"
),
HomeRecommendedProject(
id = "recommended-hachiware",
title = "하지와레 키우기 [하키]",
title = "하치와레 키우기 [하키]",
recruitingSummary = "프론트엔드 개발자 2명 모집",
statusText = "모집 중",
statusText = "모집중",
techStacks = listOf("Back-end"),
participantSummary = "IoT과ㆍ2명, SW과 1명 참여"
participantSummary = "IoT과 2명, SW전공 1명 참여"
),
HomeRecommendedProject(
id = "recommended-pokemon",
title = "닮은 포켓몬 검사 [포켓몬백]",
recruitingSummary = "iOS 개발자ㆍ1명ㆍ디자이너 1명 모집",
statusText = "마감 임박",
title = "많은 포켓몬 검사 [포켓몬빵]",
recruitingSummary = "iOS 개발자 1명, 디자이너 1명 모집",
statusText = "마감임박",
techStacks = listOf("iOS", "Design"),
participantSummary = "IoT과ㆍ2명, SW과 1명 참여"
participantSummary = "IoT과 2명, SW전공 3명 참여"
)
),
participatingProjects = listOf(
HomeParticipatingProject(
id = "participating-dalbal",
title = "사랑을 이어주는 앱 [달발]",
title = "사람을 이어주는 앱 [달밤]",
myRole = "내 역할 : iOS 개발",
statusText = "진행 중",
teamSummary = "팀원 4명ㆍ마감 2026-05-31"
statusText = "진행중",
teamSummary = "팀원 4명 · 마감 2026-05-31"
)
),
notifications = listOf(
HomeNotification(
id = "notification-message",
type = HomeNotificationType.MESSAGE,
message = "지원한 프로젝트에서 메시지가 있습니다",
message = "지방화 프로젝트에서 메시지가 도착했습니다",
elapsedTime = "2분전"
),
HomeNotification(
id = "notification-join",
type = HomeNotificationType.PROJECT_JOIN,
message = "백엔드 개발자 1명이 프로젝트에 합류 하였습니다",
message = "백엔드 개발자 1명이 프로젝트에 합류했습니다",
elapsedTime = "2분전"
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fun HomeNotificationSection(
) {
Column(modifier = modifier.fillMaxWidth()) {
ItdaSectionHeader(
title = "알림 요약ㆍ확인",
title = "알림 모아 · 확인",
titleFontWeight = FontWeight.Medium
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.it_da.ui.screen.home.state.HomeProjectCountUiModel
import com.example.it_da.domain.model.HomeProjectCount
import com.example.it_da.ui.theme.DotSans
import com.example.it_da.ui.theme.ItdaHomeCardBorderGray
import com.example.it_da.ui.theme.ItdaPrimaryTextColor
Expand All @@ -35,7 +35,7 @@ fun HomeProfileSummarySection(
@DrawableRes profileImageResId: Int,
userName: String,
greetingDescription: String,
projectCount: HomeProjectCountUiModel,
projectCount: HomeProjectCount,
modifier: Modifier = Modifier
) {
Column(modifier = modifier.fillMaxWidth()) {
Expand All @@ -53,7 +53,7 @@ fun HomeProfileSummarySection(

Column {
Text(
text = "안녕하세요, ${userName}님 👋",
text = "안녕하세요, $userName",
color = ItdaPrimaryTextColor,
fontFamily = DotSans,
fontWeight = FontWeight.Bold,
Expand Down Expand Up @@ -83,7 +83,7 @@ fun HomeProfileSummarySection(
// Displays the three count values that summarize the user's project activity.
@Composable
private fun HomeProjectCountCard(
projectCount: HomeProjectCountUiModel,
projectCount: HomeProjectCount,
modifier: Modifier = Modifier
) {
Surface(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.it_da.ui.screen.home.state.ParticipatingProjectUiModel
import com.example.it_da.domain.model.HomeParticipatingProject
import com.example.it_da.ui.screen.home.state.detailText
import com.example.it_da.ui.theme.DotSans
import com.example.it_da.ui.theme.ItdaPrimaryTextColor
import com.example.it_da.ui.theme.ItdaSecondaryTextColor

// Displays one participating project with role and progress text supplied by state.
@Composable
fun ParticipatingProjectCard(
project: ParticipatingProjectUiModel,
project: HomeParticipatingProject,
onProjectClick: (String) -> Unit,
onDetailClick: (String) -> Unit,
modifier: Modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.example.it_da.domain.model.HomeParticipatingProject
import com.example.it_da.ui.component.ItdaSectionHeader
import com.example.it_da.ui.screen.home.state.ParticipatingProjectUiModel

// Shows the user's participating projects with a card type separate from recommendations.
@Composable
fun ParticipatingProjectSection(
projects: List<ParticipatingProjectUiModel>,
projects: List<HomeParticipatingProject>,
onProjectClick: (String) -> Unit,
onDetailClick: (String) -> Unit,
modifier: Modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.it_da.ui.screen.home.state.RecommendedProjectUiModel
import com.example.it_da.domain.model.HomeRecommendedProject
import com.example.it_da.ui.screen.home.state.detailText
import com.example.it_da.ui.theme.DotSans
import com.example.it_da.ui.theme.ItdaPrimaryTextColor
import com.example.it_da.ui.theme.ItdaSecondaryTextColor

// Displays one recommended project with state-provided title, status, stack, and participant text.
@Composable
fun RecommendedProjectCard(
project: RecommendedProjectUiModel,
project: HomeRecommendedProject,
onProjectClick: (String) -> Unit,
onDetailClick: (String) -> Unit,
modifier: Modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.example.it_da.domain.model.HomeRecommendedProject
import com.example.it_da.ui.component.ItdaSectionHeader
import com.example.it_da.ui.screen.home.state.RecommendedProjectUiModel

// Shows the recommended project section with independently clickable project cards.
@Composable
fun RecommendedProjectSection(
projects: List<RecommendedProjectUiModel>,
projects: List<HomeRecommendedProject>,
onProjectClick: (String) -> Unit,
onDetailClick: (String) -> Unit,
modifier: Modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,24 @@ import com.example.it_da.R
import com.example.it_da.domain.model.HomeDashboard
import com.example.it_da.domain.model.HomeNotification
import com.example.it_da.domain.model.HomeNotificationType
import com.example.it_da.domain.model.HomeParticipatingProject
import com.example.it_da.domain.model.HomeProjectCount
import com.example.it_da.domain.model.HomeRecommendedProject
import com.example.it_da.ui.screen.home.state.HomeNotificationUiModel
import com.example.it_da.ui.screen.home.state.HomeProjectCountUiModel
import com.example.it_da.ui.screen.home.state.HomeUiState
import com.example.it_da.ui.screen.home.state.ParticipatingProjectUiModel
import com.example.it_da.ui.screen.home.state.RecommendedProjectUiModel

// Converts domain home dashboard data into UI state for the Home screen.
fun HomeDashboard.toHomeUiState(): HomeUiState {
return HomeUiState(
userName = userName,
profileImageResId = R.drawable.home_profile_placeholder,
greetingDescription = greetingDescription,
projectCount = projectCount.toHomeProjectCountUiModel(),
recommendedProjects = recommendedProjects.map { project ->
project.toRecommendedProjectUiModel()
},
participatingProjects = participatingProjects.map { project ->
project.toParticipatingProjectUiModel()
},
projectCount = projectCount,
recommendedProjects = recommendedProjects,
participatingProjects = participatingProjects,
notifications = notifications.map { notification ->
notification.toHomeNotificationUiModel()
}
)
}

// Converts domain project count data into the count model used by the Home header.
private fun HomeProjectCount.toHomeProjectCountUiModel(): HomeProjectCountUiModel {
return HomeProjectCountUiModel(
applyingCount = applyingCount,
participatingCount = participatingCount,
completedCount = completedCount
)
}

// Converts a domain recommended project into the card model used by the Home UI.
private fun HomeRecommendedProject.toRecommendedProjectUiModel(): RecommendedProjectUiModel {
return RecommendedProjectUiModel(
id = id,
title = title,
recruitingSummary = recruitingSummary,
statusText = statusText,
techStacks = techStacks,
participantSummary = participantSummary
)
}

// Converts a domain participating project into the card model used by the Home UI.
private fun HomeParticipatingProject.toParticipatingProjectUiModel(): ParticipatingProjectUiModel {
return ParticipatingProjectUiModel(
id = id,
title = title,
myRole = myRole,
statusText = statusText,
teamSummary = teamSummary
)
}

// Converts a domain notification into the image-backed model used by the Home UI.
private fun HomeNotification.toHomeNotificationUiModel(): HomeNotificationUiModel {
return HomeNotificationUiModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.it_da.R
import com.example.it_da.domain.model.HomeParticipatingProject
import com.example.it_da.domain.model.HomeProjectCount
import com.example.it_da.domain.model.HomeRecommendedProject
import com.example.it_da.ui.screen.home.component.HomeBottomNavigationBar
import com.example.it_da.ui.screen.home.component.HomeNotificationSection
import com.example.it_da.ui.screen.home.component.HomeProfileSummarySection
import com.example.it_da.ui.screen.home.component.ParticipatingProjectSection
import com.example.it_da.ui.screen.home.component.RecommendedProjectSection
import com.example.it_da.ui.screen.signup.component.SignUpPrimaryButton
import com.example.it_da.ui.screen.signup.component.SignUpTopBar
import com.example.it_da.ui.screen.home.state.HomeNotificationUiModel
import com.example.it_da.ui.screen.home.state.HomeProjectCountUiModel
import com.example.it_da.ui.screen.home.state.HomeUiState
import com.example.it_da.ui.screen.home.state.ParticipatingProjectUiModel
import com.example.it_da.ui.screen.home.state.RecommendedProjectUiModel
import com.example.it_da.ui.theme.ItdaHomeExploreButtonGray
import com.example.it_da.ui.screen.signup.component.SignUpPrimaryButton
import com.example.it_da.ui.screen.signup.component.SignUpTopBar
import com.example.it_da.ui.theme.ITDATheme
import com.example.it_da.ui.theme.ItdaHomeExploreButtonGray

// Assembles the home screen from state-driven sections and button callbacks.
@Composable
Expand Down Expand Up @@ -148,6 +148,8 @@ private fun HomeContent(
text = "프로젝트 탐색하기",
containerColor = ItdaHomeExploreButtonGray
)

Spacer(modifier = Modifier.height(16.dp))
}
}

Expand Down Expand Up @@ -176,47 +178,62 @@ private fun HomeScreenPreview() {
// Supplies preview-only values so the screen can be checked without the ViewModel.
private fun previewHomeUiState(): HomeUiState {
return HomeUiState(
userName = "000",
userName = "000님",
profileImageResId = R.drawable.home_profile_placeholder,
greetingDescription = "상상은 여기서 현실이 됩니다.\n당신의 프로젝트와 팀을 찾아보세요",
projectCount = HomeProjectCountUiModel(
greetingDescription = "당신의 포트폴리오 첫 줄이 바뀝니다.\n당신과 딱 맞는 파트너를 찾아줘요",
projectCount = HomeProjectCount(
applyingCount = 3,
participatingCount = 1,
completedCount = 1
),
recommendedProjects = listOf(
RecommendedProjectUiModel(
HomeRecommendedProject(
id = "recommended-ai-planner",
title = "AI 기반 학습 플래너 [0부0부]",
title = "AI 기반 학습 플래너 [0수어부]",
recruitingSummary = "백엔드 개발자 1명 모집",
statusText = "모집 중",
statusText = "모집중",
techStacks = listOf("Back-end"),
participantSummary = "IoT과 2명, SW전공 1명 참여"
),
HomeRecommendedProject(
id = "recommended-hachiware",
title = "하치와레 키우기 [하키]",
recruitingSummary = "프론트엔드 개발자 2명 모집",
statusText = "모집중",
techStacks = listOf("Back-end"),
participantSummary = "IoT과ㆍ2명, SW과 1명 참여"
participantSummary = "IoT과 2명, SW전공 1명 참여"
),
RecommendedProjectUiModel(
HomeRecommendedProject(
id = "recommended-pokemon",
title = "닮은 포켓몬 검사 [포켓몬백]",
recruitingSummary = "iOS 개발자ㆍ1명ㆍ디자이너 1명 모집",
statusText = "마감 임박",
title = "많은 포켓몬 검사 [포켓몬빵]",
recruitingSummary = "iOS 개발자 1명, 디자이너 1명 모집",
statusText = "마감임박",
techStacks = listOf("iOS", "Design"),
participantSummary = "IoT과ㆍ2명, SW과 1명 참여"
participantSummary = "IoT과 2명, SW전공 3명 참여"
)
),
participatingProjects = listOf(
ParticipatingProjectUiModel(
HomeParticipatingProject(
id = "participating-dalbal",
title = "사랑을 이어주는 앱 [달발]",
title = "사람을 이어주는 앱 [달밤]",
myRole = "내 역할 : iOS 개발",
statusText = "진행 중",
teamSummary = "팀원 4명ㆍ마감 2026-05-31"
statusText = "진행중",
teamSummary = "팀원 4명 · 마감 2026-05-31"
)
),
notifications = listOf(
HomeNotificationUiModel(
id = "notification-message",
imageResId = R.drawable.home_notification_mailbox,
imageDescription = "새 메시지 알림",
message = "지원한 프로젝트에서 새 메시지가 있습니다",
message = "지방화 프로젝트에서 메시지가 도착했습니다",
elapsedTime = "2분전"
),
HomeNotificationUiModel(
id = "notification-join",
imageResId = R.drawable.home_notification_laptop,
imageDescription = "프로젝트 참여 알림",
message = "백엔드 개발자 1명이 프로젝트에 합류했습니다",
elapsedTime = "2분전"
)
)
Expand Down

This file was deleted.

Loading