Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: on call notification channel separation #3046

Merged
merged 16 commits into from
Jun 5, 2023

Conversation

andrewbenington
Copy link
Contributor

@andrewbenington andrewbenington commented May 24, 2023

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:

  • The dialog for creating/editing schedule on-call notifications now features a dropdown to select channel type
  • Slack channel/user groups have been separated into two channel types, selectable from the dropdown
    • The checkbox was removed, as its functionality is replaced by the dropdown
  • User Group notifications are no longer sent to the Slack channel unless there is an error with the User Group
  • The Value type for ScheduleOnCallNotificationsForm has been altered to be more accommodating of different notification channel types
  • Minor dev fix: use YARN_VERSION instead of assumed stable version
    • Fixes Usage Error: Invalid package manager specification in CLI arguments; expected a semver version from recent build changes

Which issue(s) this PR fixes:
#3045

Screenshots:
If applicable, add some screenshots here.
Screenshot 2023-05-24 at 4 21 43 PM
Screenshot 2023-05-24 at 4 21 47 PM

image

Describe any introduced user-facing changes:
To use Slack User Groups for schedule on-call notifications, the user must select "SLACK USER GROUP" from the new dropdown instead of checking a checkbox.

@andrewbenington andrewbenington changed the title Improve on call slack feat: on call notifications UI improvement May 24, 2023
@andrewbenington andrewbenington marked this pull request as ready for review May 24, 2023 18:18
@andrewbenington andrewbenington marked this pull request as draft May 24, 2023 18:29
@andrewbenington andrewbenington marked this pull request as ready for review May 24, 2023 19:31
Copy link
Member

@mastercactapus mastercactapus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the layout:

  • can we move the notification type selection below the notification options?
  • The Slack channel for user groups is for errors/issues, not as a fallback (from a user perspective)

Also, this needs the behavioral change in the backend -- ensuring user group updates don't send the regular channel notification.

@andrewbenington
Copy link
Contributor Author

For the layout:

* can we move the notification type selection below the notification options?

* The Slack channel for user groups is for errors/issues, not as a fallback (from a user perspective)

Also, this needs the behavioral change in the backend -- ensuring user group updates don't send the regular channel notification.

Just to clarify - no messages should be sent at all if there isn't an error updating the UG?

@mastercactapus
Copy link
Member

Correct, if the notification channel is SLACK_USER_GROUP no messages should be sent to the channel unless there is an error.

@andrewbenington andrewbenington changed the title feat: on call notifications UI improvement feat: on call notification channel separation May 25, 2023
@Forfold
Copy link
Contributor

Forfold commented May 31, 2023

We can probably disable the type field if there is only 1 type present/user groups are disabled:

Also maybe make the types Title Case?

Screenshot 2023-05-31 at 12 16 29 PM

@andrewbenington
Copy link
Contributor Author

We can probably disable the type field if there is only 1 type present/user groups are disabled:

Also maybe make the types Title Case?

Screenshot 2023-05-31 at 12 16 29 PM

Good idea about the type field.

And I made the types in all caps to stay in line with the personal contact method dropdown, which uses all caps. I'm fine with changing that to title case as well, but I think we should be consistent

@Forfold
Copy link
Contributor

Forfold commented May 31, 2023

Good point, could probably be a small change in its own PR since it's on the profile too.

When I go to create a duplicate user group, it only validates that the channel is the same (even though it's for error reporting). I think we should error on a duplicate user-group and set that as the first error to return if using that type, even if the channel for error messaging is different. This could also be a separate issue I think but we could maybe fix here.

Screenshot 2023-05-31 at 12 27 12 PM
Screenshot 2023-05-31 at 12 27 28 PM

@andrewbenington
Copy link
Contributor Author

Good point, could probably be a small change in its own PR since it's on the profile too.

When I go to create a duplicate user group, it only validates that the channel is the same (even though it's for error reporting). I think we should error on a duplicate user-group and set that as the first error to return if using that type, even if the channel for error messaging is different. This could also be a separate issue I think but we could maybe fix here.

Screenshot 2023-05-31 at 12 27 12 PM Screenshot 2023-05-31 at 12 27 28 PM

It will only show the error if both the user group and channel are the same as another existing rule. @mastercactapus says he thinks that's fine for now, and that we can refactor this in the future if we want to make the user group unique between rules.

mastercactapus
mastercactapus previously approved these changes May 31, 2023
@andrewbenington andrewbenington requested a review from Forfold June 5, 2023 18:32
@mastercactapus mastercactapus merged commit 958e4f8 into master Jun 5, 2023
@mastercactapus mastercactapus deleted the improve-on-call-slack branch June 5, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants