Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the FileUpload have required and readOnly? #2984

Open
bjosttveit opened this issue Feb 6, 2025 · 1 comment
Open

Should the FileUpload have required and readOnly? #2984

bjosttveit opened this issue Feb 6, 2025 · 1 comment
Labels
kind/analysis kind/breaking-change Issue/pull request containing a breaking change
Milestone

Comments

@bjosttveit
Copy link
Member

bjosttveit commented Feb 6, 2025

Description

The FileUpload and FileUploadWithTag components both have required and readOnly properties from the default FormComponentProps. For these components required does not really make sense, and is not used for anything other than incidentally setting a required * marker next to the title. It should rather behave more similar to RepeatingGroup which get it set based on if minCount > 0. We should remove the required property since it has no real effect.

As for readOnly, there is no visual indication that the component is read only. It only blocks the user from uploading without any explanation. I am not sure what the purpose of a readOnly file upload could possibly be, but if we need to keep it, it should be indicated better, and probably not show a "file drop zone" at all.

@bjosttveit bjosttveit added kind/analysis status/draft Status: When you create an issue before you have enough info to properly describe the issue. labels Feb 6, 2025
@bjosttveit bjosttveit removed status/draft Status: When you create an issue before you have enough info to properly describe the issue. status/triage labels Feb 6, 2025
@bjosttveit bjosttveit added this to the v5 milestone Feb 7, 2025
@bjosttveit
Copy link
Member Author

Adding milestone v5 as removing props could be breaking

@bjosttveit bjosttveit added the kind/breaking-change Issue/pull request containing a breaking change label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/analysis kind/breaking-change Issue/pull request containing a breaking change
Projects
Status: No status
Development

No branches or pull requests

1 participant