Skip to content

Commit

Permalink
Merge pull request #151 from Team-Recordy/feature/#150-qa
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook123 authored Jan 5, 2025
2 parents f8845f3 + 2d60230 commit dc63f6d
Show file tree
Hide file tree
Showing 33 changed files with 334 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import coil.request.ImageRequest
import com.record.designsystem.R
import com.record.designsystem.component.badge.RecordyLocationBadge
import com.record.designsystem.component.badge.RecordyExhibitionBadge
import com.record.designsystem.component.icon.ShadowIcon
import com.record.designsystem.theme.Black
import com.record.designsystem.theme.RecordyTheme
Expand Down Expand Up @@ -93,7 +93,7 @@ fun RecordyVideoThumbnail(
contentDescription = "bookmark",
)
}
RecordyLocationBadge(
RecordyExhibitionBadge(
modifier = Modifier
.padding(start = 6.dp, bottom = 10.dp)
.align(Alignment.BottomStart),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package com.record.designsystem.component.badge

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.record.designsystem.R
import com.record.designsystem.theme.RecordyTheme

@Composable
fun RecordyExhibitionBadge(
modifier: Modifier = Modifier,
shape: Shape = RoundedCornerShape(8.dp),
location: String? = null,
isTransparent: Boolean = false,
) {
Row(
modifier = modifier
.background(
color = if (isTransparent) Color.Transparent else RecordyTheme.colors.black50,
shape = shape,
),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
modifier = Modifier
.padding(
start = 8.dp,
top = 5.dp,
bottom = 5.dp,
end = 4.dp,
),
painter = painterResource(id = R.drawable.ic_cursor_16),
contentDescription = "cursor",
tint = RecordyTheme.colors.gray01,
)
if (location != null) {
Text(
modifier = Modifier
.padding(
top = 4.dp,
bottom = 4.dp,
end = 12.dp,
),
text = location,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = RecordyTheme.typography.caption2M,
color = RecordyTheme.colors.white,
textAlign = TextAlign.Center,
)
}
}
}

@Preview
@Composable
fun PreviewExhibitionBadge() {
RecordyTheme {
RecordyExhibitionBadge(location = "강남구 테헤란로 123")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,34 @@ fun RecordyLocationBadge(
),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
modifier = Modifier
.padding(
start = 8.dp,
top = 5.dp,
bottom = 5.dp,
end = 4.dp,
),
painter = painterResource(id = R.drawable.ic_cursor_16),
contentDescription = "cursor",
tint = RecordyTheme.colors.gray01,
)
if (location != null) {
Text(
modifier = Modifier
.padding(
top = 4.dp,
bottom = 4.dp,
end = 12.dp,
top = 7.dp,
bottom = 7.dp,
start = 12.dp,
),
text = location,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = RecordyTheme.typography.caption2M,
style = RecordyTheme.typography.caption1R,
color = RecordyTheme.colors.white,
textAlign = TextAlign.Center,
)
}
Icon(
modifier = Modifier
.padding(
start = 4.dp,
top = 5.dp,
bottom = 5.dp,
end = 8.dp,
),
painter = painterResource(id = R.drawable.ic_angle_16),
contentDescription = "cursor",
tint = RecordyTheme.colors.gray01,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ fun TopNavigationBar(
.align(Alignment.CenterStart)
.customClickable {
popBackStack()
},
}
.padding(16.dp),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fun RecordyVideoText(
color = RecordyTheme.colors.gray01,
)
}
Spacer(modifier = Modifier.height(12.dp))
Spacer(modifier = Modifier.height(30.dp))
}
}
Column(
Expand Down
2 changes: 1 addition & 1 deletion core/designsystem/src/main/res/raw/loading_lotties.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/model/src/main/java/com/record/model/VideoData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data class VideoData(
val content: String,
val videoUrl: String,
val previewUrl: String,
val placeId: Long,
val location: String = "",
val exhibitionName: String,
val uploaderId: Long,
Expand Down
1 change: 1 addition & 0 deletions core/model/src/main/java/com/record/model/VideoType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ enum class VideoType {
BOOKMARK,
MY,
PLACE,
DETAIL,
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ fun ResponseGetVideoDto.toDomain() = VideoData(
content = content,
videoUrl = fileUrl.videoUrl,
previewUrl = fileUrl.thumbnailUrl,
location = "",
placeId = placeId,
location = placeName,
exhibitionName = exhibitionName,
uploaderId = uploaderId,
nickname = uploaderNickname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data class VideoData(
val content: String,
val videoUrl: String,
val previewUrl: String,
val placeId: Long,
val location: String,
val exhibitionName: String,
val uploaderId: Long,
Expand All @@ -23,6 +24,7 @@ fun VideoData.toCore() = com.record.model.VideoData(
content = this.content,
videoUrl = this.videoUrl,
previewUrl = this.previewUrl,
placeId = this.placeId,
location = this.location,
exhibitionName = this.exhibitionName,
uploaderId = this.uploaderId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun ReviewScreen(
isBookmark = item.isBookmark,
onBookmarkClick = { onBookmarkClick(item.id) },
location = item.exhibitionName,
onClick = { onItemClick(VideoType.PLACE, item.id, placeId) },
onClick = { onItemClick(VideoType.DETAIL, item.id, placeId) },
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion feature/home/src/main/java/com/record/home/HomeContract.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data class HomeState(
val isEnd: Boolean = false,
val isPermissionGranted: Boolean = false,
val dataInitialized: Boolean = false,
val showLocationPermissionDialog: Boolean = true,
val showLocationPermissionDialog: Boolean = false,
) : UiState

sealed interface HomeSideEffect : SideEffect {
Expand Down
6 changes: 4 additions & 2 deletions feature/home/src/main/java/com/record/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ private fun ExhibitionContatiner(
onBookmarkClick: (Long) -> Unit = {},
) {
Column(
modifier = modifier,
modifier = modifier
.padding(vertical = 8.dp),
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 16.dp)
.padding(horizontal = 16.dp)
.padding(bottom = if (place.exhibitionRecord.isNullOrEmpty()) 0.dp else 16.dp)
.background(color = RecordyTheme.colors.gray10, shape = RoundedCornerShape(8.dp))
.customClickable {
onItemClick(place.placeId.toLong())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ internal fun MainScreen(
navigateToMypage = navigator::navigateMypage,
popBackStack = navigator::popBackStackIfNotHome,
navigateToProfile = navigator::navigateProfile,
navigateToPlaceDetail = navigator::navigateDetail,
)

mypageNavGraph(
Expand Down
Loading

0 comments on commit dc63f6d

Please sign in to comment.