Skip to content

Input: add disabledReason - #103

Open
andrewhuhh wants to merge 7 commits into
mainfrom
andrew/input-disabled-reason
Open

andrewhuhh wants to merge 7 commits into
mainfrom
andrew/input-disabled-reason

Conversation

@andrewhuhh

Copy link
Copy Markdown
Collaborator

Closes INF-183.

Adds disabledReason to Input, matching Button, Switch, DropdownMenuItem and Combobox. A field with a reason:

  • looks disabled, but stays in the tab order and keeps its value selectable and copyable (readOnly plus aria-disabled="true", never the native disabled)
  • shows the reason in a tooltip on hover and keyboard focus, and exposes it as aria-description
  • drops readOnly's lock icon and the suggestedValue hint, so a field never shows two lock affordances

The field-box flags now treat aria-disabled="true" as disabled and stop treating it as read only, so boxed inputs (icon, kbd, trailing) get the same look as plain ones. The docs gain a "Disabled with a reason, beside read only" example.

Light Dark
Rest
Focus (Tab)
Hover, read only with a reason

Checked in the browser: the field takes focus by Tab, typing leaves the value unchanged, the tooltip appears on focus and on hover, and only plain read only shows the lock.

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot added the live-preview label Nov 17, 2026
@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cipher-103-input-add-disabledreason

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@capy-ai

capy-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@greptileai review

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] No new blocking issue was found.

Summary

Adds disabledReason to Input so users can focus a locked field, copy its value, and learn why editing is blocked.

  • Input fields can explain why editing is blocked while keeping the value selectable.
  • Color and secret-path inputs respect a field's disabled reason.

Reviews (3) · Last reviewed commit: "Merge main" · Reviewed by Greptile

Comment thread src/ui/input.tsx Resolved
Comment thread src/ui/input.tsx Resolved
Comment thread src/ui/input.tsx Resolved
Comment thread src/ui/controls.module.css Resolved
@andrewhuhh andrewhuhh mentioned this pull request Nov 17, 2026
andrewhuhh and others added 2 commits November 17, 2026 03:10
…verrides disabled, and joins aria-describedby

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Comment thread src/ui/input.tsx Resolved
Comment thread src/ui/input.tsx Resolved
andrewhuhh and others added 4 commits November 17, 2026 03:19
…orPicker and SecretPathInput honor it

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant