Skip to content

Fire an event when clicking the "model alerts indicator" button#3516

Merged
shati-patel merged 3 commits intomainfrom
shati-patel/fire-reveal-event
Mar 27, 2024
Merged

Fire an event when clicking the "model alerts indicator" button#3516
shati-patel merged 3 commits intomainfrom
shati-patel/fire-reveal-event

Conversation

@shati-patel
Copy link
Copy Markdown
Contributor

In the model editor, you can click the "model alerts indicator" which will (eventually) open the corresponding alerts in the model alerts view.

image

For now, this PR just adds some types etc to fire a "reveal in model alerts view" event when you click this button. In the next PR I'll add the logic for the model alerts view to listen for those events and do the relevant thing.

Checklist

N/A, feature-flagged for internal use/testing

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@shati-patel shati-patel marked this pull request as ready for review March 27, 2024 10:14
@shati-patel shati-patel requested review from a team as code owners March 27, 2024 10:14
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

LGTM!

return null;
}

const revealInModelAlertsView = () =>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd just inline the code from sendRevealInModelAlertsViewMessage instead of having a separate function. Removes an unnecessary level of indirection.

@shati-patel shati-patel enabled auto-merge (squash) March 27, 2024 12:32
@shati-patel shati-patel merged commit c84fa53 into main Mar 27, 2024
@shati-patel shati-patel deleted the shati-patel/fire-reveal-event branch March 27, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants