fix(FileUpload): Improving events in the FileUpload#6139
fix(FileUpload): Improving events in the FileUpload#6139tlabaj merged 18 commits intopatternfly:mainfrom
Conversation
0e3e1e8 to
ee40e03
Compare
|
PF4 preview: https://patternfly-react-pr-6139.surge.sh |
|
So far the new properties make sense to me! :) |
|
I agreed with @christianvogt on adding |
c2b3d63 to
d106ffd
Compare
d6fc959 to
cd9f6e9
Compare
|
Thanks for your perseverance @wojta ! |
6519006 to
2db9839
Compare
mturley
left a comment
There was a problem hiding this comment.
This largely looks great, but I have a couple of thoughts here. @redallen @nicolethoen do you think it is worth holding this PR up for these changes? I'd be happy to push a commit to this branch if you agree with the feedback since @vojtechszocs may be unavailable.
Looking at how this relates to #3966, I think we can follow up on that in a separate PR since it'll take consideration on how to deprecate dropzoneProps without removing it. I just think maybe the tweaks here will prevent merging some minor tech debt.
| /** Value to be shown in the read-only filename field. */ | ||
| filename?: string; | ||
| /** A callback for when the file contents change. */ | ||
| /** *(deprecated)* A callback for when the file contents change. Please use rather the individual events. */ |
There was a problem hiding this comment.
I think since this is still a beta component, maybe we can just remove this rather than deprecate it?
Edit: ah... I missed when we promoted this from beta. I should have followed up on #3966 sooner 😆
There was a problem hiding this comment.
can we change the wording here a bit. The Please use rather the individual events is a bit confusing.
There was a problem hiding this comment.
How about "A callback for when the file contents change. Please instead use onFileInputChange, onTextChange, onDataChange, onClearClick individually."?
I'm also realizing I didn't propagate some of these changes to the examples markdown. Fixing now as well.
|
I think it's worth holding up and it's okay for you to push to this branch @mturley . |
|
@redallen I pushed commits to resolve my comments. I also renamed the |
|
Also |
tlabaj
left a comment
There was a problem hiding this comment.
Looks great. Jut a couple of small nits
| /** Value to be shown in the read-only filename field. */ | ||
| filename?: string; | ||
| /** A callback for when the file contents change. */ | ||
| /** *(deprecated)* A callback for when the file contents change. Please use rather the individual events. */ |
There was a problem hiding this comment.
can we change the wording here a bit. The Please use rather the individual events is a bit confusing.
4490637 to
fc0fa0f
Compare
What: Closes #5545
What changes?
onChangeis now split in more events, old event remain there for the compatibilityonTextChange- when text area changes (@mturley edit: renamed fromonTextChanged)onFileInputChange- called when internal<input>field emits its ownonChangeDOM event (@mturley edit: renamed fromonInputChange)onDataChange- when data is loaded in the component (@mturley edit: renamed fromonDataChanged)onClearClick- when clear button is clicked (@mturley edit: renamed fromonClearClicked)10.2.2