You have given me an idea though - we could improve the UI by not showing the "Unblock" button if a message is not individually blocked. The button is confusing UI since it implies the message is blocked, when in reality it's the group that's blocked (or the provider is excluding the message, though we don't currently have any provider exclusions). So clicking the button will have no real effect. I guess we could potentially show an "Unblock group" button or "Remove provider exclusion" button, when those functions would be relevant. It's easy to remove an exclusion since those are just part of the JSON value of the provider pref. But groups are tricky since they can be disabled as a result of prefs or by simply setting `enabled: false` in the Remote Settings record. If it's just disabled by pref, then it's possible to re-enable by setting all the prefs to true. But if it's disabled in the base JSON definition, then there's nothing Firefox can do to re-enable the group on RS. The trouble is that ASRouter overwrites `group.enabled` with the userPreferences values. I suppose we could add a new property `group.userEnabled` and leave the original `group.enabled` alone. Then we'd be able to check whether the group is fully disabled on RS, or just blocked by pref. So if `group.enabled && !group.userEnabled`, we could show an "Unblock group" button that would re-enable the group's prefs. But if `!group.enabled` then we'd just show no button at all, since there's no way to unblock the group. Another nice feature would be to add a way to toggle group preferences, when applicable. The user preferences column in the groups table could have checkboxes added for each pref, so you could easily toggle them without needing to go to about:config and search the pref. Perhaps when a message is showing as blocked because of `message group blocked`, and it's because of a user preference, we could show the name of that preference and put a checkbox toggle there as well. That might be better than an "unblock group" button since it's more transparent what's going on.
Bug 1861248 Comment 11 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
You have given me an idea though - we could improve the UI by not showing the "Unblock" button if a message is not individually blocked. The button is confusing UI since it implies the message is blocked, when in reality it's the group that's blocked (or the provider is excluding the message, though we don't currently have any provider exclusions). So clicking the button will have no real effect. I guess we could potentially show an "Unblock group" button or "Remove provider exclusion" button, when those functions would be relevant. It's easy to remove an exclusion since those are just part of the JSON value of the provider pref. But groups are tricky since they can be disabled as a result of prefs or by simply setting `enabled: false` in the Remote Settings record. If it's just disabled by pref, then it's possible to re-enable by setting all the prefs to true. But if it's disabled in the base JSON definition, then there's nothing Firefox can do to re-enable the group on RS. The trouble is that ASRouter overwrites `group.enabled` with the userPreferences values. I suppose we could add a new property `group.userEnabled` and leave the original `group.enabled` alone. Then we'd be able to check whether the group is fully disabled on RS, or just blocked by pref. So if `group.enabled && !group.userEnabled`, we could show an "Unblock group" button that would re-enable the group's prefs. But if `!group.enabled` then we'd just show no button at all, since there's no way to unblock the group. Another nice feature would be to add a way to toggle group preferences, when applicable. The user preferences column in the groups table could have checkboxes added for each pref, so you could easily toggle them without needing to go to about:config and search the pref. Perhaps when a message is showing as blocked because of `message group blocked`, and it's because of a user preference, we could show the name of that preference and put a checkbox toggle there as well. That might be better than an "unblock group" button since it's more transparent what's going on. Edit: Another thing I just noticed is that a message is technically considered blocked if its `message.campaign` is in the messageBlockList. And we'd show the Unblock button in that case. But that button would not unblock the message, since it calls `unblockMessageById` for `message.id`, not `message.campaign`. This isn't a big deal since we don't use `message.campaign`, but it might be worth changing if we implement the other suggestions.
You have given me an idea though - we could improve the UI by not showing the "Unblock" button if a message is not individually blocked. The button is confusing UI since it implies the message is blocked, when in reality it's the group that's blocked (or the provider is excluding the message, though we don't currently have any provider exclusions). So clicking the button will have no real effect. I guess we could potentially show an "Unblock group" button or "Remove provider exclusion" button, when those functions would be relevant. It's easy to remove an exclusion since those are just part of the JSON value of the provider pref. But groups are tricky since they can be disabled as a result of prefs or by simply setting `enabled: false` in the Remote Settings record. If it's just disabled by pref, then it's possible to re-enable by setting all the prefs to true. But if it's disabled in the base JSON definition, then there's nothing Firefox can do to re-enable the group on RS. The trouble is that ASRouter overwrites `group.enabled` with the userPreferences values. I suppose we could add a new property `group.userEnabled` and leave the original `group.enabled` alone. Then we'd be able to check whether the group is fully disabled on RS, or just blocked by pref. So if `group.enabled && !group.userEnabled`, we could show an "Unblock group" button that would re-enable the group's prefs. But if `!group.enabled` then we'd just show no button at all, since there's no way to unblock the group. Another nice feature would be to add a way to toggle group preferences, when applicable. The user preferences column in the groups table could have checkboxes added for each pref, so you could easily toggle them without needing to go to about:config and search the pref. Perhaps when a message is showing as blocked because of `message group blocked`, and it's because of a user preference, we could show the name of that preference and put a checkbox toggle there as well. That might be better than an "unblock group" button since it's more transparent what's going on.
You have given me an idea though - we could improve the UI by not showing the "Unblock" button if a message is not individually blocked. The button is confusing UI since it implies the message is blocked, when in reality it's the group that's blocked (or the provider is excluding the message, though we don't currently have any provider exclusions). So clicking the button will have no real effect. I guess we could potentially show an "Unblock group" button or "Remove provider exclusion" button, when those functions would be relevant. It's easy to remove an exclusion since those are just part of the JSON value of the provider pref. But groups are tricky since they can be disabled as a result of prefs or by simply setting `enabled: false` in the Remote Settings record. If it's just disabled by pref, then it's possible to re-enable by setting all the prefs to true. But if it's disabled in the base JSON definition, then there's nothing Firefox can do to re-enable the group on RS. The trouble is that ASRouter overwrites `group.enabled` with the userPreferences values. I suppose we could add a new property `group.userEnabled` and leave the original `group.enabled` alone. Then we'd be able to check whether the group is fully disabled on RS, or just blocked by pref. So if `group.enabled && !group.userEnabled`, we could show an "Unblock group" button that would re-enable the group's prefs. But if `!group.enabled` then we'd just show no button at all, since there's no way to unblock the group. Another nice feature would be to add a way to toggle group preferences, when applicable. The user preferences column in the groups table could have checkboxes added for each pref, so you could easily toggle them without needing to go to about:config and search the pref. Perhaps when a message is showing as blocked because of `message group blocked`, and it's because of a user preference, we could show the name of that preference and put a checkbox toggle there as well. That might be better than an "unblock group" button since it's more transparent what's going on. Edit: It turns out provider exclusions are irrelevant anyway because we literally filter excluded messages out of the messages array. So excluded messages aren't given to ASRouterAdmin in the first place. Rather than showing as blocked, they just aren't rendered at all.