Repository navigation
fix(app): open the alert panel from a dashboard tile's alert button - #3680
Open
gedaliakliger wants to merge 1 commit into
Open
gedaliakliger wants to merge 1 commit into
gedaliakliger wants to merge 1 commit into
Conversation
The tile's bell opened the plain tile editor, so the alert panel needed a second click. It now opens the editor on the tile's alert, or on a new draft where the editor offers alerts.
|
@gedaliakliger is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 7585904 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The bell on a dashboard tile (and the alert item in a narrow tile's menu) called
onEditClick, so it opened the same editor as Edit. Since #3222 the alert form lives in a side panel that opens only on request, so after clicking the bell you had to click Add alert or Edit alert again inside the editor.Tilehas declared anonAddAlertClickprop since the v2 dashboard, but nothing wired it.onAlertClick, which opens the tile editor with the newdefaultAlertPanelOpened.EditTimeChartFormthen opens the alert panel from the start, on the tile's alert. A tile without one gets a new alert, filled in as the Add alert button fills it (DEFAULT_TILE_ALERTplus the tile name as display name), and the panel opens it as a draft, so closing the panel discards it, as with the button.savedChartConfigSupportsAlerts. On a temporary dashboard the bell still opens a plain editor.eugeneo17's #3194 fixed this before the alert panel landed and was closed by the open-PR limit; its review is where the temporary-dashboard case came up.
Checks run here: the five related suites (
DBEditTimeChartForm,AlertPanel,AlertPanelButton,TileAlertEditor,EditInlineAlertModal, 95 tests), ESLint and Prettier on the changed files (no new warnings),node scripts/ci/ratchet.mjs, andtsc --noEmitonpackages/app. Left to CI: lint and unit tests across packages, and E2E. No unit test covers theDBDashboardPagewiring, since the page has no component test harness; the E2E dashboard specs already reach the button throughgetTileButton('alerts').Screenshots or video
I couldn't capture these: local mode hides the tile alert editor (
yarn app:dev:localand the Vercel preview), and the full stack needs Docker, which I don't have here.How to reproduce
Starting point:
yarn dev(alerts need the API), a saved dashboard with a Line or Number tile on the Logs source.On
main:On this branch:
How to test on Vercel preview
N/A: the tile alert editor is hidden in local mode, so the preview can't show it.
References