Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style(youtube): mark optional params as advanced mode
Hide pagination, sort order, and filter fields behind the advanced
toggle for a cleaner default UX across all YouTube operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Feb 19, 2026
commit bdcbfd739a951c5537300863d64fe9a108b79a8d
23 changes: 23 additions & 0 deletions apps/sim/blocks/blocks/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,23 @@ export const YouTubeBlock: BlockConfig<YouTubeResponse> = {
step: 1,
integer: true,
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'pageToken',
title: 'Page Token',
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'channelId',
title: 'Filter by Channel ID',
type: 'short-input',
placeholder: 'Filter results to a specific channel',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'eventType',
Expand All @@ -77,13 +80,15 @@ export const YouTubeBlock: BlockConfig<YouTubeResponse> = {
],
value: () => '',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'publishedAfter',
title: 'Published After',
type: 'short-input',
placeholder: '2024-01-01T00:00:00Z',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
wandConfig: {
enabled: true,
prompt: `Generate an ISO 8601 timestamp based on the user's description.
Expand All @@ -106,6 +111,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
type: 'short-input',
placeholder: '2024-12-31T23:59:59Z',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
wandConfig: {
enabled: true,
prompt: `Generate an ISO 8601 timestamp based on the user's description.
Expand Down Expand Up @@ -134,6 +140,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'any',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'order',
Expand All @@ -148,13 +155,15 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'relevance',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'videoCategoryId',
title: 'Category ID',
type: 'short-input',
placeholder: 'Use Get Video Categories to find IDs',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'videoDefinition',
Expand All @@ -167,6 +176,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'any',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'videoCaption',
Expand All @@ -179,6 +189,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'any',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'regionCode',
Expand All @@ -189,13 +200,15 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
field: 'operation',
value: ['youtube_search', 'youtube_trending', 'youtube_video_categories'],
},
mode: 'advanced',
},
{
id: 'relevanceLanguage',
title: 'Language Code',
type: 'short-input',
placeholder: 'en, es, fr',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
{
id: 'safeSearch',
Expand All @@ -208,6 +221,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'moderate',
condition: { field: 'operation', value: 'youtube_search' },
mode: 'advanced',
},
// Get Trending Videos operation inputs
{
Expand All @@ -226,13 +240,15 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
type: 'short-input',
placeholder: 'Use Get Video Categories to find IDs',
condition: { field: 'operation', value: 'youtube_trending' },
mode: 'advanced',
},
{
id: 'pageToken',
title: 'Page Token',
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_trending' },
mode: 'advanced',
},
// Get Video Details operation inputs
{
Expand All @@ -250,6 +266,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
type: 'short-input',
placeholder: 'en, es, fr (for category names)',
condition: { field: 'operation', value: 'youtube_video_categories' },
mode: 'advanced',
},
// Get Channel Info operation inputs
{
Expand Down Expand Up @@ -298,13 +315,15 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'date',
condition: { field: 'operation', value: 'youtube_channel_videos' },
mode: 'advanced',
},
{
id: 'pageToken',
title: 'Page Token',
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_channel_videos' },
mode: 'advanced',
},
// Get Channel Playlists operation inputs
{
Expand All @@ -331,6 +350,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_channel_playlists' },
mode: 'advanced',
},
// Get Playlist Items operation inputs
{
Expand All @@ -357,6 +377,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_playlist_items' },
mode: 'advanced',
},
// Get Video Comments operation inputs
{
Expand Down Expand Up @@ -387,13 +408,15 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
],
value: () => 'relevance',
condition: { field: 'operation', value: 'youtube_comments' },
mode: 'advanced',
},
{
id: 'pageToken',
title: 'Page Token',
type: 'short-input',
placeholder: 'Token for pagination (from nextPageToken)',
condition: { field: 'operation', value: 'youtube_comments' },
mode: 'advanced',
},
// API Key (common to all operations)
{
Expand Down