So this isn't really a bug (or a minor one if that). Recently the Zigbee radio on my C-4 hub died. I picked up a new C-7 hub and am slowly transferring devices and apps over.
I'm taking this time to rename everything and to rewrite my security lighting app. I want the labels to be more structured and useful. Initially I was using a convention like this:
The first three letters denote the location (WS = workshop, MBR = master bedroom, etc). So I could easily find things by room, device type, and use. The abbreviation also kept the names shorter for viewing on a mobile device.
This all seemed to be going well, until I started working on my custom app. Suddenly the commas became line breaks. You can see this in the following capture:
In the group entry you can see that I renamed groups to use dashes instead of commas. This works but I feel the original comma and space made for a cleaner display. So not really a serious bug but interesting that the UI is handling the label differently. I do find it interesting that it handles it OK in the dropdown list:
The light groups are actually on a C-5 hub connected via the mesh utility. I doubt this has any bearing on the display, just mentioning it for completeness.
So what naming conventions have other people come up with? My previous integration was along the lines of "Light - living room - north". This was definitely not intuitive for searching the device screen. I'm also putting devices into rooms on the C-7. It will be interesting to see how this feature develops.
Naming convention aside (though I usually also do what @Sebastien does--I have devices like "Kitchen Motion" or "Living Room Dimmer," though sometimes I throw in the brand name or model if I need to distinguish multiple such devices, which works well if you're nerdy enough to remember what they mean), I think you've discovered a bug/oddity in Hubitat's device list display in apps. The fact that you're using a custom app is somewhat of a red herring, as I was able to replicate this issue in Basic Rule, a stock app, by using devices with display names like yours:
Perhaps Hubitat's app UI is doing overly simplistic parsing, like taking the output of the list that might be comma-separated by default and splicing new lines into there instead, rather than actually using the end of the device name as a cutoff.
This seems like the kind of bug--or at least issue--that their UI team would want to address.
I don't think I'd ever use commas in that way, as it causes similar complications in many applications. I use underscores or hyphens, sometimes colons or to be really safe I run all the words together with capitals demarking the start of each word.
It looks like we all ended up on the same path. As I'm rebuilding things I have been experimenting with the formats and think I'll just use spaces (EXT motion driveway). I liked the commas to group the logical groups but it isn't really that difficult to follow without. I'm the only one that will be looking at it so not a big deal.
I do use camel case in coding. I wanted something more readable for the labels. I view the labels as a text string and it should be able to handle a comma. A label is a UI element and it shouldn't be parsed. Just like I wouldn't expect a UI to display an address as 1234MainStreetLasVegasNV89101.