-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - widgetform #16558
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
New Components - widgetform #16558
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThis update introduces new integration features for the Widgetform component. A new action retrieves the 10 most recent form submissions, with optional filtering by form name. A new instant source emits events when a new form submission is received via webhooks, handling subscription creation and removal. The Widgetform app module is enhanced with API methods for listing responses and managing webhook subscriptions, and a form selector prop is added. The package metadata is updated to reflect new dependencies and versioning. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action (Get Recent Submissions)
participant Widgetform App
participant Widgetform API
User->>Action (Get Recent Submissions): Trigger action
Action (Get Recent Submissions)->>Widgetform App: listResponses()
Widgetform App->>Widgetform API: GET /responses
Widgetform API-->>Widgetform App: Return submissions
Widgetform App-->>Action (Get Recent Submissions): Return submissions
Action (Get Recent Submissions)-->>User: Return (filtered) submissions
sequenceDiagram
participant Widgetform API
participant Widgetform App
participant Source (New Submission Instant)
participant HTTP/Webhook
participant User
Source (New Submission Instant)->>Widgetform App: createSubscription(webhook URL)
Widgetform App->>Widgetform API: POST /subscriptions
Widgetform API-->>Widgetform App: Return subscription ID
Widgetform App-->>Source (New Submission Instant): Subscription ID stored
Widgetform API-)HTTP/Webhook: Send webhook on new submission
HTTP/Webhook->>Source (New Submission Instant): Receive webhook event
Source (New Submission Instant)->>User: Emit new submission event
Source (New Submission Instant)->>Widgetform App: deleteSubscription(subscription ID) (on deactivation)
Widgetform App->>Widgetform API: DELETE /subscriptions/{id}
Assessment against linked issues
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/widgetform/actions/get-recent-submissions/get-recent-submissions.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/widgetform/sources/new-submission-instant/new-submission-instant.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/widgetform/widgetform.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
components/widgetform/actions/get-recent-submissions/get-recent-submissions.mjs(1 hunks)components/widgetform/package.json(2 hunks)components/widgetform/sources/new-submission-instant/new-submission-instant.mjs(1 hunks)components/widgetform/widgetform.app.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: Verify TypeScript components
🔇 Additional comments (6)
components/widgetform/package.json (1)
3-3: Version bump and dependency addition look good!The version increase from 0.0.1 to 0.1.0 appropriately reflects the addition of new functionality. The dependency on @pipedream/platform is correctly specified with the semver range ^3.0.3, which will allow compatible updates within the 3.x.x range.
Also applies to: 14-16
components/widgetform/actions/get-recent-submissions/get-recent-submissions.mjs (1)
1-30: Well-structured action for retrieving form submissionsThe component follows Pipedream's best practices with clear naming, descriptions, and functionality. The filtering logic is clean and the summary message includes proper pluralization.
components/widgetform/widgetform.app.mjs (2)
1-13: Good addition of form propDefinition for filteringThe form property is well-defined with appropriate type, label, description, and optional flag.
15-30: Well-structured API request helper methodsThe base URL method and request helper follow good practices for reusability and maintainability.
components/widgetform/sources/new-submission-instant/new-submission-instant.mjs (2)
4-19: Well-defined component metadata and propertiesThe component has clear naming, description, and properly defined properties including the widgetform app, database, HTTP interface, and optional form filter.
20-56: Good implementation of webhook lifecycle hooksThe lifecycle hooks for activation, deactivation, and deployment are well-structured with appropriate error handling and history emission.
Resolves #16529
Summary by CodeRabbit
New Features
Improvements
Chores