Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3cb5c63
refactor: Standardize navigation parameter names
AsmaaKhaledGomaa Aug 20, 2025
716c25c
refactor: Reorder parameters and adjust padding in media components
AsmaaKhaledGomaa Aug 20, 2025
e69bb1c
refactor: Standardize `onBack` and `onManageBookmark` method names
AsmaaKhaledGomaa Aug 20, 2025
4febbbd
refactor: Rename onManageBookmarkClicked to onManageBookmarkClick
AsmaaKhaledGomaa Aug 20, 2025
e066475
refactor: Update SearchScreen and MyRatingScreen UI
AsmaaKhaledGomaa Aug 20, 2025
b2cce6d
refactor: Rename ActorsLayout to ActorLazyVerticalColumn and update u…
AsmaaKhaledGomaa Aug 20, 2025
0f2f791
refactor: Remove deprecated `MoviesLayOut` and `TvShowLayOut` composable
AsmaaKhaledGomaa Aug 20, 2025
51b4aa7
refactor: Replace MediaLazyGrid with MediaLazyVerticalGrid
AsmaaKhaledGomaa Aug 20, 2025
46eba7e
refactor: Remove deprecated MediaLazyGrid
AsmaaKhaledGomaa Aug 20, 2025
36b2103
Merge remote-tracking branch 'origin/develop' into refactor/delete-ol…
AsmaaKhaledGomaa Aug 20, 2025
ea15d09
refactor: Apply consistent styling for BackgroundGradient
AsmaaKhaledGomaa Aug 20, 2025
e911fe5
refactor: Use MediaLazyVerticalGrid and update contract names
AsmaaKhaledGomaa Aug 20, 2025
47d9ce9
refactor: Standardize item click handling in MediaLazyVerticalGrid an…
AsmaaKhaledGomaa Aug 20, 2025
22085e5
refactor: Apply `detailsTopBar` modifier to top bars
AsmaaKhaledGomaa Aug 20, 2025
e489f22
refactor: Remove DefaultAppTopBar and use TopBar directly
AsmaaKhaledGomaa Aug 20, 2025
5f2e6a3
refactor: Use DesignSystem TopBar and add padding
AsmaaKhaledGomaa Aug 20, 2025
f3bee9e
refactor: Use design system TopBar in TopMoviesPicksScreen and TopTvS…
AsmaaKhaledGomaa Aug 20, 2025
3879a77
fix: Adjust vertical padding in TrendingTvShowsScreen
AsmaaKhaledGomaa Aug 20, 2025
5947499
fix: Adjust padding in SearchScreen and MediaLazyVerticalGrid
AsmaaKhaledGomaa Aug 20, 2025
f68ac2a
Merge remote-tracking branch 'origin/develop' into refactor/delete-ol…
AsmaaKhaledGomaa Aug 20, 2025
c30f735
refactor: Delete unused MediaLazyPagingGrid
AsmaaKhaledGomaa Aug 20, 2025
d275507
refactor: Remove redundant padding and apply in MediaLazyVerticalGrid
AsmaaKhaledGomaa Aug 20, 2025
b5679c6
fix: Correct TrendingActorsScreen title
AsmaaKhaledGomaa Aug 20, 2025
b19ac15
refactor: Simplify ActorsGalleryScreen structure
AsmaaKhaledGomaa Aug 20, 2025
256f7d7
refactor: Update string resource and padding in MovieDetailsScreen
AsmaaKhaledGomaa Aug 20, 2025
060887e
Branch was auto-updated.
london-bot[bot] Aug 20, 2025
957a244
Merge remote-tracking branch 'origin/develop' into refactor/delete-ol…
AsmaaKhaledGomaa Aug 20, 2025
24db01f
refactor: Conditionally render TvShowDetailScreen sections
AsmaaKhaledGomaa Aug 20, 2025
16da64c
Merge remote-tracking branch 'origin/refactor/delete-old-composable' …
AsmaaKhaledGomaa Aug 20, 2025
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 @@ -266,22 +266,22 @@ private fun NavGraphBuilder.trendingNavGraph(navController: NavHostController) =

composable<TrendingMovies> {
TrendingMoviesScreen(
onNavigateToMovieDetailsClick = ::navigateToMovieDetails,
onNavigateBackClick = ::navigateUp
onNavigateToMovieDetails = ::navigateToMovieDetails,
onNavigateBack = ::navigateUp
)
}

composable<TrendingTvShows> {
TrendingTvShowsScreen(
onNavigateToTvShowDetailsClick = ::navigateToTvShowDetails,
onNavigateToTvShowDetails = ::navigateToTvShowDetails,
onNavigateBack = ::navigateUp
)
}

composable<TrendingActors> {
TrendingActorsScreen(
onNavigateToActorDetailsClick = ::navigateToActorDetails,
onNavigateBackClick = ::navigateUp
onNavigateToActorDetails = ::navigateToActorDetails,
onNavigateBack = ::navigateUp
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private fun ButtonTopBar(

@Composable
@ThemePreviews
private fun TopBarPreview() {
private fun Preview() {
TopBar(
onClickOption1 = {},
onClickOption2 = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ private fun Content(

Box(
modifier = Modifier.fillMaxSize()
){
) {
BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
modifier = Modifier
.align(Alignment.TopStart)
.zIndex(1f)
)

Column(Modifier.navBarBottomPadding()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import com.london.presentation.shared.base.ErrorState
import com.london.presentation.shared.buildscreen.BuildScreen
import com.london.presentation.shared.container.MediaLazyVerticalGrid
import com.london.presentation.utils.Listen
import com.london.presentation.utils.detailsTopBar
import com.london.presentation.utils.toLocalizedNumbers
import com.london.designsystem.R as dsR

Expand Down Expand Up @@ -92,19 +93,18 @@ private fun Content(

Column(
modifier = Modifier.fillMaxSize()

) {
TopBar(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 12.dp),
modifier = Modifier.detailsTopBar(1f),
title = stringResource(R.string.my_rating),
onBackClick = contract::onBackClick
)

RatingChipsRow(
selected = selectedCategory,
onSelect = contract::onRatingCategorySelected,
modifier = Modifier.padding(bottom = 12.dp)
modifier = Modifier.padding(vertical = 12.dp)
)

if (items.isEmpty()) {
Expand All @@ -117,10 +117,8 @@ private fun Content(
items = items,
imageUrl = { it.posterPath },
name = { it.title },
rate = { rated -> rated.rating.toLocalizedNumbers() },
hasSaveIcon = false,
isItemSaved = { false },
onSaveClick = {},
rate = { rated -> rated.rating.toLocalizedNumbers() },
onDeleteClick = { rated ->
when (rated.mediaType) {
MediaType.Movie -> contract.onDeleteMovieClick(rated.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ private fun Content(
) {

BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
modifier = Modifier
.align(Alignment.TopStart)
.zIndex(1f)
)

Image(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ private fun Content(

Box(
modifier = Modifier.fillMaxSize()
){
) {
BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
modifier = Modifier
.align(Alignment.TopStart)
.zIndex(1f)
)

Column(Modifier.navBarBottomPadding()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.london.presentation.feature.category.movie

interface MovieCategoryContract {
fun onBack()
fun onBackClick()
fun onMovieClick(movieId: Int)
fun onBookmarkSheetDismiss()
fun onManageBookmarkClicked(movieId: Int)
fun onManageBookmarkClick(movieId: Int)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.london.presentation.feature.category.movie

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand All @@ -21,10 +20,11 @@ import com.london.designsystem.component.TopBar
import com.london.designsystem.theme.ThemePreviews
import com.london.presentation.R
import com.london.presentation.shared.BackgroundGradient
import com.london.presentation.shared.MediaLazyPagingGrid
import com.london.presentation.shared.bookmarkSheet.BookmarkBottomSheet
import com.london.presentation.shared.buildscreen.BuildScreen
import com.london.presentation.shared.container.MediaLazyVerticalGrid
import com.london.presentation.utils.Listen
import com.london.presentation.utils.detailsTopBar
import com.london.presentation.utils.isLoading

@Composable
Expand Down Expand Up @@ -58,55 +58,50 @@ private fun Content(
) {

val moviesLazyList = state.moviesFlow.collectAsLazyPagingItems()

BuildScreen(
onBack = contract::onBack,
onBack = contract::onBackClick,
isLoading = moviesLazyList.isLoading(),
isError = moviesLazyList.loadState.refresh is LoadState.Error,
onRetry = moviesLazyList::refresh,
emptyLayoutMessage = R.string.there_is_no_items_for_this_genre,
emptyLayoutImage = R.drawable.empty
) {

Box(
modifier = Modifier.fillMaxSize()
){
) {
BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
modifier = Modifier
.align(Alignment.TopStart)
.zIndex(1f)
)

Column(
modifier = Modifier
.fillMaxSize()
.padding(top = 12.dp)
) {
TopBar(
title = stringResource(
state.genre.stringResId
),
onBackClick = contract::onBack,
modifier = Modifier.padding(start = 16.dp, end = 16.dp, bottom = 12.dp)
)
MediaLazyVerticalGrid(
pagingItems = moviesLazyList,
imageUrl = { it.posterUrl },
name = { it.name },
hasSaveIcon = true,
onSaveClick = { contract.onManageBookmarkClick(it.id) },
isItemSaved = { false },
onNavigateToMovie = { id -> contract.onMovieClick(id) },
topBar = {
TopBar(
modifier = Modifier
.detailsTopBar(1f)
.padding(bottom = 12.dp),
title = stringResource(state.genre.stringResId),
onBackClick = contract::onBackClick
)
},
modifier = Modifier.fillMaxWidth()
)

MediaLazyPagingGrid(
pagingFlow = moviesLazyList,
onItemClick = { contract.onMovieClick(it.id) },
getImageUrl = { it.posterUrl },
getTitle = { "${it.name} movie img" },
modifier = Modifier
.weight(1f)
.fillMaxWidth()
.padding(horizontal = 16.dp),
onSaveClick = { contract.onManageBookmarkClicked(it.id) },
isItemSaved = { false },
hasSaveIcon = true
)
BookmarkBottomSheet(
onSheetDismiss = contract::onBookmarkSheetDismiss,
isSheetVisible = state.isBookmarkSheetVisible,
bookmarkedMovieId = state.bookmarkedMovieId
)

BookmarkBottomSheet(
onSheetDismiss = contract::onBookmarkSheetDismiss,
isSheetVisible = state.isBookmarkSheetVisible,
bookmarkedMovieId = state.bookmarkedMovieId
)
}
}
}
}
Expand All @@ -119,8 +114,8 @@ private fun MoviesByCategoryContentPreview() {
contract = object : MovieCategoryContract {
override fun onMovieClick(movieId: Int) {}
override fun onBookmarkSheetDismiss() {}
override fun onManageBookmarkClicked(movieId: Int) {}
override fun onBack() {}
override fun onManageBookmarkClick(movieId: Int) {}
override fun onBackClick() {}
},
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class MovieCategoryViewModel @Inject constructor(
override fun onMovieClick(movieId: Int) =
emitEffect(MovieCategoryEffect.MovieDetailsNavigation(movieId = movieId))

override fun onBack() =
override fun onBackClick() =
emitEffect(MovieCategoryEffect.BackNavigation)

override fun onManageBookmarkClicked(movieId: Int) {
override fun onManageBookmarkClick(movieId: Int) {
updateState {
copy(
isBookmarkSheetVisible = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.london.presentation.feature.category.tvshow

interface TvShowCategoryContract {
fun onBack()
fun onBackClick()
fun onSavedClick(tvShowId: Int)
fun onTvShowClick(tvShowId: Int)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.london.presentation.feature.category.tvshow

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand All @@ -21,9 +20,10 @@ import com.london.designsystem.component.TopBar
import com.london.designsystem.theme.ThemePreviews
import com.london.presentation.R
import com.london.presentation.shared.BackgroundGradient
import com.london.presentation.shared.MediaLazyPagingGrid
import com.london.presentation.shared.buildscreen.BuildScreen
import com.london.presentation.shared.container.MediaLazyVerticalGrid
import com.london.presentation.utils.Listen
import com.london.presentation.utils.detailsTopBar
import com.london.presentation.utils.isLoading

@Composable
Expand Down Expand Up @@ -58,47 +58,39 @@ private fun Content(

val tvShowLazyList = state.tvShowFlow.collectAsLazyPagingItems()
BuildScreen(
onBack = contract::onBack,
onBack = contract::onBackClick,
isLoading = tvShowLazyList.isLoading(),
isError = tvShowLazyList.loadState.refresh is LoadState.Error,
onRetry = tvShowLazyList::refresh,
emptyLayoutMessage = R.string.there_is_no_items_for_this_genre,
emptyLayoutImage = R.drawable.empty
) {

Box(
modifier = Modifier.fillMaxSize()
){
) {
BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
)

Column(
modifier = Modifier
.fillMaxSize()
.padding(top = 12.dp)
) {
TopBar(
title = stringResource(
state.genre.stringResId
),
onBackClick = contract::onBack,
modifier = Modifier.padding(start = 16.dp, end = 16.dp, bottom = 12.dp)
)
.align(Alignment.TopStart)
.zIndex(1f)
)

MediaLazyPagingGrid(
pagingFlow = tvShowLazyList,
onItemClick = { contract.onTvShowClick(it.id) },
getImageUrl = { it.posterPicture },
getTitle = { "${it.name} tv show img" },
modifier = Modifier
.weight(1f)
.fillMaxWidth()
.padding(horizontal = 16.dp),
onSaveClick = { /* TODO: Implement save functionality */ },
isItemSaved = { false },
)
}
MediaLazyVerticalGrid(
pagingItems = tvShowLazyList,
imageUrl = { it.posterPicture },
name = { it.name },
hasSaveIcon = false,
onNavigateToTvShow = { id -> contract.onTvShowClick(id) },
topBar = {
TopBar(
modifier = Modifier
.detailsTopBar(1f)
.padding(bottom = 12.dp),
title = stringResource(state.genre.stringResId),
onBackClick = contract::onBackClick
)
},
modifier = Modifier.fillMaxWidth()
)
}
}
}
Expand All @@ -112,7 +104,7 @@ private fun Preview() {
contract = object : TvShowCategoryContract {
override fun onSavedClick(tvShowId: Int) {}
override fun onTvShowClick(tvShowId: Int) {}
override fun onBack() {}
override fun onBackClick() {}
}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TvShowCategoryViewModel @Inject constructor(
override fun onTvShowClick(tvShowId: Int) =
emitEffect(TvShowCategoryEffect.TvShowDetailsNavigation(tvShowId = tvShowId))

override fun onBack() =
override fun onBackClick() =
emitEffect(TvShowCategoryEffect.BackNavigation)

override fun onSavedClick(tvShowId: Int) = Unit //TODO("Save Tv Show Not yet implemented")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ private fun Content(
) {

BackgroundGradient(
modifier = Modifier.align(Alignment.TopStart).zIndex(1f)
modifier = Modifier
.align(Alignment.TopStart)
.zIndex(1f)
)

EmptyScreen(uiState)
Expand Down Expand Up @@ -336,7 +338,6 @@ private fun TopTvShowsPicksList(
imageUrl = tvShow[index].posterUrl,
isSaved = false,
hasSaveIcon = false,
onSaveClick = {},
modifier = Modifier.clickable {
onNavigateToTvShowPicks(tvShow[index].id)
}
Expand Down
Loading
Loading