[meta] Android toolbar compose rewrite
Categories
(Fenix :: Toolbar, task)
Tracking
(Not tracked)
People
(Reporter: petru, Unassigned)
References
(Depends on 13 open bugs)
Details
(Keywords: meta)
Goals:
-
Improve UI declarativeness with Jetpack Compose
Simpler layouts with increased conciseness and reduced boilerplate
Better separation between the view/domain layers with cleaner UI code -
Enhance state management with MVI
Centralized state handling - use a single source of truth for the entire toolbar state while also avoiding inconsistencies in UI or functionality.
Unidirectional data flow - ensure the UI reacts predictably to user inputs and browser state changes based on clear MVI actions. -
Optimize performance & scalability
Reduce view hierarchy overhead by leveraging Compose’s lightweight recomposition to reduce UI rendering inefficiencies.
Easier to have asynchronous UI updates done from background - updating the UI state without blocking the UI. -
Easier extensibility
Increased opportunities to reuse common UI elements
Decoupled business logic in feature specific middlewares -
Improve Testability
The entire functionality of the BrowserToolbar composable can be tested with unit tests (using Robolectric)
What is being rendered based on the BrowserToolbarState
What is being dispatched as BrowserToolbarActions
The basic functionality of the reducer
Integration tests can be added on top in products like Fenix to test the middlewares functionality and interaction with other features. -
Improve Developer Experience
Adopt a familiar architecture to increase code cohesiveness and support more easier contributions
Make it possible to use live previews for faster inference of the toolbar UI
How
Reporter | ||
Updated•26 days ago
|
Reporter | ||
Updated•26 days ago
|
Reporter | ||
Updated•26 days ago
|
Reporter | ||
Updated•24 days ago
|
Description
•