Conversation
- Replace boolean props (internal, error, disabled) with single variant prop - Add new 'readOnly' variant for non-editable inputs with minimal styling - Variant options: 'primary' | 'internal' | 'error' | 'disabled' | 'readOnly' - Update all input consumers to use new variant API - Add textClasses support for consistent text color styling Components updated: - InputTypeIn, InputTextArea, InputSelect, InputFile - InputKeyValue, InputComboBox, ListFieldInput - PasswordInputTypeIn, InputAvatar - Form field wrappers (InputTypeInField, etc.) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Destructure readOnly from props to prevent it from being spread and
overriding the explicit readOnly attribute. This ensures variant="readOnly"
correctly enforces read-only behavior even if readOnly={false} is passed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Form field components now check if the variant is "disabled" or "readOnly" before applying error styling, ensuring non-editable fields maintain their intended appearance regardless of validation state. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The component now derives `isDisabled` from both the `disabled` boolean prop and `variant === "disabled"`, ensuring consistent behavior when either approach is used. This affects the file picker function, icon button, and hidden file input. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The component now treats both disabled and readOnly variants as non-editable states. File picking, paste handling, and the icon button are all blocked when variant is "readOnly", making the component behavior consistent with its visual appearance. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Greptile SummaryCompleted the
This change ensures that when Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant InputFile
participant InputTypeIn
participant FileReader
Note over InputFile: variant="readOnly" or "disabled"
InputFile->>InputFile: isReadOnly = variant === "readOnly"
InputFile->>InputFile: isDisabled = disabled || variant === "disabled"
InputFile->>InputFile: isNonEditable = isDisabled || isReadOnly
User->>InputFile: Click file picker button
InputFile->>InputFile: openFilePicker() checks isNonEditable
alt isNonEditable
InputFile-->>User: Action blocked
else editable
InputFile->>FileReader: Open file picker
FileReader-->>InputFile: File selected
InputFile->>InputFile: setValue(content)
end
User->>InputTypeIn: Paste text
InputTypeIn->>InputFile: handlePaste()
InputFile->>InputFile: Check isNonEditable
alt isNonEditable
InputFile-->>User: Paste blocked
else editable
InputFile->>InputFile: setValue(pastedText)
InputFile->>InputFile: setIsFileMode(false)
end
Note over InputFile,InputTypeIn: readOnly prop = isFileMode || isReadOnly
InputFile->>InputTypeIn: Pass readOnly prop
InputTypeIn->>InputTypeIn: Render with readOnly state
|
1 task
rohoswagger
pushed a commit
that referenced
this pull request
Jan 20, 2026
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
jessicasingh7
pushed a commit
that referenced
this pull request
Jan 21, 2026
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Address final remaining comment which was accidentally ignored prior to merge in the previous PR (#7575).
Additional Options