containers-theme icon indicating copy to clipboard operation
containers-theme copied to clipboard

Wrong theme for default tabs

Open TitanNano opened this issue 8 years ago • 9 comments

This is a follow up to my review on AMO.

My default theme is dark, after I installed your addon everything is good: screen shot 2017-09-22 at 22 20 06

Switching To a container tab, still everything great, works as described: screen shot 2017-09-22 at 22 20 18

Going back to my previous tab, Oops.... this is not my theme: screen shot 2017-09-22 at 22 20 29

TitanNano avatar Sep 22 '17 20:09 TitanNano

just found this on mdn:

Note that this will always reset the theme back to the original default theme, even if the user had selected a different theme before this extension's theme was applied.

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/theme/reset

TitanNano avatar Sep 22 '17 20:09 TitanNano

I think the easiest fix for this would be to imitate the white or dark theme with update() and not reset the theme.

TitanNano avatar Sep 22 '17 20:09 TitanNano

@TitanNano I don't know if that is possible to even detect. But perhaps we should fix that reset issue @nt1m?

jonathanKingston avatar Sep 29 '17 14:09 jonathanKingston

@jonathanKingston Not sure if this is an issue or whether this was intentional, the original developers of the theming API (:mikedeboer, :jaws or :K-9) will be able to tell.

Either way, this is something you can workaround in your add-on by using the management APIs to reset the theme to the last used theme. See this example: https://github.com/mdn/webextensions-examples/blob/master/theme-switcher/switcher.js

nt1m avatar Sep 29 '17 16:09 nt1m

@nt1m this won't work for multiple windows cleanly that I can see. I would need to enable the theme then change other windows to containers that might exist in a different window. I could fake it based on the theme name for the default ones but it's not the most perfect solution is it. Perhaps we need an option for reset to do this?

jonathanKingston avatar Oct 02 '17 03:10 jonathanKingston

Thanks a lot for creating this addon.

+1 for this issue. @jonathanKingston any update on this issue?

talha131 avatar Nov 05 '17 09:11 talha131

Maybe add option theme for not containers tabs?

Like this is here - https://github.com/WaldiPL/purplePrivateWindows and warming in description addon.

ghost avatar Jan 05 '18 13:01 ghost

Why not just SKIP setting/resetting the theme when the tab has no associated special purpose container? The current behavior is not acceptable for me, so i disable this extension until fixed. Thanks for the efforts on this nice idea though.

TriMoon avatar Jul 30 '19 12:07 TriMoon

on on install prompt

"oh, hey, it looks like you're using a theme. tell me which one so I can preserve it"

then post install & new tabs 'switch' to the selected theme

slowfar avatar Aug 01 '19 11:08 slowfar