-
-
Notifications
You must be signed in to change notification settings - Fork 829
Format mxids when disambiguation needed #5880
Conversation
Does this always disambiguate rather than only when needed? |
Yep, I misunderstood the issue... |
it looks sleek |
1b801e8
to
61a260c
Compare
Could you please add screenshots exercising Flair and a no displayname user please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine
Could benefit from a TS conversion if you fancy it
CSS unsupported in Safari is a blocker, unless PostCSS does some magic on it, let me know if it does.
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Co-authored-by: Michael Telatynski <[email protected]>
Really like this change! Tried to review but couldn't find a room with disambiguation happening 🤔 - all the rooms I've seen it in before just didn't have it, am I missing something? Judging from the screenshot (so its a bit harder to give solid feedback)
If people want to use the [ ] in the product, I'd personally suggest it's a separate issue and looks at it consistently across the product. I'd still personally advocate for it not being there but at least the consistency point would be irrelevant. Maybe I'm missing something really obvious because I don't necessarily know Matrix as well as others but it doesn't feel to me like the right thing to arbitrarily do here.
Thanks |
(the easiest way to cause disambiguation is to set up a GitHub notification bot or RSS bot through the integration manager) |
This indeed does sound like a Product issue, I think that for now it'll be good to keep consistency and keep |
I'm not convinced it needs to be deferred work here... we can just fix it in this PR, surely? |
Yeah, definitely |
Oops :D |
I meant; Change it back to Edit: Actually, after talking with @SimonBrandner i think changing this to no parentheses would be good? The original |
I'd rather we discuss it here given it's entirely within the context of this change. Also from the looks of it, the suggestion seems to be heading towards no brackets, not square vs round. |
The name, AFAIK, so i'll insert a mention into the current composer.
I'm in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add screenshots exercising Flair and a no displayname user please
It's on my list of things to do - sorry for the delay |
(I was noting it as a request so it doesn't get lost and someone merge without them is all, no rush) |
Yep, that was the point. Users had issues understanding what the mxid meant, so we were hoping that if we used a different font and color, it would be more understandable. You can read the original issue that this PR fixes for more detail: element-hq/element-web#16897 |
The typography change was my decision partially also, I thought that a monospaced font would be better representative of a "user ID", something closer to "technical", as (imo) monospace == technical. It also contributes to the "out of band" feeling i was going for, a different typography (and size) helps convey a difference in the bits of information the users would be reading, there and then. If it's going to be an issue to grab from the existing typography templates, i'll personally be okay with changing it to a "known" font right now, and think about which monospace font to add to the element design templates later, and then to apply to this. |
The preview is probably broken since I didn't update the js-sdk branch. I'll do that when I get home - 6 hours from now |
New js-sdk PR: matrix-org/matrix-js-sdk#1730 |
@nadonomy, the new preview should be working just fine. Sorry for the delay on this |
@SimonBrandner thanks! And np on the delay/build. So, after testing, I'm more resolute on the use of distinct typography in this use case being a misstep. I understand the rationale and goal of wanting to use a more technical looking font to communicate a more technical piece of information. On reflection though, I think it serves anti-goals:
Here's the PR as it stands: And here's a visual iteration using devtools: To arrive at this I removed the And thanks for all of your effort on this so far. :) |
I'm not exactly sure if the brightness value of that last screenshot would be exactly what I was aiming for (a de-emphasised piece of information that can - if needed - be glazed over), the brightness there is as high as the actual username, and I think it adds some subtle confusion. Wouldn't it work to lower it, to either some brightness like the state-change motif above ("[...] joined the room"), or somewhere in between? Sorry to add this quick design suggestion. Edit: to be clear, I agree with the reasoning of the changes made, I just think the change doesn't address the original thing I wanted it to do; de-couple the disambiguated MXID from the displayname, and make it "different" enough. I think that previously the font took the job of that, but right now, sans color, it looks almost the same to me, except a slightly misaligned font size, that's my feedback. |
Signed-off-by: Šimon Brandner <[email protected]>
@nadonomy, thanks for the review! I've updated the styling based on your suggestions |
Poking at devtools a little and picking @nadonomy what do you think about this? |
Personally, I like this one better |
Gotcha. Deferring it in the hierarchy is a great idea/suggestion. However, we shouldn't insert new magic values into the codebase. It creates debt (at one point we had >100 different shades of grey) and we're working to unify all the styles in the app. It'd be better to use an existing style, to ease unifying them. From inspecting, can we match what we do for the join/leave styles pls? It just inherits body colour (so in light: |
Of course, that's what I meant to intend, though I didn't write that down explicitly. I saw somewhere else there's a color style Figma document, and efforts to unify the colors to that document, I eyeballed the color because I wanted to convey the meaning, I'll leave it up to you and Simon to find the right one, but yes, I meant to "defer it in the hierarchy", I just couldn't find those words. Here are the corresponding screenshots with dark and light: |
Signed-off-by: Šimon Brandner <[email protected]>
@nadonomy, I've updated the styling, so now it should look like join/leave (and other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks all. :)
On these screenshots the font weight looks like it might be a touch too heavy, but hard to tell without using it in practise across multiple screens, resolutions, aliasing settings etc.
Approving, but may tweak the visuals after more testing!
Thanks for all the feedback
Sure, let me know if you have any further suggestions after using this in the wild |
(re-requested a code review as I've made a few changes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
Signed-off-by: Šimon Brandner <[email protected]>
Description
Fixes #16897
Requires matrix-org/matrix-js-sdk#1730
Showcase
Dark
No display name:
Disambiguated + flair:
Light
Disambiguated + flair: