π BUG: max character count on shared post not shown or validated
What went wrong? π€
If you click on "share a link" there is a box to enter extra info.
This box does not stop you writing more than 250 characters, which appears to be the limit according to the graphQL error I saw in the network tab.
The error shown is just "validation failed" in the user interface.
This needs the same character count info and front end validation as the "write a post" tab in the same screen to avoid confusion.
Steps to replicate
Insert a URL and then type 251 characters (or more) into the "share your thoughts" screen, you will get a validation error toast.
Network request response:
{
"data": null,
"errors": [
{
"message": "Validation error",
"locations": [
{
"line": 14,
"column": 5
}
],
"path": [
"createPostInMultipleSources"
],
"extensions": {
"code": "ZOD_VALIDATION_ERROR",
"issues": [
{
"origin": "string",
"code": "too_big",
"maximum": 250,
"inclusive": true,
"path": [
"commentary"
],
"message": "Too big: expected string to have <=250 characters"
}
]
}
}
]
}
Expected Behavior
It stops you adding more than 250 characters in the first place and shows a character counter.
Steps to Reproduce Issue
Include in main description
Solution Proposed
See expected behaviour.
Screenshots
No response
Environment
No response
Browsers
Chrome
OS
Windows
Version of daily.dev
latest / web
Additional Context
Code of Conduct
- [x] I follow the conditions of this project.
Iβve submitted a fix in the apps repository that adds frontend character limit enforcement and a counter to the βShare a linkβ commentary field. PR: https://github.com/dailydotdev/apps/pull/5194/commits/dd7456040fb3c682794d82c79564dcf0dd614692
@edwinjojie thanks for your help! there's pending feedback on your PR π
This is fixed now π€