danwent / Perspectives

Perspectives Firefox Extension
http://perspectives-project.org
66 stars 19 forks source link

Redesign whitelist preference UI #136

Closed ghost closed 10 years ago

ghost commented 10 years ago

The current whitelist UI is a simple textfield using a comma-separated string of regexes. We could redesign it to a table listing domains and checkboxes for enable/disable, "include subdomains". The table should support sorting and multi-selection for remove- and import/export-buttons. Any change needs to be backwards compatible to the old "perspectives.whitelist" preference. If there is any change to the preference it might be updated to the new "extensions." prefix as well (see #59), thus something like "if perspectives.whitelist still exists, it's old format, convert it and write it to extensions.perspectives.whitelist".

Also see #63 for "temporary whitelisted domains". The table may have an additional column for a "temporary" checkbox.

ghost commented 10 years ago

Subdomain handling is still the same regex-mess like before just with a nice and sortable table around it. Changes are backwards compatible so even though it's not perfect, it's still better than before I think. Temporary whitelisting and import/export is not yet supported but should be easy to add.

The problem with using checkboxes for subdomains AND at the same time being backwards compatible is that the subdomains may include any strings (like "www") which are lost once we replace them with . Consider for example: ```^www.example.com$,..github.com$```, there is no subdomain for github.com to reactivate.

daveschaefer commented 10 years ago

I think simplifying this would be good, even if it means we lose some flexibility. We don't want people to enter a terrible regex and make themselves insecure.

daveschaefer commented 10 years ago

I freaking LOVE this patch! :) Excellent idea, and excellent work. I especially love that you can click to edit the regex inside the tree view; that's glorious :)

This gives me a few ideas for other improvements too:

daveschaefer commented 10 years ago

Some screenshots of the new UI in action:

Screenshot 1 Screenshot 2 - editing