Unused code in FileUploader
See original GitHub issueDetailed description
while working on #1022 I noticed some divergence in the FileUploader
from the vanilla components. Looking for some clarification on how to proceed
Describe in detail the issue you’re having.
When uploading files, the React FileUploader
has some logic that will modify the label text. If the user is uploading multiple files, it will change the label text from Add files
to the number of files currently being uploaded, and if the user is uploading a single file, the label text will be changed to the name of the file being uploaded. A couple things about the relevant code though:
- it doesn’t seem to be present in the vanilla components
- it is unreachable in the current React component
should I remove it completely or is this a desirable feature extension from the vanilla implementation?
Is this a feature request (new component, new icon), a bug, or a general issue?
general issue
Is this issue related to a specific component?
FileUploader
What did you expect to happen? What happened instead? What would you like to see changed?
Right now I am working around this issue while refactoring the component, but it might not even be worth keeping since it is different from the vanilla implementation. Would like some input on this matter though.
What version of the Carbon Design System are you using?
6.6.3
Additional information
Current Vanilla and React FileUploader
behavior:
The following behavior is present within React FileUploader
but currently unreachable. The idea seems to be that if the user is uploading multiple files, it will change the label text from Add files
to the number of files currently being uploaded, and if the user is uploading a single file, the label text will be changed to the name of the file being uploaded. Don’t know if I agree with this behavior but if it needs to be modified I can add in the revised behavior. Otherwise I can remove the unreachable code:
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (14 by maintainers)
Top GitHub Comments
thank you! Appreciate you doing that!
Thank you so much for doing this @emyarod! Just a note -
manageStatusPerFile
prop in V1 thing is only for contemplating starting with new vs. backward-compatible change. That said, once we see the former wins, we don’t do the latter (or vice versa). Thanks agina!