Update Role Targeting in Broadcast Messages
Summary
The recent clean up of FF role_targeted_broadcast_messages
introduced non-intuitive behaviour to Broadcast Messages targeting.
Specifically that if you select a Role to target, this impacts where a broadcast message is displayed. This is not intuitive to anyone creating a broadcast message.
Previous Behaviour
Before the role change - a Broadcast Message would show when not under a group or project like on https://gitlab.com/
Current Behaviour
After the role change - a Broadcast Message will only show when you go under a group or project if you've selected a Role to target
Because Roles are associated with access to a group/project, the introduction of targeting by roles inadvertently also introduced group/project level visibility of broadcast messages.
Proposed changes
- Use progressive disclosure only to show the extra form fields when the radio option is selected.
- This reduces the initial cognitive load of seeing the entire form when loaded on the page.
- Add 'Target broadcast message' to the form
Default view
Target broadcast message
(x) Show to all users on all pages
( ) Show to all users on specific matching pages
( ) Show only on groups/project pages
Scenario: All users page matching a pattern
Target broadcast message
( ) Show to all users on all pages
(x) Show to all users on specific matching pages
Target path: [<pattern>]
( ) Show only on groups/project pages
Scenario: Only developers and maintainers on pages matching a path in group/project pages
Target broadcast message
( ) Show to all users on all pages
( ) Show to all users on specific matching pages
(x) Show only on groups/project pages
( ) All members
(x) Only to members with specific roles
[ ] Guest
[ ] Reporter
[x] Developer
[x] Maintainer
[ ] Owner
Pages to target
( ) All pages
(x) Specific matching pages
Target path: [<pattern>]