Draft: Resolve Bug 40205: Rebased Fenix patches to 96.2.0
context
- resolves #40205 (closed)
- marked draft pending resolution of toolchain dependencies in #40418
notes
here is a thread for a running list of non-obvious decisions made about resolving conflicts as breadcrumb for review later... (mostly a list of changes i accepted from upstream Moz v96.2.0 branch that i want to make sure are safe!)
- when applying
apply ffe02b33f... Add Tor integration and UI
:- in
Components.kt
:- line 181: accept
val appStore by lazyMonitored { AppStore() }
- line 181: accept
- in
HomeActivity.kt:
:- line 192: allow
MarkersFragmentLifecycleCallbacks.register(supportFragmentManager, components.core.engine)
(not present in our patch set)
- line 192: allow
- in
HomeFragment.kt
:- accepted moz class rename infrom
HistoryMetadataFeature
toRecentVisitsFeature
(lines 186, 337)// line 186 private val historyMetadataFeature = ViewBoundFeatureWrapper<RecentVisitsFeature>() // line 337 feature = RecentVisitsFeature(
- accepted instances of moz lifecycle profiling (lines 213, 225, 420)
// line 213 requireComponents.core.engine.profiler?.addMarker( MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreate", ) // line 225 val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime() // line 420 requireComponents.core.engine.profiler?.addMarker( MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreateView", )
- accepted moz passing metrics reporting flag to session controller (line 464):
sessionControlView?.update(it, shouldReportMetrics = true)
- accepted moz class rename infrom
- in
Mode.kt
:- accepted mozilla's elimination of
SharableAccount
- accepted mozilla's elimination of
- in
SessionControlAdapter
: nothing interesting - in
SessionControlController
:- accepted calls to
reportSessionMetrics
(lines 208, 667)// line 208 /** * @see [SessionControlInteractor.reportSessionMetrics] */ fun handleReportSessionMetrics(state: HomeFragmentState) // line 667 override fun handleReportSessionMetrics(state: HomeFragmentState) { with(metrics) { track( if (state.recentTabs.isEmpty()) Event.RecentTabsSectionIsNotVisible else Event.RecentTabsSectionIsVisible ) track(Event.RecentBookmarkCount(state.recentBookmarks.size)) } }
- accepted elimination of
handleSwipedItemDeletionCancel
(formerly line 258)
- accepted calls to
- in
SessionControllerInteractor
:- accept
reportSessionMetrics
implementation (line 487)
- accept
- in
styles.xml
:- accepted moz rename of
SubtitleTextStyle
->Subtitle12TextStyle
(line 459) - accepted moz elimination of
SearchEngineShortcutsLabelStyle
(line 539)
- accepted moz rename of
- in
- when applying
2be3f44e5 Modify UI/UX
:- in
BaseBrowserFragment
:- accept elimination of call to
updateThemeForSession(it)
ifcomponents.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)
is non-null.- NOTE: potentially controversial because we used to force loading a private mode home screen instead of calling
updateThemeForSession
. however, since the check that used to trigger this call has been eliminated, it is likely safe. this is what we used to do (and will no longer have an opportunity to need to do):components.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)?.let { // If the most-recent session was a tab in Normal mode, and now Normal mode is disabled, // then load the Private Mode home screen, instead. if (!it.content.private && requireContext().settings().shouldDisableNormalMode) { findNavController().nav( R.id.browserFragment, BrowserFragmentDirections.actionGlobalHomeFragment() ) } updateThemeForSession(it) }
- NOTE: potentially controversial because we used to force loading a private mode home screen instead of calling
- accept elimination of call to
- in
preference_keys.xml
:- accepted elimination of
<string name="pref_key_feedback" translatable="false">pref_key_feedback</string>
(formerly line 44)
- accepted elimination of
- in
TabLayoutMediator
:- accept
tabPager.setCurrentItem(position, false)
in call toTabLayoutMediator::selectTabAtPosition
(line 69)
- accept
- in