Open Bug 1431840 Opened 6 years ago Updated 2 years ago

Support "beforeCurrent" as an option to browserSettings.newRelatedTabPosition and newUnrelatedTabPosition

Categories

(WebExtensions :: General, enhancement, P3)

59 Branch
enhancement

Tracking

(firefox59 affected)

Tracking Status
firefox59 --- affected

People

(Reporter: mconca, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 1344749 implemented browserSettings.newRelatedTabPosition and browserSettings.newUnrelatedTabPosition with support for "afterCurrent" and "endOfTabStrip".

This bug is to add support for "beforeCurrent" to those two API.
The use case for this seems rather vague; I don't fully understand bug 1344749 comment 40. As it stands I don't think we should do this.
Priority: -- → P2
(In reply to Dão Gottwald [::dao] from comment #1)
> The use case for this seems rather vague; I don't fully understand bug
> 1344749 comment 40. As it stands I don't think we should do this.

The use case is vertical tabs (or tree tabs, or any alternate tab model implemented in sidebars instead of across the top). In these cases it is often more intuitive for users to have the new tab appear at the top of the tab list, which would be "before" any existing tabs.
What prevents those extensions from treating "afterCurrent" or "endOfTabStrip" as "above the current subtree" or "at the top of the tree", respectively? This doesn't seem like something that should reflect back to the API.
Blocks: 1442843
CSS order[1] should be able to handle the use case from comment 2, assuming the sidebar wants the same order (just reversed) as the tabstrip.

Assuming tab is in a tabs array, one could do a little calculation like:

tab.style.order = tabs.length - tab.index

Given that, I don't think there is anything to do here.

If the use case is to cover the firefox tabstrip, then it might need to be implemented in tabbrowser.
Flags: needinfo?(mconca)
The use case is to offer a complete tab positioning API to developers that allows them to offer opening positions of before, after and end-of-strip, for the Firefox tabstrip as well as any other alternate tab model.

Since bug 1344749 hasn't hit release yet, let's wait for developer feedback on this feature request.
Flags: needinfo?(mconca)
Priority: P2 → P3
Product: Toolkit → WebExtensions
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.