Sheffield | 25-SDC-Nov | Hassan Osman | Sprint 1 | Bug Report: Extra long blooms?#147
Conversation
OracPrime
left a comment
There was a problem hiding this comment.
Convince me of your approach (good luck!) or make it fail not trim!
front-end/components/bloom-form.mjs
Outdated
| const originalText = submitButton.textContent; | ||
| const textarea = form.querySelector("textarea"); | ||
| const content = textarea.value.trim(); | ||
| const content = textarea.value.trim().slice(0, 280); |
There was a problem hiding this comment.
I'm not convinced. Should too long a bloom fail, or should you truncate it and accept it? I think it should fail.
There was a problem hiding this comment.
To be honest, at the time I was in two minds whether or not to handle the too long bloom with an error which lead to it not being submitted. However, somehow eventually I resorted to chopping the extra characters. I perhaps thought this approach would me more ideal since it's already published bloom.
I understand now I have to fail it altogether. I will working on it. Thank you.
… will later be replaced with a logic that fails the bloom altogeather.
… the console. Use it to skip it while fetching all blooms from backend
…en blooms fetched from backend
|
AS bloom - the one over 280 character is now hidden. Not sure if it's the ideal approach but I did use the bloom id from the error message showed up on my browser and used it to skip over the culprit bloom when blooms are being fetched. |
|
I understand very well that, ideally, there should've been a condition that'd check if a bloom was over 280 characters and if so it'd be skipped over. Having said that this just didn't work for some reason when i did it. |
|
UPDATE: Well, it has worked now - I replaced the bloom ID-based logic to a conditional logic that checks if bloom is over 280 char and skips over it if that's the case. I had to disconnect from all ports and reconnect again. |
Self checklist
This PR fixes AS's extra long bloom bug by ensuring it respects the 280-character limit. Changes include: