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

chore: embeddable hog function configuration #28671

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Feb 13, 2025

Problem

Towards #28670. Pulled out all the changes needed to CDP components

Changes

Idea is to be able to let someone configure alerts within the error tracking settings but not have full access to the configuration UI (just certain fields)

Screenshot 2025-02-13 at 14 04 04
  • Adds display options to hide more panels
  • Introduces embedded display option
  • Adds a new Slack sub template for issue creation
  • Given we can't remove a field via input overrides I introduced a new concept of the field being "hidden" i.e. it will always use the default

@daibhin daibhin requested a review from benjackwhite February 13, 2025 14:07
{showStatus && <HogFunctionStatusIndicator hogFunction={hogFunction} />}
{showEnabled && (
<LemonField name="enabled">
{showLeftPanel && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like there is a lot going on here but it is just indentation from this check & some minor changes from new displayOptions

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds support for configuring error tracking alerts with a simplified UI by introducing hidden input fields and embedded display options. Here are the key changes:

  • Added new hidden property to input schema fields to keep default values while hiding them from the UI
  • Introduced embedded display mode with conditional border rendering and panel visibility controls
  • Added new error-tracking-issue-created Slack sub-template with hidden blocks/text fields
  • Modified HogFunctionInputs to filter out hidden inputs using ?.filter((i) => !i.hidden)
  • Added flexible display options like hidePageHeader and hideOverview for embedded use cases

The changes enable a more focused configuration experience for error tracking alerts while maintaining the full functionality behind the scenes.

5 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Update
<div className="flex items-center flex-1 gap-2 pt-2 border-t">
<div className="flex-1">
<LemonButton>Close</LemonButton>
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Close button has no onClick handler, making it non-functional

"default": [
{
"text": {
"text": "*{person.properties.email}* {event.properties.activity} {event.properties.scope} {event.properties.item_id} ",
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The message format reuses activity log properties but error tracking events may have different property names. Verify that event.properties.activity, scope, and item_id exist for $error_tracking_issue_created events.

@daibhin daibhin changed the title chore: create event when issue created chore: embeddable hog function configuration Feb 13, 2025
Copy link
Contributor

github-actions bot commented Feb 13, 2025

Size Change: 0 B

Total Size: 1.2 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.2 MB

compressed-size-action

@@ -4666,6 +4666,7 @@ export type HogFunctionInputSchemaType = {
required?: boolean
default?: any
secret?: boolean
hidden?: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing - we have this in the plugin-server as well. It's not a biggy but would be cool to add it to the types there as well so we dont forget about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do. I left it out specifically because it was more of a frontend concern but happy to add it

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