refactor: remove bottom navigation bar (#665 #666 #667 #668) (#672)

* refactor(nav): remove bottom NavigationBar from Scaffold (#665)

* refactor(theme): remove BottomNavDisplayMode enum (#666)

* refactor(settings): remove nav bar customization page (#667)

* chore: clean up unused imports after bottom nav removal (#668)

* chore: remove dead bottom nav infrastructure after removal

- Remove SettingsNavBar NavKey (NavigationKeys.kt)
- Remove bottomNavItems field from ServerStoreState + migration code
- Remove _bottomNavItemsFlow, getBottomNavItems, setBottomNavItems from AuthManager
- Remove bottomNavItems handling from selfHealed() (ServerCollectionOps)
- Remove redundant bottomBar={} from Scaffold (Navigation.kt)
- Remove unused nav bar strings from values/strings.xml + values-ko/strings.xml
- Remove content_desc_move_up/down/remove_item strings
- Update SettingsViewModelTest.kt (drop stale getBottomNavItems mock)
- Update ServerStoreTest.kt (remove bottomNavItems assertions)

---------

Co-authored-by: M57 <Hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-07-22 10:14:50 +03:00
1 parent c43904b2b8
commit 0edb67338d
17 files changed
-580

No files matched your search

@@ -1,60 +0,0 @@
package com.m57.hermescontrol
import androidx.compose.foundation.layout.Box
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.test.assertHeightIsAtLeast
import androidx.compose.ui.test.assertHeightIsEqualTo
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.unit.dp
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.m57.hermescontrol.theme.BottomNavDisplayMode
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented tests for [Modifier.bottomNavigationHeight].
*
* Each compact bottom-nav display mode maps to a specific bar height:
* - [BottomNavDisplayMode.ICON_ONLY] -> 56.dp (fixed)
* - [BottomNavDisplayMode.TEXT_ONLY] -> 44.dp (fixed)
* - [BottomNavDisplayMode.ICON_AND_TEXT] -> min 80.dp (can grow)
*
* We apply the modifier to a tagged [Box] and assert the resulting height on
* a real Compose host (this requires the instrumentation test runner, hence
* androidTest rather than the Robolectric-free JVM test source set).
*/
@RunWith(AndroidJUnit4::class)
@MediumTest
class BottomNavigationLayoutTest {
@get:Rule
val composeTestRule = createComposeRule()
@Test
fun iconOnly_barHeightIs56dp() {
composeTestRule.setContent {
Box(Modifier.testTag("bar").bottomNavigationHeight(BottomNavDisplayMode.ICON_ONLY))
}
composeTestRule.onNodeWithTag("bar").assertHeightIsEqualTo(56.dp)
}
@Test
fun textOnly_barHeightIs44dp() {
composeTestRule.setContent {
Box(Modifier.testTag("bar").bottomNavigationHeight(BottomNavDisplayMode.TEXT_ONLY))
}
composeTestRule.onNodeWithTag("bar").assertHeightIsEqualTo(44.dp)
}
@Test
fun iconAndText_barHeightIsAtLeast80dp() {
composeTestRule.setContent {
Box(Modifier.testTag("bar").bottomNavigationHeight(BottomNavDisplayMode.ICON_AND_TEXT))
}
// heightIn(min = 80.dp) — assert the measured height meets the minimum.
composeTestRule.onNodeWithTag("bar").assertHeightIsAtLeast(80.dp)
}
}