Features/fix group rules with split view
Context
- Currently, when a group rule is applied on a split view if the tabs in the split view should belong to different groups, this ends up crashing the browser as the extension doesn't know what to do with the split tabs.
What This Diff Does
- Updates the package for chrome types to get split view APIs
- Ignores split tabs during applying group rules to not crash the browser.
- This would mean that the tabs will end up staying in the group they were in before the split happens
Testing
- build the extension
npm run build
- Install the extension from extension folder
- Create two groups with different rules
- Open a split view with one url from the first group and the other from the second group
- Before changes: this will crash, After changes: the split tabs would stay in the group
@loilo would be great if you could take a look at this when you get a chance 😊
Will do, getting the chance is the problem. ;) But since it's just a tiny change, I'll probably be able to take care of this by the weekend.
Okay, I took a look. I really appreciate the browser not crashing anymore. 😅
However, I'd prefer to not just ignore any split-viewed tabs. IMO, it would be more in the spirit of the extension to detach the conflicting tab from a split view and then group it appropriately by its URL.
Could you adjust the PR accordingly, or do you want me to take a stab on this?
@loilo so I thought about doing that but honestly I followed what arc browser does, where they basically leave it as is 😅 which is what I would prefer as well
The reason for that is when I am opening a split view tab I am delibritely doing that like right clicking a tab and doing "open in split view" supposedly knowing that these default in different groups so not having the browser open the tab in split view might be confusing, how would you feel about making it an option though? similar to the strict checkbox in advanced option? I can make the default to detach and the checkbox to ignore or the other way around whichever you prefer :)
Correctness is one of the main goals of this extension. Keeping things in the right group even when URLs are changing is basically the main feature which sets it apart from other tab grouping extensions (at least at the time of creation, don't know about more recent developments).
You're probably right though that keeping split tabs together is a correct decision as well in respect of user intent.
Regarding an additional checkbox — I want to keep the extension as simple as possible, so options should only be introduced when they're explicitly requested by multiple users.
For now, I think it's fine to ignore group configs of the secondary split tab. However, I'd prefer if the configuration for the first tab in a split group is still respected.
In the current state of the PR, split tabs are completely exempt from grouping, so even if none of the tab URLs is matching the surrounding group anymore, groups will not be changed.
If you can, I'd like to see this adjusted so that the first tab in the split group is authorative for grouping.
that's a good point yeah! I can adjust to do that yeah!