-
Notifications
You must be signed in to change notification settings - Fork 760
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
[Device management] Update the unknown verification status icon (PSG-824) #7361
[Device management] Update the unknown verification status icon (PSG-824) #7361
Conversation
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, just 2 remarks.
if (unverifiedSessionsCount == 0 && inactiveSessionsCount == 0) { | ||
hideSecurityRecommendations() | ||
} else { | ||
views.deviceListHeaderSectionSecurityRecommendations.isVisible = true | ||
views.deviceListSecurityRecommendationsDivider.isVisible = true | ||
views.deviceListUnverifiedSessionsRecommendation.isVisible = unverifiedSessionsCount > 0 | ||
|
||
views.deviceListUnverifiedSessionsRecommendation.isVisible = unverifiedSessionsCount > 0 && isCurrentSessionVerified |
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 be nice to start using Paparazzi to test the different state of the View.
There is an example in PaparazziExampleScreenshotTest
and a doc screenshot_testing.md
is the project.
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.
Yes, we will plan it. For now, the screens are still subject to change. Once the feature is stable, we will add some tests.
<path | ||
android:strokeWidth="1" | ||
android:pathData="M12.008,23.487C12.005,23.487 12.002,23.488 12,23.489C11.998,23.488 11.995,23.487 11.992,23.487C11.92,23.471 11.813,23.445 11.675,23.409C11.399,23.337 11.002,23.223 10.523,23.058C9.565,22.725 8.292,22.186 7.022,21.361C4.49,19.715 2,16.954 2,12.405V3.45L12,0.521L22,3.45V12.405C22,16.954 19.51,19.715 16.978,21.361C15.708,22.186 14.435,22.725 13.477,23.058C12.998,23.223 12.601,23.337 12.325,23.409C12.187,23.445 12.08,23.471 12.008,23.487Z" | ||
android:fillColor="#737D8C" |
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.
Maybe define and use a new color for this new shield as per https://github.com/vector-im/element-android/blob/main/library/ui-styles/src/main/res/values/colors.xml#L142
Also update line 14 and file ic_shield_unknown_no_border.xml
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.
I have added the new color resource but I had to enable backward compatibility for API < 24 (see https://developer.android.com/develop/ui/views/graphics/vector-drawable-resources#vector-drawables-backward-solution). The update: cf25b81
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/shield_color_unknown" |
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.
Backward lib compatibility has been enabled in vector
module to avoid that, we should not have a warning here.
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/shield_color_unknown" |
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.
⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable
android:strokeWidth="1" | ||
android:strokeColor="#ffffff" /> | ||
<path | ||
android:fillColor="@color/shield_color_unknown" |
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.
⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="@color/shield_color_unknown" |
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.
⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable
android:strokeWidth="1" | ||
android:strokeColor="#ffffff" /> | ||
<path | ||
android:fillColor="@color/shield_color_unknown" |
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.
⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable⚠️ Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable
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.
Thanks!
SonarCloud Quality Gate failed. |
Type of change
Content
Update the UI to handle verification status of other sessions when the current one is not verified.
Motivation and context
Closes #7327
Screenshots / GIFs
Tests
Tested devices
Checklist