-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: Enhance Webhook component #6313
Open
Cristhianzl
wants to merge
17
commits into
main
Choose a base branch
from
cz/webhook
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
…ES list 📝 (webhook.py): Add "copy_field" attribute to MultilineInput component 📝 (input_mixin.py): Add "copy_field" attribute to BaseInputMixin class 📝 (inputs.py): Add "copy_field" attribute to StrInput class 📝 (template/field/base.py): Add "copy_field" attribute to Input class 🚀 (NodeDescription/index.tsx): Remove default placeholder text for emptyPlaceholder prop ✨ (copyFieldAreaComponent/index.tsx): Add new component for handling copy field functionality ♻️ (strRenderComponent/index.tsx): Refactor component to include CopyFieldAreaComponent when copy_field attribute is present in template data
…o improve readability and maintainability ♻️ (GenericNode/index.tsx): refactor code to improve readability and maintainability, and optimize rendering logic
…tion with external systems 📝 (graph/base.py): Add logging of vertex build information in Graph class for debugging purposes 📝 (NodeInputField/index.tsx): Add nodeInformationMetadata to NodeInputField for better tracking of node information 📝 (copyFieldAreaComponent/index.tsx): Refactor CopyFieldAreaComponent to handle different types of values, including webhooks 📝 (strRenderComponent/index.tsx): Add WebhookFieldComponent to handle webhook type in StrRenderComponent 📝 (tableNodeCellRender/index.tsx): Add nodeInformationMetadata to TableNodeCellRender for better tracking of node information 📝 (textAreaComponent/index.tsx): Add support for webhook format in TextAreaComponent for better integration with webhooks 📝 (webhookFieldComponent/index.tsx): Add WebhookFieldComponent to handle webhook type in ParameterRenderComponent 📝 (custom-parameter.tsx): Add nodeInformationMetadata to CustomParameterComponent for better tracking of node information 📝 (get-curl-code.tsx): Add support for different formats in getCurlWebhookCode for generating cURL commands 📝 (textAreaModal/index.tsx): Add onCloseModal callback to ComponentTextModal for better handling of modal closing 📝 (index.ts): Add type field to APIClassType for better typing of API classes
…mponent for improved user experience and functionality. Update the structure of the component to include the new button and styling adjustments.
CodSpeed Performance ReportMerging #6313 will degrade performances by 11.16%Comparing Summary
Benchmarks breakdown
|
…andle token generation in webhookFieldComponent 📝 (index.tsx): import and use GenerateTokenDialog component in WebhookFieldComponent for token generation functionality
…ble modal properties 🔧 (frontend): add modalProps object to customize modal title, description, input label, input placeholder, button text, generated key message, and show icon flag
…into cz/webhook
✨ (validate-webhook.ts): Add function to validate webhook data before processing ♻️ (use-get-builds-pooling-mutation): Refactor to set flow pool based on current flow 🔧 (content-render.tsx): Add data-testid attribute to api key input element 🔧 (webhookComponent.spec.ts): Refactor test to use waitForRequest for monitoring build requests
…val for consistency 🔧 (frontend): update references to webhook_pooling_interval to webhook_polling_interval for consistency
…schema to support webhook functionality
anovazzi1
requested changes
Feb 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great addition, some minor changes
...end/src/components/core/parameterRenderComponent/components/copyFieldAreaComponent/index.tsx
Outdated
Show resolved
Hide resolved
...frontend/src/components/core/parameterRenderComponent/components/textAreaComponent/index.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/components/core/parameterRenderComponent/helpers/get-modal-props.tsx
Outdated
Show resolved
Hide resolved
…r code organization and maintainability 🔧 (frontend): Refactor background styles in components to use constants for consistency and easier theming 🚀 (frontend): Add custom SecretKeyModalButton component for better modularity and reusability
…SLF endpoint for future implementation.
…s it is no longer needed ♻️ (inputs.py): Remove copy_field attribute from StrInput class as it is no longer needed ♻️ (inputs.py): Set copy_field attribute to False in MultilineInput class to ensure consistency ♻️ (template/field/base.py): Remove copy_field attribute from Input class as it is no longer needed 📝 (textAreaComponent/index.tsx): Replace hardcoded value "CURL_WEBHOOK" with constant WEBHOOK_VALUE for better readability and maintainability
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This pull request includes multiple changes to both the backend and frontend of the Langflow project, focusing on adding webhook functionality, improving the user interface, and refining the data handling. The most important changes include adding a webhook polling interval, enhancing the webhook component, and updating the frontend components to support new features.
Backend Changes:
Webhook Polling Interval:
webhook_pooling_interval
option torun
function in__main__.py
to define the polling interval for webhooks.ConfigResponse
andSettings
classes to includewebhook_pooling_interval
. [1] [2]update_settings
function to handlewebhook_pooling_interval
. [1] [2]Webhook Component Enhancements:
curl
andendpoint
) toWebhookComponent
inwebhook.py
.copy_field
attribute to various input classes to support copy functionality. [1] [2] [3]Logging and Utility Improvements:
log_vertex_build
inbase.py
and added logging for vertex builds in_execute_tasks
method. [1] [2]Frontend Changes:
Node Description and Input Field Enhancements:
NodeDescription
component to handle empty placeholders and memoized markdown rendering. [1] [2] [3]NodeInputField
to include authentication and flow information metadata. [1] [2] [3] [4]New Copy Field Component:
CopyFieldAreaComponent
to handle copying field values with visual feedback.These changes collectively enhance the functionality and user experience of the Langflow project, particularly in handling webhooks and improving the interface for node descriptions and input fields.