gorhill / uMatrix

uMatrix: Point and click matrix to filter net requests according to source, destination and type
GNU General Public License v3.0
4.56k stars 473 forks source link

[Firefox] UMatrix doesn't keep "show only domains" in Private Window #852

Closed Diego-BF closed 6 years ago

Diego-BF commented 6 years ago

When in private window, UMatrix in Firefox doesn't keep the option to show only the domains in the panel, like Chrome's version does.

Steps to reproduce:

screenshot from 2017-11-27

P.S.: Thanks for your extensions!

gorhill commented 6 years ago

Browser issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1313401.

gorhill commented 6 years ago

See if this workaround works for you: http://forums.mozillazine.org/viewtopic.php?f=9&t=3034189.

Diego-BF commented 6 years ago

Thanks for the suggested workaround @gorhill , but it didn't work even in a new profile only with UMatrix.

Now I have a question, if you don't mind: UBlock Origin in Advanced Mode have the desired behavior when set to show only domains when I go to a private window. Why is it possible? Does he not suffer from the same bug?

gorhill commented 6 years ago

Why is it possible? Does he not suffer from the same bug?

Because the default in uBO is to not show all subdomains. The default in uMatrix is to show all subdomains. uBO/uMatrix need to save a setting if and only if it is different from the default behavior.

Diego-BF commented 6 years ago

Because the default in uBO is to not show all subdomains

But if I set uBO in Firefox to show all subdomains and go to a private window, in my current and in a new profile, it keeps showing all the subdomains.

gorhill commented 6 years ago

But if I set uBO in Firefox to show all subdomains and go to a private window, in my current and in a new profile, he keeps showing all the subdomains.

Ok, I don't have an answer for this, I need to investigate.

gorhill commented 6 years ago

Ok, so I did not remember this, but with uBO, the collapsed state is part of user settings, it's being saved using the webext storage, and as such it means it's also exported/imported when you back up/restore your settings.

With uMatrix, this is not a user setting, this is a local UI setting, and so window.localStorage is used for this. The reason uMatrix does not persist in user settings is because each distinct base domain can be collapsed independently of the others (not possible with uBO), and given this, this means one could end up with a inordinate amount of setting information just for that collapsing feature in uMatrix (theoretically one could collapse 100s of base domains without ever touching the global collapse on the all cell).

However you will find the same issue with uBO with regard to the 3rd-party filters pane, where each category can be collapsed independently of the others, and I considered this was just UI candy and there was no need to save this as a user settings -- we do not want these to grow unduly by being populated with what is purely a cosmetic (though convenient) settings.

Diego-BF commented 6 years ago

Ok, thanks for the clarification!

I thought of an alternative that I don't know if it would be cumbersome and possible to implement.

Transform the "collapse/show all" to a user setting (maybe even putting an option in settings to set if the user want to show or collapse all in the panel by default) and keep the independent collapsed/show domains as a UI setting that, if setted by the user, overrides the collapse/show all.

gorhill commented 6 years ago

Transform the "collapse/show all" to a user setting

Yes, why not, there is no good reason to not save only this one.