Bug 5003

Summary: The 'Description' field in the 'Save image recipe' dialog does not enforce the character limit
Product: [Build System, Metadata & Runtime] Hob Reporter: Belen Barros Pena <belen.barros.pena>
Component: hobAssignee: Cristiana Voicu <cristiana.voicu>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: Low CC: belen.barros.pena, cristiana.voicu, jessica.zhang, poky.bs.watcher, poky.watcher, valentin.popa
Version: unspecified   
Target Milestone: 1.5 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
error when you start description with a blank line none

Description Belen Barros Pena 2013-08-09 10:54:43 UTC
When you save an image recipe, you can enter your own description for it. However, these description should not exceed 150 characters, to ensure they are not truncated when displayed in the Image Configuration screen. This is why we need the 'Description' field in the 'Save image recipe' dialog to enforce a 150-character limit.

Also, it is good practice to use the size of the control (in this case, the text area) to suggest the amount of input required. 150 characters fit within 3 lines in that text area, so the height of the text area should be equivalent to 3 lines of text and should not allow you to go onto a 4th line (currently you can use as many lines as you want).
Comment 1 Cristiana Voicu 2013-09-04 08:29:23 UTC
Hi Belen,

I sent the patch on mailing list. I've created a branch for you to check:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=cvoicu/descriptionHob
After I've sent the patch I've remembered that the height of the textview should be chhanged...Can you please check and tell me if this is needed too? I am thinking that someone could press a lot of enters..but I want to know if this should be modified, in order to send another version for the patch.
Thanks,
Cristiana
Comment 2 Belen Barros Pena 2013-09-04 12:50:08 UTC
(In reply to comment #1)
> Hi Belen,
> 
> I sent the patch on mailing list. I've created a branch for you to check:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=cvoicu/
> descriptionHob

Character limit working now. Thanks!

> After I've sent the patch I've remembered that the height of the textview
> should be chhanged...Can you please check and tell me if this is needed too?

It looks a bit weird as is, to be honest. I am stopped from entering text but I can still see all this blank space available in the text area. It's giving you really mixed signals :( It would be great if we could reduce the size of the text area to reflect the input limit.

> I am thinking that someone could press a lot of enters..

That is funky. When I reach the character limit, I can no longer enter line breaks. But until then, I can enter line breaks and each of them is counted as a character against the character limit of 150. So if I press enter 10 times, my description can only be 140 characters long. Can we ignore line breaks? Also, they seem to cause some parsing error (check attached screenshot).

> but I want to know
> if this should be modified, in order to send another version for the patch.
> Thanks,
> Cristiana
Comment 3 Belen Barros Pena 2013-09-04 12:53:03 UTC
Created attachment 1458 [details]
error when you start description with a blank line
Comment 5 Belen Barros Pena 2013-09-16 13:17:53 UTC
5fca4d286eec240ad57d90defa43cd0ff24f88ed