Bug 1593573 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Since we are only setting `.hidden` on the category item, the logic `reorderCategoryItem` doesn't realize that it needs to pretend that the social category is basically always "None Detected".

Here's just one way to get into a state where the bug is visible:
1. Set `urlclassifier.features.socialtracking.annotate.blacklistHosts` to `social-tracking-protection-digest256.dummytracker.org` (currently necessary but this might be worked around on Steve's site at some point).
2. Open https://senglehardt.com/test/trackingprotection/test_pages/social_tracking_protection.html
3. Open `about:config` in a new tab and `privacy.socialtracking.block_cookies.enabled` to false.
4. Close the tab. The previous tab with Steve's site will be selected.
5. Now, open the protections panel.

Expected:
The "Allowed" section is completely hidden

Actual:
The "Allowed" section header is shown but with no items under it. (Screenshot attached.)

Gary, do you want to work on this? I _think_ this should work:
1. Instead of setting `.hidden` on the category item, set a custom attribute (e.g. `uidisabled` or something)
2. Add a CSS rule to set `display: none;` on elements with this attribute.
3. Add `|| categoryItem.hasAttribute("uidisabled")` to the condition [here](https://searchfox.org/mozilla-central/rev/35873cfc312a6285f54aa5e4ec2d4ab911157522/browser/base/content/browser-siteProtections.js#1880)
Since we are only setting `.hidden` on the category item, the logic in `reorderCategoryItem` doesn't realize that it needs to pretend that the social category is basically always "None Detected".

Here's just one way to get into a state where the bug is visible:
1. Set `urlclassifier.features.socialtracking.annotate.blacklistHosts` to `social-tracking-protection-digest256.dummytracker.org` (currently necessary but this might be worked around on Steve's site at some point).
2. Open https://senglehardt.com/test/trackingprotection/test_pages/social_tracking_protection.html
3. Open `about:config` in a new tab and `privacy.socialtracking.block_cookies.enabled` to false.
4. Close the tab. The previous tab with Steve's site will be selected.
5. Now, open the protections panel.

Expected:
The "Allowed" section is completely hidden

Actual:
The "Allowed" section header is shown but with no items under it. (Screenshot attached.)

Gary, do you want to work on this? I _think_ this should work:
1. Instead of setting `.hidden` on the category item, set a custom attribute (e.g. `uidisabled` or something)
2. Add a CSS rule to set `display: none;` on elements with this attribute.
3. Add `|| categoryItem.hasAttribute("uidisabled")` to the condition [here](https://searchfox.org/mozilla-central/rev/35873cfc312a6285f54aa5e4ec2d4ab911157522/browser/base/content/browser-siteProtections.js#1880)

Back to Bug 1593573 Comment 0