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

[Enhancement] Ability to cycle between the tab group only #3324

Open
sathishmanohar opened this issue Apr 19, 2023 · 9 comments
Open

[Enhancement] Ability to cycle between the tab group only #3324

sathishmanohar opened this issue Apr 19, 2023 · 9 comments

Comments

@sathishmanohar
Copy link

With tree style tabs I have tabs like

- Topic 1
    - Related 1
        - Deep Link 1
    - Related 2
    - Related 3
- Topic 2
    - Related 1
        - Deep Link 1
    - Related 2
    - Related 3

Here tabs within Topic 1 and Topic 2 are related to each other. So cycling between only those topics will be great for the workflow and to keep web browsing in context.

For this feature to work. There can be a customization option to

  • cycle with ctrl+tab and ctrl+shift+tab only within a root parent.
  • jump to next/previous parent node with ctrl+shift+n and ctrl+shfit+p
@piroor
Copy link
Owner

piroor commented Apr 22, 2023

Do you mean following?:

Tabs:

  • A: Topic 1
    • B: Related 1
      • C: Deep Link 1
    • D: Related 2
    • E: Related 3
  • F: Topic 2
    • G: Related 1
      • H: Deep Link 1
    • I: Related 2
    • J: Related 3

Cycling as B => C => D => E => B => C => ... when the topic 1 is focused.
Cycling as G => H => I => J => G => H => ... when the topic 2 is focused.

@irvinm
Copy link
Contributor

irvinm commented Apr 22, 2023

I was thinking it would be more like: (OP might have another view)

Going down might be: <anything in topic 1> => F => K (assuming K was Topic 3)
Going up might be: K => F => A ... or J => F => A

I actually wrote an addon today as it seemed fairly interesting. (Waiting on AMO approval - https://github.com/irvinm/Parent-Tab-Switcher)

It works well with normal tabs, but am seeing some strangeness with TST Group Tabs and how it is assigned its openerTabID and if it gets updated or not when the tab is moved. (Everything looks fine with the tab properties with TST, but this addon shouldn't need to rely on anything from TST but only the openerTabID)

Example:

Starting point with some random tabs, you can see there are 5 tabs at the root and only 5 tabs that have undefined openerTabID ... good.

image

Now I duplicated (Shift+Reload tab) "Group 3" to "NEW" and then dragged it to the root. In this case everything is the same except for the new tab but as it is still assigned a openerTabID, and thus it won't be selected to be switched to and it gets skipped over.

image

Here is what it looks like live just going from bottom to top and back:

2023-04-22_17-19-18.mp4

I will say this issue goes away after restarting the browser, so it might be an issue with Firefox and\or the current Developer's Edition version. After the AMO approves it, I will experiment more with the current version of FF.

@irvinm
Copy link
Contributor

irvinm commented Apr 22, 2023

@piroor ... nevermind. This issue also happens with normal tabs and Firefox special tabs. It is not TST specific. I'll dig into it more. Strange that it resolves itself after a browser restart.

@irvinm
Copy link
Contributor

irvinm commented Apr 22, 2023

Ok, irony at its best ... this looks related to a bug you opened 6 six years ago. (https://bugzilla.mozilla.org/show_bug.cgi?id=1409262) Maybe even more ironic that someone said they were going to be working on that issue and were assigned 4 months ago. (However, this does mean that this new addon would require TST to be installed to ensure that openerTabID gets updated as needed ... and that the defect would need to be resolved in order to work real-time)

@sathishmanohar
Copy link
Author

@piroor Yes. I meant something like this. Or it can also include the parent tab of the current tab during cycling. So for Topic 1. Cycling as A => B => C => D => E => A => B => C =>

Cycling as B => C => D => E => B => C => ... when the topic 1 is focused. Cycling as G => H => I => J => G => H => ... when the topic 2 is focused.

when cyclic like this there will be a need to jump to another topic. This was my second point about

  • jump to next/previous parent node with ctrl+shift+n and ctrl+shfit+p

This is the part @irvinm is working on. It looks cool.

Essentially, The feature I am looking for is scoping the tab cycling within the current topic and jump to topics all using keyboard shortcuts.

piroor added a commit that referenced this issue Apr 24, 2023
@piroor
Copy link
Owner

piroor commented Apr 24, 2023

Thank you for more descriptions.

It does not match to your idea but I've realized that "focus previous sibling" and "focus next sibling" commands do not cycle focus, so I've fix the restriction with the commit cfb4227. Now you can cycle focus between tabs as: B => D => E => B ... This change should help you to move focus at your use case.

@sathishmanohar
Copy link
Author

Awesome! I already have key bindings for next-sibling and prev-sibling so this going to come in handy.

In this regard, I am looking for two ways of cycling.

"focus next parent", "focus previous parent"

When advancing within a parent through sibling and children while at the last tab for the parent (top level tab). Jump to parent or first child. Basically cycle within the parent.

@sathishmanohar
Copy link
Author

sathishmanohar commented Apr 24, 2023

Implementation wise this feature can be called as "focus mode" or something. This can be like pinning. When focus mode is enabled tabbing cycles within the parent and when it is turned off tabbing continues to next parent like usual.

@polysquirrel
Copy link

I am not exactly sure what the consensus is on the potential solution, but I'd like to see keystrokes for 'next sibling'/'previous sibling' and 'parent tab' ('child tab' is already handled by ctrl+tab.

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

No branches or pull requests

4 participants