-
Notifications
You must be signed in to change notification settings - Fork 9
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
Limit snippet characters #379
Conversation
This reverts commit 9689486.
Looks good to me. I added a small CSS update so the error message looks red when there are too many characters. Could you add a test for adding a snippet that is too long and it is blocked? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add one test for this
Alright |
test_utils.py
…imit-snippet-characters
I made the following changes. |
@freedompraise unfortunately, I think the Snippet validator needs more work. I was able to get it to block me when I was well under 400 characters. This is because the text I copy/pasted in had formatting. See the following GIF Here is a link to the video if that GIF doesn't render. Also added a failing test for you that contains the HTML shown in the video. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve the failing text and check any other edge cases if you can find them.
If you applied that migration you had, you'll have to roll that back because I removed it. |
I'll look into it |
case for long text exceeding max length
Nice work @freedompraise. Merging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve!
Description
Added functionality to ensure the snippet field has a limit.
The limit used was 255 other suggestions would be appreciated.
For more detail, it closes #365
Changes Made
Test Plan
No test plan yet, till the logic is confirmed
Checklist