fix(blocks): render tooltip field in sub-block label#4072
fix(blocks): render tooltip field in sub-block label#4072minijeong-log wants to merge 12 commits intosimstudioai:stagingfrom
Conversation
…ership workflow edits via sockets, ui improvements
…ng improvements, posthog, secrets mutations
…ration, signup method feature flags, SSO improvements
* feat(posthog): Add tracking on mothership abort (simstudioai#4023) Co-authored-by: Theodore Li <theo@sim.ai> * fix(login): fix captcha headers for manual login (simstudioai#4025) * fix(signup): fix turnstile key loading * fix(login): fix captcha header passing * Catch user already exists, remove login form captcha
…nts, secrets performance, polling refactors, drag resources in mothership
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit ee1965d. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@minijeong-log is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 29606901 | Triggered | Generic High Entropy Secret | a54dcbe | apps/sim/providers/utils.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Greptile SummaryThis PR wires up the Confidence Score: 5/5Safe to merge — single-file change that correctly follows existing patterns with no logic or data risks. Only finding is a P2 accessibility suggestion (missing No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx | Adds Info icon tooltip rendering for config.tooltip inside renderLabel, following the existing AlertTriangle tooltip pattern — clean and minimal change. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["renderLabel(config, ...)"] --> B{config.title?}
B -- No --> Z[return null]
B -- Yes --> C[Render Label]
C --> D{config.required?}
D -- Yes --> E["Render asterisk *"]
D -- No --> F{config.tooltip?}
E --> F
F -- Yes --> G["Render Info icon\n+ Tooltip.Root/Trigger/Content"]
F -- No --> H{labelSuffix?}
G --> H
H -- Yes --> I[Render labelSuffix]
H -- No --> J{code + invalid JSON?}
I --> J
J -- Yes --> K["Render AlertTriangle\n+ Tooltip.Root/Trigger/Content"]
J -- No --> L[Return label JSX]
K --> L
Reviews (1): Last reviewed commit: "fix(blocks): render tooltip field in sub..." | Re-trigger Greptile
| <Tooltip.Trigger asChild> | ||
| <span className='inline-flex'> | ||
| <Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' /> | ||
| </span> |
There was a problem hiding this comment.
Tooltip trigger is not keyboard-accessible
The <span> wrapping the Info icon has no tabIndex or role, so keyboard-only users cannot reach the tooltip. Radix UI requires a focusable element as the trigger to work correctly with keyboard navigation. Adding tabIndex={0} and role="button" (or swapping for a <button>) would make it accessible.
| <Tooltip.Trigger asChild> | |
| <span className='inline-flex'> | |
| <Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' /> | |
| </span> | |
| <span className='inline-flex' tabIndex={0} role='button' aria-label={config.tooltip}> |
Note: the existing AlertTriangle tooltip uses the same pattern, so this is a pre-existing gap rather than a regression introduced by this PR.
|
Closing in favor of a new PR based on upstream/staging to avoid unrelated commits. |
Summary
SubBlockConfig.tooltipwas typed inblocks/types.ts(added in commit 8215a81) but never rendered insub-block.tsxInfoicon next to the field label that shows the tooltip text on hoverTooltip.Root/Trigger/Contentpattern already present in the same fileChanges
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsxInfoto lucide-react importsrenderLabelTest plan
tooltip: 'some help text'to a subBlock in any block configFixes #4071
🤖 Generated with Claude Code