Closed Bug 1830416 Opened 3 years ago Closed 1 year ago

[Tabs tray to Compose] Investigate using `LocalComposition` for passing Stores down to leaf nodes

Categories

(Firefox for Android :: Tabs, enhancement, P3)

All
Android
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: 007, Assigned: 007)

References

Details

https://developer.android.com/jetpack/compose/compositionlocal

Investigate whether it's possible to integrate our Store pattern with CompositionalLocal in Compose.

The goals would be the following:

  • Reduced parameter & dependency list
  • Ability to access TabsTrayStore (and maybe AppStore and BrowserStore) from any "component" node in the TabsTray tree. (The bottom-most child nodes should still only receive pure data (e.g. TabLayout, SingleSelectBanner)
  • A wrapper similar to FirefoxTheme (TabsTrayDataScope?) would be used to couple the stores to the nodes (example below)
TabsTrayDataScope(appStore, browserStore, tabsTrayStore) {
   TabsTray(...)
}

Closing this ticket. This seems to be a bit redundant considering Context Receivers are officially a part of the Kotlin language and seem more useful than bloating out the Compose tree with our Stores.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.