-
Notifications
You must be signed in to change notification settings - Fork 357
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
Add error when clicking upload image without selecting a file #5265
Conversation
Checked commit ZitaNemeckova@19a9641 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
The changes look good. The only think that I wonder about is whether the flash message at the top is really needed here. It says Thanks. |
Wouldn't it be better to just disable the "Upload chosen file" button if no files are selected? |
@terezanovotna please have a look and tell me if this is UX-wise ok. I'm not sure if the Upload button should be clickable if no file is selected or just to show the error if user clicks it without selecting a file. Thanks :) |
@mzazrivec It's awesome we have an error notification as well as the red area in the form. We want to notify the user and then point out the area that needs to be corrected. @himdel Yes, the button should be disabled when nothing is chosen. Follow up question: Why do we have "upload chosen file" button? Let's say I choose my image file, it's pretty obvious I want to upload it right away. |
If we want to disable the I also think that the |
agreed! But, we need a flash message. We need to notify the user what is going on. |
@terezanovotna Can you be really specific about what the message should be for please? "No file chosen" is completely useless as a message if the user is not trying to click an upload button. |
Looking at it now, if we combine two actions (choose and upload) together, then we don't need flash message because that error cannot happen. @himdel you got it right! Sorry |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650104
Go to Automation -> Automate -> Generic Objects -> Configuration -> Add a new Generic Object Class -> DO NOT chose a file for Custom Image -> click chosen image
Before:
Nothing happens
After:
There's error message and the input is read with a hint what's wrong (based on #5139 (comment))
@miq-bot add_label bug, hammer/yes, generic objects, automation/automate