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

Ignore window if it's just the tab manager in one tab #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cormacrelf
Copy link

No description provided.


/** If a window only contains our extension as a popup in a single tab, we
* don't want it polluting its own tab manager, where it will always be

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing here seems to be off. Also, probably no need for the second astrisk when you start the comment block. :)

@Penguin-Guru
Copy link

Assuming this works, it seems like a nice improvement. Is it convenient to also ignore windows with only empty tabs? I think it might actually be a good idea to ignore empty tabs even in windows that won't be ignored, but that's probably a different feature for a different PR. Just some ideas.

@mastef
Copy link
Contributor

mastef commented Nov 19, 2021

First of all - thank you for helping by submitting a PR.

I'm a bit concerned about the functionality though - how do I get back to the window that has the tab manager ( e.g. from a popup ) 🤔 Maybe we should simply move this window to the end of the list, instead of hiding it?

Or create a separate section like "Minimized windows" - called "Other". But then we'll lose simplicity.

@cormacrelf
Copy link
Author

Oh, is there a way to check the identity of the current tab and compare it? That would allow hiding it from only the one through which it is viewed.

@cormacrelf
Copy link
Author

Basically this is all an A/B problem where what I actually want is a floating window that doesn't get hidden from view when other windows are activated. (Especially since clicking anywhere in a single-tab-window tab manager switches to another window.) I don't think you can do that though, hence this.

@mastef
Copy link
Contributor

mastef commented Nov 19, 2021

Oh, is there a way to check the identity of the current tab and compare it? That would allow hiding it from only the one through which it is viewed.

We know if we're in a popup, or own window by checking window.inPopup.

If we're in own window, we can check await browser.tabs.getCurrent() which should be our tab.

And then we can work from there 🤔

Did you mean that?

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

Successfully merging this pull request may close these issues.

3 participants