Skip to content

fix(input-format): file-field mode toggle uses canonical ⇄ icon on the label row#5304

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/file-input-toggle-styling
Jul 1, 2026
Merged

fix(input-format): file-field mode toggle uses canonical ⇄ icon on the label row#5304
waleedlatif1 merged 1 commit into
stagingfrom
fix/file-input-toggle-styling

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Follow-up styling fix for the input-format file field (feature merged in feat(input-format): upload files in file fields via the file uploader #5297).
  • The mode switch was a right-aligned "Enter JSON manually" text link on its own row, which created awkward spacing above the control.
  • Replaced it with the canonical sub-block mode toggle: a compact left-right arrows (ArrowLeftRight) icon button with a tooltip, placed on the "Value" label row (label left, toggle right) — identical to the Files subblock header. This removes the extra row and aligns the spacing.
  • Toggle is hidden for legacy/mixed values (JSON-only), same as before.

Type of Change

  • Bug fix (styling)

Testing

  • tsc clean, biome clean; existing input-format tests pass. Matches the existing canonical toggle styling exactly (12px button, ArrowLeftRight 12px, --text-secondary/--text-primary, top tooltip).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…n the label row

The file field's mode switch was a right-aligned 'Enter JSON manually' text link on
its own row, causing awkward spacing above the control. Replace it with the
canonical sub-block mode toggle: a compact left-right arrows (ArrowLeftRight) icon
button with a tooltip, placed on the 'Value' label row (label left, toggle right),
matching the Files subblock header. Removes the extra row and aligns spacing.
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 1, 2026 12:16am

Request Review

@cursor

cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only styling and layout for the file-field mode switch; uploader vs JSON eligibility and save behavior are unchanged.

Overview
Input-format file fields now switch between file uploader and JSON using the same compact (ArrowLeftRight) control as other sub-blocks, instead of a separate row of ghost text links.

The toggle sits on the Value label row (label left, icon right) with a top tooltip and aria-label; upload/JSON rendering is unchanged and still hidden when the stored value cannot be represented losslessly in the uploader. Mode resolution is centralized in getFileFieldMode so the label toggle and renderValueInput stay aligned.

Reviewed by Cursor Bugbot for commit db20421. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves the file-field mode switch into the Value label row.

  • Adds the compact ArrowLeftRight icon toggle with a tooltip.
  • Shares file-field mode lookup through a helper.
  • Removes the extra toggle row above the uploader or JSON editor.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx Moves the file value mode toggle to the label row and keeps the uploader safety gate in the shared mode helper.

Reviews (1): Last reviewed commit: "fix(input-format): file-field mode toggl..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit ed6e8c2 into staging Jul 1, 2026
17 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/file-input-toggle-styling branch July 1, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant