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: add monthly rotations UI #3257

Merged
merged 12 commits into from
Oct 10, 2023
Merged

feat: add monthly rotations UI #3257

merged 12 commits into from
Oct 10, 2023

Conversation

allending313
Copy link
Contributor

@allending313 allending313 commented Aug 31, 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:
Adds the monthly rotation features to the UI. Users can now select the monthly rotation option when creating or editing a rotation. Includes warning when handoff date is after the 28th as future handoff times may not be intuitive (example: jan 30th handoff date -> march 2nd, as February does not have a 30th date). This is done to keep the api rotation calculation and implementation clean.

Which issue(s) this PR fixes:
#3196

Screenshots:
Screenshot 2023-08-31 at 5 01 36 PM
Screenshot 2023-08-31 at 5 05 56 PM

Describe any introduced user-facing changes:
Additional rotation type option in create/edit rotation form.
Handoff summary is updated to reflect monthly rotation type. ("every month..." vs "every 2 months...")

Copy link
Contributor

@Forfold Forfold left a comment

Choose a reason for hiding this comment

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

Can we get the margin of the warning to match the errors?

Screenshot 2023-09-20 at 1 26 15 PM

Screenshot 2023-09-20 at 1 26 12 PM

@allending313
Copy link
Contributor Author

allending313 commented Sep 21, 2023

Can we get the margin of the warning to match the errors?

Does this work?

Screenshot 2023-09-21 at 12 37 39 PM

@github-actions github-actions bot added size/m and removed size/s labels Sep 21, 2023
@Forfold
Copy link
Contributor

Forfold commented Sep 22, 2023

yeah definitely!

Forfold
Forfold previously approved these changes Sep 22, 2023
@mastercactapus
Copy link
Member

mastercactapus commented Sep 26, 2023

Not sure if this is related to the monthly change or not, but seems odd to have negative values:
image

I'd also expect the handoff times to include the selected one -- maybe this is a bug triggered when the handoff time is in the future? (i.e., likely API/backend code issue)

image

@allending313 allending313 force-pushed the feat/monthly-rotation-ui branch from af41827 to f6abc60 Compare September 27, 2023 14:20
@github-actions github-actions bot added size/m and removed size/xl labels Sep 27, 2023
Forfold
Forfold previously approved these changes Oct 2, 2023
Copy link
Contributor

@Forfold Forfold left a comment

Choose a reason for hiding this comment

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

LGTM!

Forfold
Forfold previously approved these changes Oct 2, 2023
Forfold
Forfold previously approved these changes Oct 2, 2023
mastercactapus
mastercactapus previously approved these changes Oct 6, 2023
@allending313 allending313 dismissed stale reviews from mastercactapus and Forfold via ba331d7 October 6, 2023 15:03
@allending313 allending313 requested a review from Forfold October 10, 2023 14:09
@allending313 allending313 merged commit 4c6a92c into master Oct 10, 2023
@allending313 allending313 deleted the feat/monthly-rotation-ui branch October 10, 2023 16:07
andrewbenington added a commit that referenced this pull request Oct 17, 2023
commit 6f17c75
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:44:00 2023 -0700

    build(deps-dev): bump @mui/x-data-grid from 6.16.1 to 6.16.2 (#3364)

    Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-data-grid) from 6.16.1 to 6.16.2.
    - [Release notes](https://github.com/mui/mui-x/releases)
    - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/mui/mui-x/commits/v6.16.2/packages/grid/x-data-grid)

    ---
    updated-dependencies:
    - dependency-name: "@mui/x-data-grid"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4affe40
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:43:03 2023 -0700

    build(deps): bump @babel/traverse from 7.22.20 to 7.23.2 (#3367)

    Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.20 to 7.23.2.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

    ---
    updated-dependencies:
    - dependency-name: "@babel/traverse"
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1209194
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:41:19 2023 -0700

    build(deps-dev): bump @types/react-transition-group from 4.4.6 to 4.4.7 (#3363)

    Bumps [@types/react-transition-group](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-transition-group) from 4.4.6 to 4.4.7.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-transition-group)

    ---
    updated-dependencies:
    - dependency-name: "@types/react-transition-group"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 53c1c7e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 16 12:22:54 2023 -0700

    build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#3366)

    Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3.
    - [Release notes](https://github.com/grpc/grpc-go/releases)
    - [Commits](grpc/grpc-go@v1.58.2...v1.58.3)

    ---
    updated-dependencies:
    - dependency-name: google.golang.org/grpc
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 48d08f2
Author: Nathaniel Caza <[email protected]>
Date:   Fri Oct 13 11:31:51 2023 -0500

    increase variance in delayminutes (#3359)

commit 4b95ef8
Author: Lakshmi2107 <[email protected]>
Date:   Fri Oct 13 20:45:00 2023 +0530

    add partial search for description (#3195)

    * add partial search for description

    * add contains func

    * escape contains search

    ---------

    Co-authored-by: Lakshmi V <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 3671734
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Oct 12 11:04:33 2023 -0500

    build(deps): bump golang.org/x/net from 0.16.0 to 0.17.0 (#3360)

    Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0.
    - [Commits](golang/net@v0.16.0...v0.17.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/net
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 190c9e5
Author: Katie Sydlik-Badgerow <[email protected]>
Date:   Wed Oct 11 16:34:07 2023 -0400

    ui/service-metrics: service metrics hooks (#3300)

    * add new hook and worker

    * clean up useServiceMetrics

    * add comments

    * use specific type as metric keys

    * update useServiceMetrics hook and add filtering

    * update search to include maintenance mode

commit 53b2e35
Author: Nathaniel Caza <[email protected]>
Date:   Wed Oct 11 14:52:30 2023 -0500

    use sqlc for user favorites (#3288)

commit 2ed8e6f
Author: Nathaniel Caza <[email protected]>
Date:   Tue Oct 10 15:47:00 2023 -0500

    dev: Update Go 1.21.3 and deps (#3356)

    * update go to 1.21.3

    * update go deps

    * make generate

    ---------

    Co-authored-by: Nathaniel Cook <[email protected]>

commit 41754c3
Author: Leya Salazar <[email protected]>
Date:   Tue Oct 10 14:23:12 2023 -0500

    Add Webhook Documentation Links to UI (#3294)

    * working on formField file

    * webhook documentation link

    * delete id from url

    * removed changes to the forms files

    * Update web/src/app/escalation-policies/PolicyStepForm.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * remove more innecesary changes from form conversion work

    * extra line web/src/app/util/NumberField.tsx

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/util/MountWatcher.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/users/UserContactMethodForm.tsx

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/Form.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/FormContainer.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/FormField.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/context.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * remove id

    * open in new tab

    * support linking to doc section

    * link directly to webhook section in new tab

    * fix comment

    ---------

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 47b35fc
Author: Nathaniel Cook <[email protected]>
Date:   Tue Oct 10 12:18:27 2023 -0700

    alertmetrics: show metrics up to current time, instead of start of bucket (#3345)

    * show alerts to now in graph, update tooltip label

    * show header range properly

    * update headers

    * fix title

commit 5746a5d
Author: Allen Ding <[email protected]>
Date:   Tue Oct 10 15:11:41 2023 -0400

    chore: user contactmethod sqlc (#3310)

    * convert user/contactmethod to use sqlc

    * clean up validations

    * remove unnecessary validation

    * fix bugs from smoketest

    * clean up transactions with dbtx

    * fix transaction logic

    * remove db from cmstore, update query prefixes

    * remove unecessary newstore func

    ---------

    Co-authored-by: AllenDing <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 935a72a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 10 11:44:11 2023 -0500

    Bump @apollo/client from 3.8.4 to 3.8.5 (#3352)

    Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.8.4 to 3.8.5.
    - [Release notes](https://github.com/apollographql/apollo-client/releases)
    - [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md)
    - [Commits](apollographql/apollo-client@v3.8.4...v3.8.5)

    ---
    updated-dependencies:
    - dependency-name: "@apollo/client"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4c6a92c
Author: Allen Ding <[email protected]>
Date:   Tue Oct 10 12:07:45 2023 -0400

    feat: add monthly rotations UI (#3257)

    * add monthly rotation ui features

    * fix handoff summary and use new shiftLength field

    * revert unnecessary changes

    * fix hint alignment

    * update hint styling to match form helper text

    * fix ui bugs

    * fix linting

    * fix ui bugs

    * handle rel format in diff. timezone

    * fix cypress test

    * Update web/src/app/rotations/RotationForm.tsx

    Co-authored-by: Nathaniel Caza <[email protected]>

    ---------

    Co-authored-by: AllenDing <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 7e0a73d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 16:33:29 2023 -0500

    Bump golang.org/x/sys from 0.12.0 to 0.13.0 (#3350)

    Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.12.0 to 0.13.0.
    - [Commits](golang/sys@v0.12.0...v0.13.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/sys
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 8d56ab4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 15:59:37 2023 -0500

    Bump @mui/x-data-grid from 6.14.0 to 6.16.1 (#3346)

    Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-data-grid) from 6.14.0 to 6.16.1.
    - [Release notes](https://github.com/mui/mui-x/releases)
    - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/mui/mui-x/commits/v6.16.1/packages/grid/x-data-grid)

    ---
    updated-dependencies:
    - dependency-name: "@mui/x-data-grid"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit ca9d2bf
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 15:59:27 2023 -0500

    Bump github.com/spf13/viper from 1.16.0 to 1.17.0 (#3348)

    Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.16.0 to 1.17.0.
    - [Release notes](https://github.com/spf13/viper/releases)
    - [Commits](spf13/viper@v1.16.0...v1.17.0)

    ---
    updated-dependencies:
    - dependency-name: github.com/spf13/viper
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 952279b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 14:19:29 2023 -0500

    Bump @babel/core from 7.22.20 to 7.23.0 (#3354)

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.20 to 7.23.0.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.23.0/packages/babel-core)

    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit d2c1a5b
Author: Nathaniel Caza <[email protected]>
Date:   Mon Oct 9 13:45:06 2023 -0500

    fix wrong param (#3355)

commit 15a0cc5
Author: Nathaniel Caza <[email protected]>
Date:   Fri Oct 6 09:53:06 2023 -0500

    preserve line breaks in markdown (#3344)
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