Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0bac9e3
fix: match favorite menu rows to Android Figma design
jelleoo Nov 29, 2026
35db7c9
fix: explain short favorite menu searches in all supported languages
jelleoo Nov 29, 2026
454c045
fix: restore removed favorites through actionable Figma snackbars
jelleoo Nov 29, 2026
7dc5965
fix: show partnership favorite feedback and undo inside map sheet
jelleoo Nov 29, 2026
305da99
fix: wire saved partnership detail hearts and undo actions
jelleoo Nov 29, 2026
c7fbdd0
fix: apply approved favorite and notification translations
jelleoo Nov 29, 2026
1ddd688
fix: preserve Android Figma favorite row insets
jelleoo Nov 29, 2026
ffa3f21
fix: scope partnership feedback to active sheet above map links
jelleoo Nov 29, 2026
9e53e5f
test: cover undo after partial partnership deletion failure
jelleoo Nov 29, 2026
4a2d77a
fix: align partnership favorite list with Android Figma spacing
jelleoo Nov 29, 2026
a00a568
fix: match partnership edit rows and delete button geometry
jelleoo Nov 29, 2026
8436319
fix: align partnership sheet typography and map link dimensions
jelleoo Nov 29, 2026
10f57a1
fix: match today meal favorites and selection sheet text styles
jelleoo Nov 29, 2026
2ad4a45
fix: apply favorite tab geometry and semibold undo labels
jelleoo Nov 29, 2026
d0ae9f5
fix: center favorite empty states within available list space
jelleoo Nov 29, 2026
71b17ca
fix: align notification inbox typography with Android Figma
jelleoo Nov 29, 2026
8a363bb
fix: opt notification permission dialogs into Figma text metrics
jelleoo Nov 29, 2026
dfbdfe0
fix: match partnership edit selection header spacing
jelleoo Nov 29, 2026
589527e
fix: preserve default wrapping outside favorite tabs
jelleoo Nov 29, 2026
3c68264
test: guard favorite text geometry and responsive empty states
jelleoo Nov 29, 2026
bf7c8b7
fix: keep short search feedback visible above the keyboard
jelleoo Nov 30, 2026
e4d54e1
fix: place partnership feedback below the benefits list
jelleoo Nov 30, 2026
31a3e0c
fix: use the Figma swipe delete icon and danger color
jelleoo Nov 30, 2026
ab4198e
chore: bump Firebase QA debug build to 3.2.19 (76)
jelleoo Nov 30, 2026
4f30b34
Merge branch 'fix/favorites-qa-figma' into release/3.2.19-qa-build76
jelleoo Nov 30, 2026
d0a8076
release: 3.2.19
jelleoo Nov 30, 2026
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
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ android {
applicationId = "com.eatssu.android"
minSdk = 28
targetSdk = 37
versionCode = 73
versionName = "3.2.18"
versionCode = 76
versionName = "3.2.19"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ import android.os.Bundle
import android.os.SystemClock
import android.view.KeyEvent
import android.view.MotionEvent
import android.view.WindowManager
import android.view.accessibility.AccessibilityNodeInfo
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
Expand All @@ -36,6 +40,49 @@ class MenuFavoriteSearchUiTest {
private val instrumentation = InstrumentationRegistry.getInstrumentation()
private val context = instrumentation.targetContext

@Test
fun shortSearchWarningMovesFromSearchFieldToBottomWhenImeCloses() {
val state = mutableStateOf(FavoriteState(favoriteMenuLoadState = MenuFavoriteLoadState.Success))
val feedback = mutableStateOf<FavoriteMenuSnackbarEvent?>(null)
launch {
FavoriteScreen(
uiState = UiState.Success(state.value),
onStoreTypeSelected = {},
onPartnershipClick = {},
onMenuSearchFocusChanged = { focused ->
if (focused) state.value = state.value.copy(isMenuSearchMode = true)
},
onMenuSearchQueryChanged = { state.value = state.value.copy(menuSearchQuery = it) },
onMenuSearchSubmit = {
if (state.value.normalizedMenuSearchQuery.length == 1) {
feedback.value = FavoriteMenuSnackbarEvent(R.string.favorite_menu_search_too_short, true)
}
},
menuSnackbarEvent = feedback.value,
)
}.use { scenario ->
val isField: (AccessibilityNodeInfo) -> Boolean = { it.className == "android.widget.EditText" }
tap(awaitNode(isField))
awaitIme(scenario, visible = true)
setQuery("a")
submitSearch()
val warning = context.getString(R.string.favorite_menu_search_too_short)
val field = Rect().also { awaitNode(isField).getBoundsInScreen(it) }
val keyboardOpen = Rect().also { awaitText(warning).getBoundsInScreen(it) }
assertTrue("Warning should be directly below the field", keyboardOpen.top >= field.bottom)
assertTrue(keyboardOpen.top - field.bottom <= 24 * context.resources.displayMetrics.density)

scenario.onActivity { activity ->
WindowCompat.getInsetsController(activity.window, activity.window.decorView)
.hide(WindowInsetsCompat.Type.ime())
}
awaitIme(scenario, visible = false)
val keyboardClosed = Rect().also { awaitText(warning).getBoundsInScreen(it) }
assertTrue("The same warning should move down after dismissal", keyboardClosed.top > keyboardOpen.bottom)
assertEquals("a", state.value.menuSearchQuery)
}
}

@Test
fun focusTypingEnterFeedbackAndClose() {
val requests = AtomicInteger()
Expand Down Expand Up @@ -142,6 +189,38 @@ class MenuFavoriteSearchUiTest {
}
}

@Test
fun menuAndRestaurantAreSeparateLinesAndEmptyStateKeepsTodayAccordion() {
val favorite = FavoriteMenu(42L, "QA geometry menu", Restaurant.HAKSIK, false)
val state = mutableStateOf(FavoriteState(
favoriteMenus = listOf(favorite),
favoriteMenuLoadState = MenuFavoriteLoadState.Success,
))
launch {
FavoriteScreen(
uiState = UiState.Success(state.value),
onStoreTypeSelected = {},
onPartnershipClick = {},
)
}.use {
val menuBounds = Rect().also { awaitText(favorite.menuName).getBoundsInScreen(it) }
val restaurantBounds = Rect().also {
awaitText(context.getString(Restaurant.HAKSIK.displayNameResId)).getBoundsInScreen(it)
}
assertTrue("Restaurant label must be below the menu", restaurantBounds.top >= menuBounds.bottom)
assertTrue("Restaurant label must be smaller", restaurantBounds.height() < menuBounds.height())
instrumentation.runOnMainSync { state.value = state.value.copy(favoriteMenus = emptyList()) }
val accordionBounds = Rect().also {
awaitText(context.getString(R.string.today_favorite_title)).getBoundsInScreen(it)
}
val emptyBounds = Rect().also {
awaitText(context.getString(R.string.favorite_menu_empty_title)).getBoundsInScreen(it)
}
assertTrue("Empty message must not overlap the retained accordion", emptyBounds.top >= accordionBounds.bottom)
screenshot("favorite-empty-responsive")
}
}

@Test
fun alreadySavedMenusDoNotAccumulateInNextSelectionAndSaveDisablesAgain() {
val names = listOf("맑은미역국", "배추김치", "연탄불맛돈불고기", "양배추찜")
Expand Down Expand Up @@ -201,9 +280,26 @@ class MenuFavoriteSearchUiTest {

private fun launch(content: @Composable () -> Unit): ActivityScenario<ComponentActivity> =
ActivityScenario.launch(ComponentActivity::class.java).also { scenario ->
scenario.onActivity { activity -> activity.enableEdgeToEdge(); activity.setContent { EatssuTheme { content() } } }
scenario.onActivity { activity ->
activity.enableEdgeToEdge()
activity.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
activity.setContent { EatssuTheme { content() } }
}
}

private fun awaitIme(scenario: ActivityScenario<ComponentActivity>, visible: Boolean) {
repeat(40) {
var matches = false
scenario.onActivity { activity ->
matches = ViewCompat.getRootWindowInsets(activity.window.decorView)
?.isVisible(WindowInsetsCompat.Type.ime()) == visible
}
if (matches) return
Thread.sleep(100)
}
error("Expected keyboard visibility: $visible")
}

private fun setQuery(query: String) {
val field = awaitNode { it.className?.toString() == "android.widget.EditText" }
assertTrue(field.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, Bundle().apply {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@

<activity
android:name=".presentation.MainActivity"
android:exported="true">
android:exported="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="android.app.lib_name"
android:value="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(
ActivityMainBinding::inflate,
ScreenId.HOME_MAIN
) {
override val dispatchContentInsets: Boolean = true

companion object {
const val EXTRA_OPEN_MENU_FAVORITES = "open_menu_favorites"
const val EXTRA_SHOW_NOTIFICATION_ENABLED_TOAST = "show_notification_enabled_toast"
Expand Down Expand Up @@ -318,6 +320,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(
title = getString(R.string.dialog_notification_pre_permission_title),
description = getString(R.string.dialog_notification_pre_permission_description),
) {
notificationDesign = true
cancelText = getString(R.string.button_later)
confirmText = getString(R.string.button_allow_notification)
cancellable = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ abstract class BaseActivity<B : ViewBinding>(

}

protected open val dispatchContentInsets: Boolean = false

private fun setContainerInset() {
// Toolbar: topInset만 적용
val toolbar = findViewById<Toolbar>(R.id.toolbar)
Expand All @@ -104,8 +106,12 @@ abstract class BaseActivity<B : ViewBinding>(
/* bottom = */ systemInsets.bottom
)

// 소비된 인셋을 반환하여 자식 뷰가 다시 받지 않도록 함
WindowInsetsCompat.CONSUMED
// Forward remaining insets (such as the IME) without applying system bar padding twice.
if (dispatchContentInsets) {
insets.inset(systemInsets.left, systemInsets.top, systemInsets.right, systemInsets.bottom)
} else {
WindowInsetsCompat.CONSUMED
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class ReviewComposeActivity : AppCompatActivity() {
title = getString(R.string.review_menu_notification_title),
description = getString(R.string.review_menu_notification_description),
) {
notificationDesign = true
confirmText = getString(R.string.button_allow_notification)
onConfirm { dialog ->
dialog.dismiss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.eatssu.android.R
import com.eatssu.android.domain.model.PartnershipRestaurant
import com.eatssu.android.presentation.map.MapExternalNavigator
import com.eatssu.android.presentation.map.MapProvider
import com.eatssu.android.presentation.map.PartnershipFavoriteFeedback
import com.eatssu.android.presentation.map.component.MapRestaurantBottomSheet
import com.eatssu.android.presentation.map.model.RestaurantInfo
import com.eatssu.android.presentation.map.openMapWithoutResolution
Expand All @@ -53,6 +54,7 @@ fun FavoriteDetailRoute(
onBack: () -> Unit,
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
val favoriteFeedback by viewModel.favoriteFeedback.collectAsStateWithLifecycle()
val context = LocalContext.current
val scope = rememberCoroutineScope()

Expand All @@ -68,6 +70,10 @@ fun FavoriteDetailRoute(
UiState.Error -> LaunchedEffect(Unit) { onBack() }
is UiState.Success -> FavoriteDetailScreen(
restaurant = state.data,
favoriteFeedback = favoriteFeedback,
onFavoriteClick = viewModel::toggleLike,
onUndoFavorite = viewModel::undoFavorite,
onDismissFeedback = viewModel::dismissFavoriteFeedback,
onBack = onBack,
onNaverMapClick = {
scope.launch {
Expand All @@ -87,6 +93,10 @@ fun FavoriteDetailRoute(
@Composable
private fun FavoriteDetailScreen(
restaurant: PartnershipRestaurant,
favoriteFeedback: PartnershipFavoriteFeedback?,
onFavoriteClick: () -> Unit,
onUndoFavorite: () -> Unit,
onDismissFeedback: (Long) -> Unit,
onBack: () -> Unit,
onNaverMapClick: () -> Unit,
onKakaoMapClick: () -> Unit,
Expand Down Expand Up @@ -136,6 +146,11 @@ private fun FavoriteDetailScreen(

MapRestaurantBottomSheet(
storeName = restaurant.storeName,
isLiked = restaurant.likedByUser,
onFavoriteClick = onFavoriteClick,
favoriteFeedback = favoriteFeedback,
onUndoFavorite = onUndoFavorite,
onDismissFeedback = onDismissFeedback,
storeType = restaurant.storeType,
mapRestaurantList = listOf(
RestaurantInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.eatssu.android.data.model.ApiResult
import com.eatssu.android.domain.model.PartnershipRestaurant
import com.eatssu.android.domain.repository.PartnershipRepository
import com.eatssu.common.UiState
import com.eatssu.android.presentation.map.PartnershipFavoriteFeedback
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
Expand All @@ -20,10 +21,26 @@ class FavoriteDetailViewModel @Inject constructor(

private val _uiState = MutableStateFlow<UiState<PartnershipRestaurant>>(UiState.Init)
val uiState: StateFlow<UiState<PartnershipRestaurant>> = _uiState.asStateFlow()
private val _favoriteFeedback = MutableStateFlow<PartnershipFavoriteFeedback?>(null)
val favoriteFeedback: StateFlow<PartnershipFavoriteFeedback?> = _favoriteFeedback.asStateFlow()
private var isChangingFavorite = false

fun dismissFavoriteFeedback(eventId: Long) {
if (_favoriteFeedback.value?.eventId == eventId) _favoriteFeedback.value = null
}

fun undoFavorite() {
val feedback = _favoriteFeedback.value ?: return
val current = (_uiState.value as? UiState.Success)?.data ?: return
if (feedback.undoPartnershipId != current.id || current.likedByUser) return
_favoriteFeedback.value = null
toggleLike()
}

fun showPartnership(partnership: PartnershipRestaurant) {
// 찜 목록에서 받은 데이터를 재사용해 상세 진입 시 서버를 다시 조회하지 않는다.
_uiState.value = UiState.Success(partnership)
_favoriteFeedback.value = null
}

fun loadPartnership(partnershipId: Int) {
Expand All @@ -39,18 +56,27 @@ class FavoriteDetailViewModel @Inject constructor(

fun toggleLike() {
val current = (_uiState.value as? UiState.Success)?.data ?: return

if (isChangingFavorite) return
isChangingFavorite = true
viewModelScope.launch {
val result = partnershipRepository.likePartnership(current.id, current.likedByUser)
if (result is ApiResult.Success) {
_uiState.value = UiState.Success(
current.copy(
likedByUser = !current.likedByUser,
partnershipLikeCount = (
try {
val result = partnershipRepository.likePartnership(current.id, current.likedByUser)
if ((_uiState.value as? UiState.Success)?.data?.id != current.id) return@launch
if (result is ApiResult.Success) {
_uiState.value = UiState.Success(
current.copy(
likedByUser = !current.likedByUser,
partnershipLikeCount = (
current.partnershipLikeCount + if (current.likedByUser) -1 else 1
).coerceAtLeast(0),
),
)
),
)
_favoriteFeedback.value = PartnershipFavoriteFeedback.success(current.id, current.likedByUser)
} else {
_favoriteFeedback.value = PartnershipFavoriteFeedback.failure()
}
} finally {
isChangingFavorite = false
}
}
}
Expand Down
Loading
Loading