Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit the container of the parent to a new blank tab not working? #2176

Closed
ralish opened this issue Mar 8, 2019 · 12 comments
Closed

Inherit the container of the parent to a new blank tab not working? #2176

ralish opened this issue Mar 8, 2019 · 12 comments
Labels

Comments

@ralish
Copy link

ralish commented Mar 8, 2019

Short description

I'm not sure if this is a bug in TTS or I'm simply not understanding the underlying option ...

The behaviour I'm after is that when I create a new tab by clicking the "plus" button in the TTS sidebar or via the Ctrl+T keyboard shortcut that the new tab has the same container as the previously focused tab. I've enabled New Tabs Behaviour -> Inherit the container of the parent tab to a new blank tab but it seems to not have any effect? I also found #2094 which seems to suggest that this should work?

Steps to reproduce

  1. Start Firefox with a clean profile
  2. Install Tree Style Tabs
  3. Enable New Tabs Behaviour -> Inherit the container of the parent tab to a new blank tab
  4. Open a new tab within a container
  5. Open a new tab while the container tab is focused

Expected result

New tab is opened within the container of the previously focused tab.

Actual result

New tab is opened outside of any container.

Environment

  • Platform (OS): Windows 10 x64
  • Version of Firefox: 65.0.2 x64
  • Version (or revision) of Tree Style Tab: 2.8.3
@piroor
Copy link
Owner

piroor commented Mar 11, 2019

Confirmed. This happens for a new tab opened with Ctrl-T. On the other hand, following cases worked as expected:

  • middle-click on the "+" button in the sidebar
  • "Child Tab" in the popup of the "+" button in the sidebar

The commit 4a7d358 should fix this problem. Thanks!

@piroor piroor added the fixed label Mar 11, 2019
@ralish
Copy link
Author

ralish commented Mar 11, 2019

That's awesome, thanks for the fix and all your work on this extension! Any idea when this will make it into a release? No real rush, just wondering if I should build my own version off master if it will be a while.

@piroor
Copy link
Owner

piroor commented Mar 11, 2019

You don't need to build TST yourself, there is an autoamted build: https://github.com/piroor/treestyletab#development-builds

@ralish
Copy link
Author

ralish commented Mar 14, 2019

@piroor: I'm still seeing this issue having tested with TTS 2.8.4 which appears to include the fix. Exact same reproduction steps and environment as in the original issue description except with the newer TTS release. Any ideas? Please let me know if I can provide any further information to assist.

@piroor
Copy link
Owner

piroor commented Mar 14, 2019

@ralish How did you open the new tab (it should inherit the container of the active tab) as a child of the active tab? I've tried three methods described at #2176 (comment) but all new tabs inherit the container of the active tab as expected.

@ralish
Copy link
Author

ralish commented Mar 15, 2019

@piroor: I think this may be me failing to fully understand the feature and possibly some buggy behaviour. I've retested again on a clean Firefox 65.0.2 x64 install with TTS 2.8.5 with these results.

What I'm Seeing
After following Steps to reproduce (1-4):

  • Works: Middle-click on TTS sidebar "plus" button
  • Works: Open TTS sidebar "plus" button drop-down -> Child Tab
  • Works: Middle-click on "plus" button in horizontal tab toolbar (top of window)
  • Doesn't work: Create new tab with Ctrl+T

That last one is maybe expected to not work as it's creating a new independent tab and not a child tab? Your earlier comment seems to suggest it worked for you though?

What I'm After
What I'm wanting is for containers to be "sticky". So when opening a new tab the container of the previously focused tab is used unless it's explicitly overridden (e.g. via manual container selection or configuring a domain to always open within a specific container). This might be considered a feature or enhancement as an extra step beyond what Inherit the container of the parent tab to a new blank tab is intended to do?

What are your thoughts?

@piroor
Copy link
Owner

piroor commented Mar 15, 2019

Ctrl-T opens an independent new tab by default, and you need to choose a TST option manually to get a new child tab with the shortcut: TST options => "New Tabs Behavior" => "Behavior for new tab actions (other toolbar buttons, keyboard shortcuts, and others)" => "Open new blank tab as" => "a child of the current tab".

As the feature is labeled with "of the parent tab", new independent tab doesn't inherit the container of the previously active non-parent tab. If you expect that new tabs always inherit the container of the previously active tab, TST doesn't do that - this is an intentonal design of TST.

Why TST does that?: because I believe that TST should does things around tree of tabs. "Inheritance of the container from a parent tab" looks reasonable on the policy. On the other hand, "inheritance of the container from previously active tab" looks out of the scope. I think that such an behavior should be implemented by something other addon which concentrates to management of containers, for example:

@ralish
Copy link
Author

ralish commented Mar 19, 2019

Thanks @piroor. It'd be really convenient to have TTS do this natively but I understand your concern around feature creep and diluting the goals of TTS. I'll take a look at Conex and also note that the main Containers extension has a popular feature request open for effectively the same thing: mozilla/multi-account-containers#462.

@ralish
Copy link
Author

ralish commented Mar 25, 2019

Closing this as the bug has been addressed and the other is a feature request with no intent to implement.

@ralish ralish closed this as completed Mar 25, 2019
@paravz
Copy link

paravz commented Oct 22, 2020

Perhaps the issue is back, since i cannot configure TST in FF 82 (same in 81 and 80) to open a new blank tab a child of the current tab using "Ctrl+T". I played with "Guess a newly opened tab...", but can't make it work. Pressing "+" in TST toolbar works as expected - new tab created a child.

To note:

  • in FF settings my new tabs are created with "Blank Page" (dropdown option)
  • new tabs have "New Tab" Title in TST tree but no Title or address bar entry in FF (empty addess bar, not about:blank or about:newtab)

@piroor
Copy link
Owner

piroor commented Oct 23, 2020

@paravz I've confirmed with following steps:

  1. Start Firefox (with clean profile.)
  2. Go to the Options page and set as:
    • Home => New Windows and Tabs => New tabs => Blank Page
  3. Install TST 3.5.34.
  4. Go to the TST's Options and set as:
    • New Tabs Behavior => Basic control for New Blank Tabs => Open new blank tab as => a child of the current tab
    • New Tabs Behavior => Basic control for New Blank Tabs => Guess a newly opened tab as... => about:blank
    • New Tabs Behavior => Basic control for New Blank Tabs => Container: =>Inherit from the parent tab on the tree
  5. Long-press the "+" button in the TST sidebar.
  6. Choose "Work". Then a new blank tab is opened with the "Work" container.
  7. Hit the keyboard shortcut Ctrl-T.
    • Expected result: a new blank tab is opened with the "Work" container, as a child of the active tab.
    • Actual result: a new blank tab is opened at the end of the tab bar with the default container.

Does this match to your case, then sadly this is a known issue and hard (or impossible) to be fixed on TST due to restrictions of WebExtensions API. TST cannot detect "a new blank tab is intentionally opened by the user", because all new tabs are initially opened with the about:blank URL even if you open a new tab from a link.

There is a workaround: assigning something shortcut for the command "Open a new tab: Child Tab" at the add-ons manager. about:addons => click the gear button => Manage Extension Shortcuts => Tree Style Tab => Show 40 More => Open a new tab: Child Tab => set something shortcut like Ctrl+Alt+T, then you'll get a child tab with an inherited container.

@paravz
Copy link

paravz commented Oct 23, 2020

Yes, this is exactly the issue, thank you @piroor for perfectly outlining the use case AND providing a perfect workaround!

I did not know shortcuts per extensions were even possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants