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

add optional config to webhooks in engine #5817

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nischitpra
Copy link

@nischitpra nischitpra commented Dec 20, 2024

PR-Codex overview

This PR focuses on enhancing the webhook functionality within the useEngine hook and related components by adding support for a new config property, allowing for more detailed webhook configurations.

Detailed summary

  • Added "WEBHOOK_CONFIG" to feature flags.
  • Introduced optional config property in EngineWebhook and CreateWebhookInput.
  • Integrated useEngineSystemHealth in EngineWebhooks to check for WEBHOOK_CONFIG support.
  • Updated AddWebhookButton to handle config input and validation.
  • Modified WebhooksTable to display config when supported.
  • Enhanced modals and tables to show config details as needed.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Dec 20, 2024

⚠️ No Changeset found

Latest commit: 1e47014

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 20, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ❌ Failed (Inspect) Dec 20, 2024 2:06am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Dec 20, 2024 2:06am
thirdweb_playground ⬜️ Skipped (Inspect) Dec 20, 2024 2:06am
wallet-ui ⬜️ Skipped (Inspect) Dec 20, 2024 2:06am

Copy link

graphite-app bot commented Dec 20, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 20, 2024
<FormControl>
<FormLabel>Config</FormLabel>
<Input
type="json"
Copy link

Choose a reason for hiding this comment

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

The HTML specification does not include type="json" as a valid input type. This should be changed to type="text" to ensure consistent behavior across browsers. The JSON validation can still be performed on the input's value while maintaining standard HTML compliance.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.34%. Comparing base (fa26eef) to head (1e47014).
Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5817   +/-   ##
=======================================
  Coverage   53.34%   53.34%           
=======================================
  Files        1101     1101           
  Lines       59124    59124           
  Branches     4825     4825           
=======================================
  Hits        31541    31541           
  Misses      26864    26864           
  Partials      719      719           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from c7e700b
packages 50.56% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

github-actions bot commented Dec 20, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.02 KB (0%) 901 ms (0%) 2.3 s (-16.6% 🔽) 3.2 s
thirdweb (cjs) 110.76 KB (0%) 2.3 s (0%) 7.1 s (+0.14% 🔺) 9.3 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 251 ms (-21.01% 🔽) 362 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 44 ms (-62.51% 🔽) 54 ms
thirdweb/react (minimal + tree-shaking) 19.1 KB (0%) 383 ms (0%) 1.3 s (+41.52% 🔺) 1.7 s

@vercel vercel bot temporarily deployed to Preview – docs-v2 December 20, 2024 02:02 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 20, 2024 02:02 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 20, 2024 02:02 Inactive
import { Button, FormLabel } from "tw-components";
import { beautifyString } from "./webhooks-table";

interface AddWebhookButtonProps {
instanceUrl: string;
authToken: string;
supportesWebhookConfig: boolean;
Copy link

Choose a reason for hiding this comment

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

The prop name supportesWebhookConfig appears to have a spelling error - it should be supportsWebhookConfig. This typo should be corrected across all component interfaces and usages to maintain consistency and prevent confusion.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants