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: Comparison based alerts #4818

Merged
merged 22 commits into from
May 31, 2024
Merged

Conversation

AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented May 3, 2024

closes #4544

Uses #4793 to add comparison based alerts on the MetricsViewAggregation API

  • Add support for comparison in create/edit alert forms.
  • Extract comparison during edit alert.
  • Add comparison to readonly pills
  • Update formatting for MetricsAggregation for comparison.
  • Fix MetricsAggregation in alerts when comparison is enabled.
  • Refactor based on new mocks.

@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from cf31d8e to 5e08468 Compare May 8, 2024 14:26
@AdityaHegde AdityaHegde marked this pull request as ready for review May 23, 2024 08:02
@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from eeb5a2e to 2b7bce1 Compare May 23, 2024 15:23
@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from 2b7bce1 to 0649150 Compare May 23, 2024 15:29
Copy link
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

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

Backend changes look good :)

@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from 1a028cb to 6d2f043 Compare May 28, 2024 15:33
@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from d25a09d to f662c6b Compare May 29, 2024 08:31
@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from 8df4e87 to 8f67404 Compare May 29, 2024 15:47
@ericpgreen2
Copy link
Contributor

ericpgreen2 commented May 29, 2024

UXQA (some of which is out-of-scope of this PR, but want to document) –

  1. The "Comparing with" pill looks like it's missing something. In this case, shouldn't it say it's "Comparing with the Previous Period"?
    image
  2. On the first page, using the keyboard's "escape" key triggers the "Close without saving" dialog (while the "X" and "Cancel" buttons correctly do not trigger it)
    image
  3. The table header's text (here "Number of contributors") spills across the header's bottom border
    image
  4. I'm seeing "% change from undefined" in the measure extension dropdown
    image
  5. When a criteria does not have a measure selected (see Criteria 2), the Next button is currently unresponsive. It should either be disabled or clicking on it should show an error.
    image
  6. The email recipients should not be initialized with an extra blank email address.
    image
  7. This criteria pill should say "[Measure label] % change > -10%", not "[Measure name] % change from > -10%"
    image

@ericpgreen2
Copy link
Contributor

Code – So far I've just skimmed it, but I'm seeing a few leftover console logs FYI.

@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from 6321321 to 787c7de Compare May 30, 2024 06:48
@AdityaHegde
Copy link
Collaborator Author

AdityaHegde commented May 30, 2024

Thanks for the review. Have fixed 1,4 and 7. The duration and label mapping was incorrect (delta was incorrectly 0).
Rest are out of scope.
2. I have disabled escape for now. There is a challenge here where escape is handled by a wrapper GuardedDialog, but isTouched is deeper inside.
3. Couldnt reproduce this. It is increasing the height of the header for me. Either way this is using the table components. I can see the issue in dimension table now and then as well. (perhaps there is an off by one issue somewhere?)
5. Forms lib is not populating the error properly. It just has Required for criteria and no indication of which index the error is for. I have set the measure to a valid value for now.
6. Hmm it has been like this there since we added it for the 1st time. Are we sure we dont want an empty entry there? (It gets removed before submitting)

@nishantmonu51 nishantmonu51 added the blocker A release blocker issue that should be resolved before a new release label May 30, 2024
@ericokuma
Copy link

ericokuma commented May 30, 2024

UX/Product Check on @ericpgreen2's first pass

1. Comparing with pill is now displaying previous time period
Screenshot 2024-05-30 at 3 35 31 PM

2. Keyboard "Escape" key doesn't trigger "close without saving" dialog anymore

3. Looks like the column spillover is still there
Screenshot 2024-05-30 at 3 42 10 PM

4. % change from undefined is now fixed

5. Adding a new criteria now preloads with a measure (instead of displaying the measure label).
Works but not sure if this is intended behavior? A question I have is: would there ever be more than one measure available to select from the dropdown?

6. Email recipients still initialized with extra blank email input field

7. Criteria readout looks good now
Screenshot 2024-05-30 at 3 57 39 PM

New UXQA

1. For long measure names, looks like there's spillover in the criteria dropdown box
Screenshot 2024-05-30 at 3 45 26 PM

2. Selecting first measure from Alert data dropdown will autopopulate measure selection in Criteria step. Selecting other measures will not autopopulate measure selection
Screenshot 2024-05-30 at 3 51 13 PM

Screenshot 2024-05-30 at 3 51 25 PM

3. [URGENT] You have to click next button twice on Criteria step to get to Delivery step

4. Shouldn't say "% change from from previous day". Remove one of the "from"
Screenshot 2024-05-30 at 3 56 45 PM
Screenshot 2024-05-30 at 3 56 55 PM

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

Approved 👍. For those UXQA items that are not in scope of this PR, @ericokuma is adding to the Alerts UXQA Notion doc.

@AdityaHegde AdityaHegde force-pushed the adityahegde/new-alert-comparisons branch from c983f98 to 4606c09 Compare May 31, 2024 07:25
@AdityaHegde
Copy link
Collaborator Author

Fixed the new items. Found the issue for incorrect column height. Fixed it when the column is not in the 1st place. For the case where it is in 1st place, the code is used in dimension table as well, so will do a follow up after confirming why we have that in dimension table.

@AdityaHegde AdityaHegde merged commit a373c2e into main May 31, 2024
6 checks passed
@AdityaHegde AdityaHegde deleted the adityahegde/new-alert-comparisons branch May 31, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker A release blocker issue that should be resolved before a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Support comparison-based alerts in the UI
5 participants