-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(webflow): fix collection & site dropdown in webflow triggers #2849
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
base: staging
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR converts Webflow trigger site and collection inputs from manual text fields to dynamic dropdowns, improving UX by fetching available options from the Webflow API. Key Changes:
Critical Issue:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Trigger UI
participant SubBlockStore
participant API Routes
participant Webflow API
User->>Trigger UI: Select Webflow credential
Trigger UI->>SubBlockStore: Store credential ID
User->>Trigger UI: Open site dropdown
Trigger UI->>SubBlockStore: getValue(blockId, 'triggerCredentials')
SubBlockStore-->>Trigger UI: credential ID
Trigger UI->>API Routes: POST /api/tools/webflow/sites
API Routes->>Webflow API: GET /v2/sites
Webflow API-->>API Routes: sites array
API Routes-->>Trigger UI: formatted sites
Trigger UI-->>User: Display site options
User->>Trigger UI: Select site
Trigger UI->>SubBlockStore: Store site ID
User->>Trigger UI: Open collection dropdown
Trigger UI->>SubBlockStore: getValue(blockId, 'triggerCredentials')
SubBlockStore-->>Trigger UI: credential ID
Trigger UI->>SubBlockStore: getValue(blockId, 'siteId')
SubBlockStore-->>Trigger UI: site ID
Trigger UI->>API Routes: POST /api/tools/webflow/collections
API Routes->>Webflow API: GET /v2/sites/{siteId}/collections
Webflow API-->>API Routes: collections array
API Routes-->>Trigger UI: formatted collections
Trigger UI-->>User: Display collection options
|
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.
4 files reviewed, 7 comments
| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_changed', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition in apps/sim/blocks/types.ts:302-305.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_changed.ts
Line: 45:45
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition in `apps/sim/blocks/types.ts:302-305`.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_changed', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_changed.ts
Line: 111:111
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_created', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_created.ts
Line: 58:58
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_created', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_created.ts
Line: 124:124
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_deleted', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_deleted.ts
Line: 45:45
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| field: 'selectedTriggerId', | ||
| value: 'webflow_collection_item_deleted', | ||
| }, | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/collection_item_deleted.ts
Line: 111:111
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.| required: true, | ||
| options: [], | ||
| mode: 'trigger', | ||
| fetchOptions: async (blockId: string) => { |
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.
syntax: fetchOptions signature is missing the required subBlockId parameter. Should be async (blockId: string, subBlockId: string) to match the SubBlockConfig type definition.
| fetchOptions: async (blockId: string) => { | |
| fetchOptions: async (blockId: string, subBlockId: string) => { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/triggers/webflow/form_submission.ts
Line: 37:37
Comment:
**syntax:** `fetchOptions` signature is missing the required `subBlockId` parameter. Should be `async (blockId: string, subBlockId: string)` to match the `SubBlockConfig` type definition.
```suggestion
fetchOptions: async (blockId: string, subBlockId: string) => {
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
Type of Change
Testing
Tested manually
Checklist