-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace AddPhoneNumber with AddDestination #492
Replace AddPhoneNumber with AddDestination #492
Conversation
Codecov Report
@@ Coverage Diff @@
## master #492 +/- ##
==========================================
+ Coverage 53.89% 57.07% +3.18%
==========================================
Files 85 85
Lines 3570 3553 -17
Branches 739 744 +5
==========================================
+ Hits 1924 2028 +104
+ Misses 1637 1516 -121
Partials 9 9
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will test it manually now, will approve later.
This PR was mostly noise from formatting changes. Please do not combine this many formatting changes (whitespace, indentation, quote-type, newlines, comma vs. semi-colon vs. nothing etc.) and actual functionality changes in the same commits again.
No need to split this PR up, just don't do it again.
CHANGELOG.md
Outdated
## [v1.8.1] - 2023-02-15 | ||
|
||
### Fixed | ||
|
||
- Ensure that description is stored properly when acking, both in bulk and directly | ||
|
||
## [v1.8.0] - 2023-02-02 | ||
|
||
### Added | ||
|
||
- Use backend bulk endpoints to speed up updating incidents in bulk | ||
- Visual feedback (table loading) when changing incident filter parameters, and when navigating incident table pages | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, changelog needs updating anyway.
NOTES.md
Outdated
## [v1.8.0] - 2023-02-15 | ||
### Changed | ||
|
||
### Fixed | ||
|
||
- Ensure that description is stored properly when acking, both in bulk and directly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs merging in so it is not lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one (and other updates in CHANGELOG.md and NOTES.md) are not removed. They are just moved. This one is f.e moved to line 25.
When updating changelogs I noticed that some of the earlier updates were moved from unreleased to some random release version. So I moved them back to unreleasedin this PR. Should have done it in a separate commit though 😅
PhoneNumberPK, | ||
PhoneNumber, | ||
PhoneNumberRequest, | ||
PhoneNumberSuccessResponse, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgive the snark but this is one reason it is handy to keep imports sorted! Easier to change things.
@@ -209,45 +205,6 @@ class ApiClient { | |||
); | |||
} | |||
|
|||
// Phone number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big fan of "abusing" comments this way, again, makes it easier to change things/find things!
@@ -122,14 +112,14 @@ export type DestinationPK = number; | |||
export type Media = { | |||
slug: string; | |||
name: string; | |||
} | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a new linter that demands ";"? Does make for noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier config 😅 My bad, I have fixed it now so next PRs will not come with tons of code reformats! 🥲
"server-version": string; | ||
"api-version": { | ||
stable: string; | ||
unstable: string; | ||
}; | ||
'jsonapi-schema': { | ||
"jsonapi-schema": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file-change is almost all noise. Beh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier config 😅 My bad, I have fixed it now so next PRs will not come with tons of code reformats! 🥲
|
||
export type MediaProperty = { | ||
title: string; | ||
type: string; // value type | ||
description?: string; | ||
format?: string; | ||
} | ||
}; | ||
|
||
export enum KnownProperties { | ||
PHONE_NUMBER = "phone_number", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is PHONE_NUMBER = "phone_number",
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. and why does it end with "," and not ";"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a list of what the properties of the known media is and for destinations of the medium sms it is phone_number
.
And the comma is because it is an enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we still have phone numbers as a part of destinations (like in the type you highlighted f.e.), in the same fashion as emails etc. But the notion of freestanding phone number is removed from Argus completely now.
import { | ||
Destination, | ||
Filter, Media, | ||
NotificationProfile, | ||
PhoneNumber, | ||
Timeslot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only change in this file that removes the old way to do phone numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, PhoneNumber import. It was used in apiMock to phone number endpoint call before. I changed it to apiMock call to destinations in one of the earlier PRs. So rogue import was the only thing that remained in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
export type MediaProperty = { | ||
title: string; | ||
type: string; // value type | ||
description?: string; | ||
format?: string; | ||
} | ||
}; | ||
|
||
export enum KnownProperties { | ||
PHONE_NUMBER = "phone_number", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a list of what the properties of the known media is and for destinations of the medium sms it is phone_number
.
And the comma is because it is an enum.
Fixed
I simply mirrored the add phone number functionality in this PR, and this wasn't a part of the feature with phone numbers. New destination is therefore only added to the dropdown in notifications and to destinations. |
Sorry, my bad! Will keep an eye on it 🤯 I have fixed the formatter config now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more unnecessary scrollbars!
And I made an issue for automatically adding a created destination to a profile.
Very nice! 👍
CHANGELOG.md
Outdated
|
||
- Ensure that description is stored properly when acking, both in bulk and directly | ||
|
||
## [v1.8.0] - 2023-02-02 | ||
|
||
### Added | ||
|
||
- Use backend bulk endpoints to speed up updating incidents in bulk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Use backend bulk endpoints to speed up updating incidents in bulk" is released isn't it? In the notes, it is sorted under version 1.8.0, not unreleased.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
NOTES.md
Outdated
- Use backend bulk endpoints to speed up updating incidents in bulk | ||
- Visual feedback (table loading) when changing incident filter parameters, and when navigating incident table pages | ||
- Replaced _add phone number from notification profiles_ feature with _add destination from notification profiles_ feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw wrong but: isn't the bulk stuff already in production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Polish, do not change now: on the "Notification profiles"-page, on Vivaldi (which uses chrome), the lines under the fields does not line up. |
@johannaengland's follow up issue: #493 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for rebase and merge.
Disable scrollbars Switch to using destinations only in notifications list
Remove use of phone numbers in styles Pluss some formatting and styling fixes Remove add phone number dialog component Remove phone number from notification list tests Remove tests for add phone number dialog Component no longer exists Replace phone numbers with destinations in card tests
Test reset of input fields in new destination component Test discard button
Update CHANGELOG.md Co-authored-by: Johanna England <[email protected]> Update NOTES.md Co-authored-by: Johanna England <[email protected]> Fix changelogs
d15db43
to
7775f88
Compare
Changes made:
Closes #481