-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Grammar and disambiguation of display names (SPEC-392) #177
Comments
Jira watchers: @richvdh |
Links exported from Jira: relates to https://github.com/matrix-org/matrix-doc/issues/538 |
See also https://github.com/matrix-org/matrix-doc/issues/538, which discusses what we can do once we figure out that two displaynames are ambiguous. -- @richvdh |
Should there be a length limit? Would it apply to unicode codepoints, normalised unicode codepoints, or composed characters? -- @richvdh |
"Modulo highlighting of mentions" - this should probably be done via Unicode-spec-compliant collation, so as to avoid problems regarding composed/decomposed/etc, but that opens a whole new can of worms due to collation being locale-dependent :( -- Alex Elsayed |
Also, porting over a comment from SPEC-1:
I stand by this - the vast majority of whitespace is not meaningful in what is essentially a "line-like" value, and has empirically caused real confusion when accidentally inserted. -- Alex Elsayed |
I'm reluctant to base the requirements for this bug around mentions - as you have pointed out it is thorny due to being locale-dependent. I would rather we had richer interface for mentions (I quite like the way jira does it, actually), but that is a topic for a separate bug.
[~eternaleye]: Can you enlarge on this? was it simply that someone was not getting notifications when they might have expected it, because the name didn't match? -- @richvdh |
Nothing to do with mentions - more that, in essentially any case where a display name is presented, vertical whitespace is entirely nonsensical (and in the existing clients, that case was mistaken for a bug in either rendering or markdown formatting for quite a while before it was figured out). In essence, vertical whitespace makes sense only in documents - and the same is true of most horizontal whitespace, such as tab characters. As a display name is essentially a line-oriented context that gets embedded in a document-like context, allowing them is the visual equivalent of breaking encapsulation. It consistently confuses the humans reading it, not the computers matching against it. -- Alex Elsayed |
The same issue I reported in https://github.com/matrix-org/matrix-doc/issues/669#issuecomment-256942216 and https://github.com/matrix-org/matrix-doc/issues/669#issuecomment-256942218 seems to also affect the displayed names of rooms - this was brought to my attention today by there being a large number of newlines in the name of |
Lots of discussion of this (which almost got lost in the mists of time) over at: matrix-org/matrix-spec-proposals#3 (comment) |
There is another problem with the current disambiguation rules for display names which I consider rather serious from a security perspective. If I understood the spec (11.2.2.3) right, it basically amounts to using the display name if it exists and using the raw user ID if not, unless there is a conflict between display names, in which case both display names should be disambiguated using the raw user ID. However, consider the following case:
On a first glance, it is natural to assume that user I propose that the server should reject attempts to set display names containing valid Matrix user IDs. It seems that allowing them in display names has little overall benefit, but is a great potential source of confusion. |
Note: In development versions of Riot this is no longer an issue due to matrix-org/matrix-js-sdk#588 (although imho it can be overzealous: element-hq/element-web#5914 ) |
@turt2live Yeah, I found that after I had already posted this. However, the disambiguation still looks rather ambiguous to me, particularly if I try to view it from the perspective of someone new to Matrix or a more casual computer user. Having a better visual distinction than it just being parenthesized text would help a bit, but then there's the problem of each client having to find its own solution to this problem, which isn't an easy task at all. It seems to be there should be some ground truth (which is what mxids are) which should be guarded strictly, hence why I suggested not allowing mxids in display names server-side. |
interesting to note that riot-web have worked around much of this with the use of unhomoglyph. We need to decide whether to mandate the same for other clients. |
Both users and rooms can have display names. I think we can apply the same rules to both users and rooms, so I am covering both under this issue.
The emphasis here is on human-readability - they are not really meant for machine interpretation (modulo highlighting of mentions). Display names must therefore support the full gamut of unicode: non-bmp characters, zalgo, RTL scripts, etc.
However, things are complicated by the desire to disambiguate users. Currently, if we have two "Matthew"s in a room, we disambiguate them by also showing the user id. So the question is: how do we determine if we need to disambiguate users, and can we design the grammar of them to make this easier. For instance: do we allow empty displaynames, or those containing only whitespace? Do we allow names to start or end with whitespace, or contain sequences of whitespace characters? Do we mandate a certain sort of Unicode normalisation?
(Imported from https://matrix.org/jira/browse/SPEC-392)
(Reported by @richvdh)
The text was updated successfully, but these errors were encountered: