[tbb-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.0-1] fixup! Modify UI/UX

Dan Ballard (@dan) git at gitlab.torproject.org
Tue Oct 10 18:46:49 UTC 2023



Dan Ballard pushed to branch firefox-android-115.2.1-13.0-1 at The Tor Project / Applications / firefox-android


Commits:
2854981a by clairehurst at 2023-10-10T18:46:34+00:00
fixup! Modify UI/UX

Bug 42158: Remove Customize Homepage button

- - - - -


4 changed files:

- fenix/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
- fenix/app/src/main/java/org/mozilla/fenix/home/HomeMenuView.kt
- fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
- fenix/app/src/main/res/xml/preferences.xml


Changes:

=====================================
fenix/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
=====================================
@@ -56,7 +56,7 @@ class HomeMenu(
         object ManageAccountAndDevices : Item()
         object WhatsNew : Item()
         object Help : Item()
-        object CustomizeHome : Item()
+//        object CustomizeHome : Item()
         object Settings : Item()
         object Quit : Item()
         object ReconnectSync : Item()
@@ -175,13 +175,13 @@ class HomeMenu(
             onItemTapped.invoke(Item.Help)
         }
 
-        val customizeHomeItem = BrowserMenuImageText(
-            context.getString(R.string.browser_menu_customize_home_1),
-            R.drawable.ic_customize,
-            primaryTextColor,
-        ) {
-            onItemTapped.invoke(Item.CustomizeHome)
-        }
+//        val customizeHomeItem = BrowserMenuImageText(
+//            context.getString(R.string.browser_menu_customize_home_1),
+//            R.drawable.ic_customize,
+//            primaryTextColor,
+//        ) {
+//            onItemTapped.invoke(Item.CustomizeHome)
+//        }
 
         // Use nimbus to set the icon and title.
         // val nimbusValidation = FxNimbus.features.nimbusValidation.value()
@@ -217,7 +217,7 @@ class HomeMenu(
             BrowserMenuDivider(),
             whatsNewItem,
             helpItem,
-            customizeHomeItem,
+//            customizeHomeItem,
             settingsItem,
             quitItem
         ).also { items ->


=====================================
fenix/app/src/main/java/org/mozilla/fenix/home/HomeMenuView.kt
=====================================
@@ -103,14 +103,14 @@ class HomeMenuView(
                     HomeFragmentDirections.actionGlobalSettingsFragment(),
                 )
             }
-            HomeMenu.Item.CustomizeHome -> {
-                HomeScreen.customizeHomeClicked.record(NoExtras())
-
-                navController.nav(
-                    R.id.homeFragment,
-                    HomeFragmentDirections.actionGlobalHomeSettingsFragment(),
-                )
-            }
+//            HomeMenu.Item.CustomizeHome -> {
+//                HomeScreen.customizeHomeClicked.record(NoExtras())
+//
+//                navController.nav(
+//                    R.id.homeFragment,
+//                    HomeFragmentDirections.actionGlobalHomeSettingsFragment(),
+//                )
+//            }
             is HomeMenu.Item.SyncAccount -> {
                 navController.nav(
                     R.id.homeFragment,


=====================================
fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
=====================================
@@ -271,9 +271,9 @@ class SettingsFragment : PreferenceFragmentCompat() {
             resources.getString(R.string.pref_key_tabs) -> {
                 SettingsFragmentDirections.actionSettingsFragmentToTabsSettingsFragment()
             }
-            resources.getString(R.string.pref_key_home) -> {
-                SettingsFragmentDirections.actionSettingsFragmentToHomeSettingsFragment()
-            }
+//            resources.getString(R.string.pref_key_home) -> {
+//                SettingsFragmentDirections.actionSettingsFragmentToHomeSettingsFragment()
+//            }
             resources.getString(R.string.pref_key_search_settings) -> {
                 SettingsFragmentDirections.actionSettingsFragmentToSearchEngineFragment()
             }
@@ -674,19 +674,19 @@ class SettingsFragment : PreferenceFragmentCompat() {
 
     @VisibleForTesting
     internal fun setupHomepagePreference() {
-        with(requirePreference<Preference>(R.string.pref_key_home)) {
-            summary = context?.let {
-                when {
-                    it.settings().alwaysOpenTheHomepageWhenOpeningTheApp ->
-                        getString(R.string.opening_screen_homepage_summary)
-                    it.settings().openHomepageAfterFourHoursOfInactivity ->
-                        getString(R.string.opening_screen_after_four_hours_of_inactivity_summary)
-                    it.settings().alwaysOpenTheLastTabWhenOpeningTheApp ->
-                        getString(R.string.opening_screen_last_tab_summary)
-                    else -> null
-                }
-            }
-        }
+//        with(requirePreference<Preference>(R.string.pref_key_home)) {
+//            summary = context?.let {
+//                when {
+//                    it.settings().alwaysOpenTheHomepageWhenOpeningTheApp ->
+//                        getString(R.string.opening_screen_homepage_summary)
+//                    it.settings().openHomepageAfterFourHoursOfInactivity ->
+//                        getString(R.string.opening_screen_after_four_hours_of_inactivity_summary)
+//                    it.settings().alwaysOpenTheLastTabWhenOpeningTheApp ->
+//                        getString(R.string.opening_screen_last_tab_summary)
+//                    else -> null
+//                }
+//            }
+//        }
     }
 
     @VisibleForTesting


=====================================
fenix/app/src/main/res/xml/preferences.xml
=====================================
@@ -54,10 +54,10 @@
             android:key="@string/pref_key_tabs"
             android:title="@string/preferences_tabs" />
 
-        <androidx.preference.Preference
-            app:iconSpaceReserved="false"
-            android:key="@string/pref_key_home"
-            android:title="@string/preferences_home_2" />
+<!--        <androidx.preference.Preference-->
+<!--            app:iconSpaceReserved="false"-->
+<!--            android:key="@string/pref_key_home"-->
+<!--            android:title="@string/preferences_home_2" />-->
 
         <androidx.preference.Preference
             android:key="@string/pref_key_customize"



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/2854981a76ff0152709b5582f50c91bec7ce8dcf

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/2854981a76ff0152709b5582f50c91bec7ce8dcf
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20231010/4df70b11/attachment-0001.htm>


More information about the tbb-commits mailing list