Bug Description
SubBlockConfig.tooltip is defined in blocks/types.ts but is never rendered in the renderLabel function of sub-block.tsx. The type was added in commit 8215a81 without the corresponding UI implementation.
Root Cause
In apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx, the renderLabel function reads config.title, config.required, etc., but never checks or renders config.tooltip.
Steps to Reproduce
- Add
tooltip: 'some help text' to any subBlock definition in a block config
- Open the workflow editor and find that block
- Observe that no tooltip icon appears next to the field label
Expected Behavior
An Info icon should appear next to the field label. Hovering over it should show the tooltip text.
Fix
Add tooltip rendering in renderLabel after the required asterisk:
{config.tooltip && (
<Tooltip.Root>
<Tooltip.Trigger asChild>
<span className='inline-flex'>
<Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' />
</span>
</Tooltip.Trigger>
<Tooltip.Content side='top'>
<p>{config.tooltip}</p>
</Tooltip.Content>
</Tooltip.Root>
)}
The Tooltip component is already imported and the Tooltip.Root/Trigger/Content pattern is already used in the same file (for the invalid JSON warning).
Affected File
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx
Bug Description
SubBlockConfig.tooltipis defined inblocks/types.tsbut is never rendered in therenderLabelfunction ofsub-block.tsx. The type was added in commit 8215a81 without the corresponding UI implementation.Root Cause
In
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx, therenderLabelfunction readsconfig.title,config.required, etc., but never checks or rendersconfig.tooltip.Steps to Reproduce
tooltip: 'some help text'to any subBlock definition in a block configExpected Behavior
An
Infoicon should appear next to the field label. Hovering over it should show the tooltip text.Fix
Add tooltip rendering in
renderLabelafter the required asterisk:The
Tooltipcomponent is already imported and theTooltip.Root/Trigger/Contentpattern is already used in the same file (for the invalid JSON warning).Affected File
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx