project-robius / robrix

Robrix: a multi-platform Matrix chat client written in Rust using the Makepad UI toolkit and the Robius app dev framework
MIT License
107 stars 18 forks source link

Display verification status as a badge atop the user profile icon #241 #244

Open Demolemon11 opened 2 weeks ago

Demolemon11 commented 2 weeks ago

issue241

Demolemon11 commented 1 week ago

Now that I see the visual effect, I think we should probably switch to a different design for the icon. Instead of an outline of a shield that is transparent in the middle, we should switch to a shield icon that has a solid color fill (green/red/gray), with a solid-white inner checkmark / exclamation point / question mark, as that will be is easier for the user to read.

This is equal to What should be transparent is not transparent, instead, what should not be transparent is transparent., my english is not good.

Demolemon11 commented 1 week ago

It seems that there is a bug: https://github.com/project-robius/robrix/blob/f4ffba56d97aa887d74f9ffd426aab007580cc19/src/home/spaces_dock.rs#L192-L193 The verification_state will be changed to its default value VerificationState::Unverified once app window was resized to mobile layout. I also tried to set #[rust(VerificationState::Unverified)] to #[rust(VerificationState::Unknown)], also in the expectation, the icon become the ? with gray.

Here is the screenshot: Screencast from 2024-11-12 19-09-02.webm

I will send the log video to wechat cahnnel because it is a little large.

kevinaboos commented 1 week ago

Now that I see the visual effect, I think we should probably switch to a different design for the icon. Instead of an outline of a shield that is transparent in the middle, we should switch to a shield icon that has a solid color fill (green/red/gray), with a solid-white inner checkmark / exclamation point / question mark, as that will be is easier for the user to read.

This is equal to What should be transparent is not transparent, instead, what should not be transparent is transparent., my english is not good.

oh ok, great, then we agree! Sorry for the misunderstanding.

kevinaboos commented 1 week ago

It seems that there is a bug:

https://github.com/project-robius/robrix/blob/f4ffba56d97aa887d74f9ffd426aab007580cc19/src/home/spaces_dock.rs#L192-L193

The verification_state will be changed to its default value VerificationState::Unverified once app window was resized to mobile layout. I also tried to set #[rust(VerificationState::Unverified)] to #[rust(VerificationState::Unknown)], also in the expectation, the icon become the ? with gray. Here is the screenshot: Screencast from 2024-11-12 19-09-02.webm

I will send the log video to wechat cahnnel because it is a little large.

Well yes, this isn't a bug, it's just a missing part of your current implementation in this PR so far. This behavior is expected, since you haven't dealt with that case yet.

To fix this, you need to make sure the state of the verification badge is preserved when transitioning between the Desktop and Mobile views. If you're unsure how this works, I'd recommend reaching out to Julian, who wrote that code initially (or perhaps another intern can help you out).

alanpoon commented 21 hours ago

Looks ok now. You can just do some code cleanup. Revert back all those non-related changed.

ZhangHanDong commented 20 hours ago

From the code, it seems that the feature of displaying corresponding text on mouse hover has not been implemented yet ?

Then, when the user hovers over the badge/profile picture, we should display a tooltip that states the verification status, which is either "Verification unknown", "Unverified", or "Verified".