Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Riot should accept mixed-case group IDs and handle them as lowercase #5434

Closed
turt2live opened this issue Oct 25, 2017 · 10 comments
Closed

Riot should accept mixed-case group IDs and handle them as lowercase #5434

turt2live opened this issue Oct 25, 2017 · 10 comments
Labels
A-Spaces Spaces, groups, communities T-Defect

Comments

@turt2live
Copy link
Member

Description

Creating groups for instance results in a server-generated error. It should probably be tolerant of mixed case and just convert it to lowercase.
image

Further, it should handle mixed case mentions of group IDs to avoid screens like this:
image

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 62
  • OS: Windows 10
  • URL: riot.im/develop
@lampholder lampholder added T-Defect A-Spaces Spaces, groups, communities ui/ux labels Oct 26, 2017
@lampholder
Copy link
Member

Further, it should handle mixed case mentions of group IDs to avoid screens like this:

Agreed; if group names are case insensitve, then loading +MATRIX:Matrix.org should always 'just work' (whilst making sure never to show anything but the canonical lower case +matrix:matrix.org in any UX)

Creating groups for instance results in a server-generated error. It should probably be tolerant of mixed case and just convert it to lowercase.

I wonder what's the right UX for this? It would be good for people camel-casing their group name to know as quickly as possible that that isn't going to be persisted (to avoid pen island fun). Would it be offensive to style the textbox to show only lower case? With a warning perhaps? What does: http://jsfiddle.net/5ocu2cqk/2/ feel like?

@turt2live
Copy link
Member Author

Showing the mixed case ID might hint that mixed case IDs are possible. It might be better to just correct the user, so instead of +MATRIX they see +matrix in the group views (the message would remain unchanged though, unless it gets pilled 😇)

The fiddle feels a bit intrusive and distracting; I found that I stopped typing to read the prompt, which is good, but it had me think (briefly) about what I was trying to type before the prompt. Maybe a post-entry prompt is suitable? ie: "Only lowercase letters are allowed for group IDs, is +mygroup:matrix.org okay? [yes] [no]". Clicking 'no' would probably bring you back to where you can fix the group ID. This isn't to say the prompt isn't bad though, it could use a little bit more time being open (possibly just persist), and it doesn't handle caps lock.

@lampholder
Copy link
Member

Yeah, I got into making it handle capslock (surprisingly hard - the js event seems to give you every bit of keyboard state, apart from capslock) and then realised I was spending too long on a throwaway illustration :D

I think you're right - post-entry substitution and confirmation sounds good to me.

@lampholder
Copy link
Member

On the other hand - if you forget the prompt and just leave it as auto-styling everything to lower case, how invasive does that feel?

@turt2live
Copy link
Member Author

The user may feel disappointed that their pen island got clobbered, but they'd always have the option to abandon the group and create a new one. Chances are this would only happen on initial setup anyways, so they shouldn't be too broken hearted about it.

@lampholder
Copy link
Member

lampholder commented Oct 27, 2017

OKAY so I dived into this a little too deeply perhaps and came up with: http://jsfiddle.net/5ocu2cqk/6/

You have to click 'Run' on the fiddle to get the headers to have the right styling for some reason.

@lampholder
Copy link
Member

aaaaaand I've just learned that we (currently) don't allow dashes in group ids! Client side (server side it is allowed). Maybe we could change that..

@turt2live
Copy link
Member Author

That feels much better overall :D A timeout on the shake could probably help, to avoid the constant shaking when capslock.

@lukebarnard1
Copy link
Contributor

matrix-org/matrix-react-sdk#1558 will make Riot use the same validation as the server.

@SimonBrandner
Copy link
Contributor

Spaces are now in beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Spaces Spaces, groups, communities T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants