From 61db3e8b43d41413d442972a8a34e0ddb053678d Mon Sep 17 00:00:00 2001 From: Drew Davis Date: Thu, 9 Apr 2026 13:21:34 -0400 Subject: [PATCH] refactor: Create TileAlertEditor component (#2085) ## Summary This PR extracts a TileAlertEditor component for future re-use in the Raw-SQL Alert UI. The UI has been updated to make the alert section collapsible and co-locate the "Remove Alert" button within the alert section. The collapsibility will be more important in the Raw SQL case, since the Raw SQL Editor is already pretty vertically tall. ### Screenshots or video https://github.com/user-attachments/assets/4e595fc6-06f0-4ccd-ab1f-08dcb9895c89 ### How to test locally or on Vercel This must be tested locally, since alerts are not supported in local mode. ### References - Linear Issue: Related to HDX-1605 - Related PRs: --- .changeset/two-rocks-punch.md | 5 + packages/app/src/components/Alerts.tsx | 2 +- .../ChartEditor/RawSqlChartEditor.tsx | 80 +++++----- .../ChartEditorControls.tsx | 124 ++------------- .../DBEditTimeChartForm/TileAlertEditor.tsx | 146 ++++++++++++++++++ .../__tests__/DBEditTimeChartForm.test.tsx | 11 +- .../e2e/components/ChartEditorComponent.ts | 14 +- .../app/tests/e2e/features/dashboard.spec.ts | 3 - 8 files changed, 222 insertions(+), 163 deletions(-) create mode 100644 .changeset/two-rocks-punch.md create mode 100644 packages/app/src/components/DBEditTimeChartForm/TileAlertEditor.tsx diff --git a/.changeset/two-rocks-punch.md b/.changeset/two-rocks-punch.md new file mode 100644 index 00000000..dc51ab63 --- /dev/null +++ b/.changeset/two-rocks-punch.md @@ -0,0 +1,5 @@ +--- +"@hyperdx/app": patch +--- + +refactor: Create TileAlertEditor component diff --git a/packages/app/src/components/Alerts.tsx b/packages/app/src/components/Alerts.tsx index 9f1efb50..dd2e5ace 100644 --- a/packages/app/src/components/Alerts.tsx +++ b/packages/app/src/components/Alerts.tsx @@ -63,7 +63,7 @@ const WebhookChannelForm = ( return (
- +