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

Overiding the rule "Comment should contain atleast 1 character" and having empty comments in Shifting Deatils page #2532

Closed
patelaryan7751 opened this issue May 26, 2022 · 3 comments

Comments

@patelaryan7751
Copy link
Contributor

Bugs

We can easily Overide the rule "Comment should contain atleast 1 character" by giving "space" and posting the comment. Below is a video to demonstrate the same.

video6.mp4
@Ashesh3
Copy link
Member

Ashesh3 commented May 26, 2022

I believe that the intention of displaying the message "Comment should contain at least 1 character" to the user is to prevent mishaps where they user might accidently try to hit the "Post comment"/"Add note" button without actually filling the box.

Sure, they can still bypass it by adding a space. But if we then add a check for the space, we would need to address dozens other ways where the user might try to post an empty comment. For example, using empty Unicode characters or even unintentional characters like a single dot or multiple spaces, tabs etc.

Although adding this is a neat little change, I think it might be out of scope of the behavior we are expecting from the check there currently is (Which is only checking length of the TextField's value).

TLDR; There would be many ways to bypass this check and it's main purpose should be limited to just nudging the user in case they hit submit without any text, accidently.

Just my thoughts, would love to hear other opinions on this! 😄

@patelaryan7751
Copy link
Contributor Author

I believe that the intention of displaying the message "Comment should contain at least 1 character" to the user is to prevent mishaps where they user might accidently try to hit the "Post comment"/"Add note" button without actually filling the box.

Sure, they can still bypass it by adding a space. But if we then add a check for the space, we would need to address dozens other ways where the user might try to post an empty comment. For example, using empty Unicode characters or even unintentional characters like a single dot or multiple spaces, tabs etc.

Although adding this is a neat little change, I think it might be out of scope of the behavior we are expecting from the check there currently is (Which is only checking length of the TextField's value).

TLDR; There would be many ways to bypass this check and it's main purpose should be limited to just nudging the user in case they hit submit without any text, accidently.

Just my thoughts, would love to hear other opinions on this! smile

Yeah @Ashesh3 I completely agree on this but comment without anything looks a little unprofessional it can contain anything a dot or any single character but containing space can make it look empty :) Even in whatsapp try to send a message containing
only spaces no character it would not allow you to send it. Having this check maybe a bit enhancement 😄

@Ashesh3
Copy link
Member

Ashesh3 commented May 26, 2022

I believe that the intention of displaying the message "Comment should contain at least 1 character" to the user is to prevent mishaps where they user might accidently try to hit the "Post comment"/"Add note" button without actually filling the box.
Sure, they can still bypass it by adding a space. But if we then add a check for the space, we would need to address dozens other ways where the user might try to post an empty comment. For example, using empty Unicode characters or even unintentional characters like a single dot or multiple spaces, tabs etc.
Although adding this is a neat little change, I think it might be out of scope of the behavior we are expecting from the check there currently is (Which is only checking length of the TextField's value).
TLDR; There would be many ways to bypass this check and it's main purpose should be limited to just nudging the user in case they hit submit without any text, accidently.
Just my thoughts, would love to hear other opinions on this! smile

Yeah @Ashesh3 I completely agree on this but comment without anything looks a little unprofessional it can contain anything a dot or any single character but containing space can make it look empty :) Even in whatsapp try to send a message containing only spaces no character it would not allow you to send it. Having this check maybe a bit enhancement 😄

Yep, agree with you there, could be a neat enhancement!
We would also need to add a check for invisible Unicode characters too, since that would let users post a blank (but non empty) comment.

Bonus: Try copy pasting this character ‏‏‎ ‎ (select the code block and copy), into Whatsapp then send it and see what happens 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants