Rocket.Chat
Rocket.Chat copied to clipboard
[WIP] [FIX] Allow spaces in channel creation ui
This PR allows spaces in channel creation in the client side. It removes the code that used to be replacing spaces with empty string.
When enabled, the UI_Allow_room_names_with_special_chars
setting skips any validation at the client side.
However at the sever it caused error when trying to use non-latin languages like Hebrew, because it enables the slugify
function of underscore.string
that returns an empty string.
Using the slugify
function is not so logical because there is another UTF8_Names_Slugify
setting that is used only at getUsernameSuggestion.js
and sync.js
files in server/methods
and rocketchat-ldap
package respectively.
This PR fixes this issue and allow using spaces in channel names while configuring the UTF8_Names_Validation
to include spaces.
Further work needs to be done in order to merge it with Official Rocket.Chat repo:
This fix depends on the UTF8_Names_Validation
setting, but it also allows users to have spaces in their usernames.
In order to fix it, I suggest to separate UTF8_Names_Validation
into 2 new settings:
-
UTF8_Channel_Names_Validation
-
UTF8_User_Names_Validation
That way we can achieve granular-level settings.
Also, I suggest we should remove the UI_Allow_room_names_with_special_chars
setting, because it's no longer needed when we have a granular-level settings - we can set the RegExp to be exactly how we intend.
@shahar3012 any updates on this?
I believe this subject is important and the importance of it is neglected.
It's EOY 2018 and we still want our users to be ok with "channel-name" and other Stone Age rudiments.
It significantly hinders readability. It makes the interface look like a mess. And it's plain substandard.
@yevgenydevine, I agree with you.
We did a fork of Rocket.Chat in RocketTar/Rocket.Chat
and implemented a solution for our need at the organization.
We haven't had the time to proceed with the implementation I've suggested here.
You can take it from where we left and make a full pull request from our branch 0.71.0-fixes
.