-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support the property disabled
.
#42
Conversation
1. Add property `disabled`, `disabledMessage`, `disabledStyle`. 2. Replace the unexposed property `disabledInput` by `disabled`.
Fix the responsive bug of drag and drop region when the property `disableDragAndDrop` or `disabled` changes.
Fix the message, style & class when `isUploading` is `True`.
Add two arguments `text_disabled` and `disabled` to `du.Upload`.
Hi @cainmagi ! Glad to see this implemented. Looks neat! I added basic testing functionality for the |
Thank you! I have already run your tests. Since I have no much time for web development after each Wednesday, I may have to give you some feedbacks later (as fast as Saturday?) |
Yeah sure take your time :) I am not in a hurry with this at all! |
1. Add `test_disabled01_check_disabled_property_update` for checking the feedback of `disabled`. 2. Add `test_disabled02_check_disabled_effect` for checking the feed back of `disabled` and `disableDragAndDrop`.
I have already finished the The test for |
I think this looks good! Could you add CHANGELOG and docs changes for the disabled property? |
Have updated docs and CHANGELOG. |
Thank you! I will try to start the new PR about the multi-services the next weekend. |
Introduction
This PR is aimed at fixing the issue #41.
Dear author:
I am glad to tell you that I have finished the
disabled
property. By the way, I have also fixed a bug ofdisableDragAndDrop
property. In previous versions, this property would only work during the initialization, and would not work if changed by callbacks.If you have reviewed my codes and find they are OK, I would start to modify the docs and CHANGELOG.
Thank you!
cainmagi
Example
The following codes could be used for testing the
disabled
property.What I have tested:
Disabled
option, the uploader would become semi-transparent. The click and the "drag & drop" would be disabled. The text message would change asThe uploader is disabled.
Disabled
option, everything would work as before.Disabled
, the message would be changed toDisabled
. If uncheckDisabled
, it would turn back to the complete message.Disabled
, everything would not be changed. The disable only take effects when the file is not uploaded yet or has been uploaded.The explanation is:
Update report
disabled
,disabledMessage
,disabledStyle
.disabledInput
bydisabled
.disableDragAndDrop
ordisabled
changes.text_disabled
anddisabled
todu.Upload
.pytest
scripts for thedisabled
property.test_disabled01_check_disabled_property_update
for checking the feedback ofdisabled
.test_disabled02_check_disabled_effect
for checking the feed back ofdisabled
anddisableDragAndDrop
.