KamandPrompt/baat-cheet

Room ID shouldn't have spaces

Opened this issue · 4 comments

In the current implementation we give the room name as the id of the room element. But incase the room name has spaces the room id is then set with spaces, which wrong. So when there are space in the room name, the room id should be set with the spaces being replaced with - . If the room name is Hello World, id should be Hello-World .

This is a critical change as room id is being used a lot of places and the change should ensure that nothing gets broken.

@abhigyank You could replace the with a - client-side so that room names are human-readable and don't require validation on room creation. My 2 cents

@sesamechicken I think that's something the backend should handle ideally. Because if a user creates a room with and we show them it replaced with -, it's not good UX.

I think I didn't communicate it correctly:

The user should be able to create a room with spaces. You can, in the front end code, set the ID's as the room name with the spaces replaced with dashes so you have qualified selectors. Does that make sense?

Yes you're right @sesamechicken . That's exactly what needs to be done in this issue.