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: implement optional json payload and template #4752

Merged
merged 13 commits into from
Sep 19, 2023

Conversation

daveleek
Copy link
Contributor

@daveleek daveleek commented Sep 15, 2023

About the changes

Adds optional support for specifying JSON templates for datadog message payload

image

Important files

frontend/src/component/integrations/IntegrationForm/IntegrationParameters/IntegrationParameter/IntegrationParameterEnableWithDropdown.tsx - a new component comprising of a text field and a dropdown menu
src/lib/addons/datadog.ts - Where the integration is taking place

Discussion points

  • Should I have implemented the new component type as a specifiable addon parameter type in definitions? Felt a bit YAGNI/Premature
  • Would like input on naming and the new component etc

@vercel
Copy link

vercel bot commented Sep 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 9:58am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2023 9:58am

src/lib/addons/datadog.ts Outdated Show resolved Hide resolved
src/lib/addons/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@nunogois nunogois left a comment

Choose a reason for hiding this comment

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

My general thought is that this feels slightly overkill. If the body template is optional, do we really need the dropdown that shows/hides it? Because it feels like we could just leave it there, similar to what we do for the webhook addon. We could still hide it behind the feature flag if we wanted.

I feel like this would simplify this PR and feature drastically.

In the other hand, if we really want this dropdown visibility behavior, perhaps it should be a different field type, other than textfield?

Other than that this feels fine, but I would still like us to think a bit about this before merging.

Copy link
Member

@nunogois nunogois left a comment

Choose a reason for hiding this comment

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

LGTM

@daveleek daveleek merged commit bff1bd1 into main Sep 19, 2023
15 checks passed
@daveleek daveleek deleted the feat/datadog-json-payload branch September 19, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants