Improve on-call + escalation policies empty states for people without permissions
Problem
From #337237 (closed) - only maintainers can create on-calls schedules and escalation policies. Right now, if developers try to create a schedule, they can still see the modal, but they see an error letting them know that they can't actually create the schedule, because they don't have proper permissions.
Do we want to maintain this behavior?
Pros: it allows people to see the kind of functionality that's available - to take a bit of a tour. This might mean they ask for permissions, or get curious about how to access the feature.
Cons: they can't actually do anything in the modal. Should we instead just stop them from seeing the modal altogether (for instance, by hiding the "create schedule" button on the empty state)? Alternately, we could update the empty state text for people without the proper permissions, linking them to the members page and letting them know that they can request access from one of the project owners/maintainers.
Proposal
Following existing patterns elsewhere in the product, for everyone who isn't a maintainer, we should update the empty state to clarify the specific actions they need to take to access the feature. This will mean updating the empty state text/buttons as follows:
Escalation policies empty state | On-call schedule empty state |
---|---|
![]() |
![]() |
- Update the explanatory text to clarify what actions need to be taken to get proper access to the feature (text from this comment)
- Replace the button with a link. The link will direct people to the project member's list
If possible, we can also have the members list pre-filtered to show project owners, for example:
This could be a separate iteration, however, and isn't required for the MVC.
Related information
Current Pajamas documentation on empty states