Page 1 of 1

[Fixed] Icon appearance setting inconsistency involving Private Window

Posted: Sat Nov 19, 2022 6:54 pm
by barbaz
I had my NoScript icons setting switched to Vintage Blue, but wanted to try Modern Red with the new logo in NoScript 11.4.13rc2. So, went to NoScript Options > Appearance, flipped the icon switch. It seemed to work. But now, sometimes when interacting with the NoScript popup in a Private Window, it'll switch to displaying Vintage icons?

Once in this state, interactions with NoScript toolbar icon / popup in the Private Window will flip the display to Vintage, and such interactions in the normal window flip it to Modern Red.

Why would there be a difference between Private Window and regular window here?

Re: Icon appearance setting inconsistency involving Private Window

Posted: Sat Nov 19, 2022 8:09 pm
by Giorgio Maone
In order to avoid flickering, the Implementation of themes uses the DOMStorage API, which is synchronous but is also compartmentalized like cookies (also for extensions windows) and therefore you end with different settings in private windows. I do consider it a bug but didn't prioritize it so far. I'll check if it can be done better.

Re: Icon appearance setting inconsistency involving Private Window

Posted: Sun Nov 20, 2022 9:46 pm
by Giorgio Maone
Fixed in latest development build, thanks.

v 11.4.13rc3
============================================================
x Fixed private windows always falling back to Vintage Blue
theme (thanks barbaz for report)

x Fixed prompts's vertical centering altered by
fit-to-content algorithm error (thanks barbaz for report)

Re: Icon appearance setting inconsistency involving Private Window

Posted: Mon Nov 21, 2022 1:46 am
by barbaz
I'm still able to reproduce this in 11.4.13rc3, new profile:

1) NoScript Options > Appearance, set icon theme to Vintage Blue

2) Open a Private Window

3) From the Private Window: NoScript Options > Appearance, flip the icon toggle back to Modern Red

Now when clicking on the NoScript icon in the normal window, Vintage Blue icons are displayed, while clicking it in the Private Window switches display to the expected Modern Red.

In my main profile, this behavior persists, and carries over to new Private Windows.

In clean profile, it's slightly different: if the Private Window is closed, and a new Private Window opened, the expected Modern Red is used for only one interaction in the Private Window. Subsequent interactions consistently display only Vintage Blue.

Also, if the NoScript Options tab from (2) is left open, it doesn't reflect the change in Appearance setting from the Private Window. Ok, maybe not too surprising, maybe it just needs a reload...but reloading still doesn't reflect the change. Nor does closing the NoScript Options tab in that window and opening a new one from the NoScript popup in that window. But opening Web Console on the NoScript Options page in the normal window, and running this before and after toggling the icon setting in the Private Window...

Code: Select all

chrome.storage.local.get(null, console.log);
... shows that the setting was indeed changed.

Re: Icon appearance setting inconsistency involving Private Window

Posted: Mon Nov 21, 2022 9:48 pm
by Giorgio Maone
Please check latest development build, thanks.
v 11.4.13rc4
============================================================
x Ensure theme changes are synchronized across windows,
including private ones (thanks barbaz for reporting)
x Work-around for window position not always changing on
first update() call

Re: Icon appearance setting inconsistency involving Private Window

Posted: Mon Nov 21, 2022 9:57 pm
by barbaz
Fixed, thank you! Image