RFC: Adding tab partitions and groups to BrowserState #11172
Conversation
I've tagged all folks who worked on tab groups, but everyone's review appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I really like this! It seems quite flexible but I've left a comment about persistence that I'm not sure about.
For Fenix, I think this goes really well with a proposal I have: to give the app the final representation of the partitions to display in the TabsTrayStore
. With the state that looks like this.
data class TabsTrayState(
val selectedPage: Page = Page.NormalTabs, // existing state data
val inactivateTabs: List<TabSessionState>,
val searchGroups: List<TabGroup>,
val normalTabs: List<TabSessionState>
) : State
621b598
to
4ab33f5
Compare
@pocmo @jonalmeida Thanks for taking a look! I updated the RFC and responded inline. Here's a summary of what's left:
Can you take another look? Also, happy to talk through in person. |
Additional things to think about:
|
4ab33f5
to
8cb2651
Compare
We talked this through offline, and our conclusion was that with the current approach we can support global tab ordering and ordering of tabs within groups, but we can't support mixing groups and tabs in the same view. This is an acceptable trade-off for now as we don't have that requirement, and because this would need a new "super structure" e.g. a new base type
Yes, the idea is that features / components managing tab groups would operate on their own partitions by ID. We talked this through too and could later introduce more meaning e.g., types of partitions, or an interface for features to advertise what types of partitions they manage. That's future work though. |
8cb2651
to
0dff43e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for documenting the discussions, I've read through them and the updated RFC which resolves all my concerns. Ship it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff ✨ .
I really like the flexibility that this will bring for future tabs partitioning (grouping) :) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
0dff43e
to
2881106
Compare
A proposal for adding tab groups to
BrowserState
, based on existing functionality currently implemented in Fenix, and with the idea of being generic enough for future use cases.There are a number of different ways this could be implemented. I tried to keep this simple and describe alternatives. All feedback very welcome :).
Link to preview