-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-1214] device management screen #12455
base: main
Are you sure you want to change the base?
Conversation
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #12455 +/- ##
==========================================
+ Coverage 33.61% 33.78% +0.16%
==========================================
Files 2925 2913 -12
Lines 91433 90760 -673
Branches 17376 17165 -211
==========================================
- Hits 30734 30661 -73
+ Misses 58283 57713 -570
+ Partials 2416 2386 -30 ☔ View full report in Codecov by Sentry. |
I could use help on a few things I'm unsure of on this PR:
|
…b.com/bitwarden/clients into auth/pm-1214/device-management-screen
getCurrentDevice$(): Observable<DeviceResponse> { | ||
return defer(async () => { | ||
const deviceIdentifier = await this.appIdService.getAppId(); | ||
return this.devicesApiService.getDeviceByIdentifier(deviceIdentifier); | ||
}); | ||
} |
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.
DevicesService
vs this service. This also allows you to undo the strict typing updates here so we don't have to re-test the device trust implementation for this change.
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.
This is looking great! I've got a few UI suggestions and some minor clean up items below:
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.
💡 : upon watching the video, I think we should implement a loading state for the table which doesn't show the table until the data is loaded.
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've added a loading state for when the table is loading, and added the spinner for when async actions are waiting to complete: 0932e18
apps/web/src/app/auth/settings/security/device-management.component.html
Outdated
Show resolved
Hide resolved
<h2> | ||
{{ "devices" | i18n }} | ||
<i class="bwi bwi-question-circle tw-h-5 tw-w-5 bwi-color-primary" aria-hidden="true"></i> | ||
</h2> |
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.
The figma calls for a loading icon here when async actions like remove device or log out are being taken
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.
} | ||
|
||
const category = this.i18nService.t(metadata.category); | ||
return metadata.platform ? `${category} - ${metadata.platform}` : category; |
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.
❓ : Nice job building out this metadata out. Do you think we should translate "Unknown" as a platform?
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.
Can you elaborate on that? Are you talking about the DeviceType.UnknownBrowser
having a platform
of "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.
Yes, I'm sorry that comment was not as clear as I meant for it to be. "Unknown" is the only non proper noun so we could translate it.
this.toastService.showToast({ | ||
title: "", | ||
message: this.i18nService.t("errorOccurred"), | ||
variant: "warning", | ||
}); |
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.
❓ : can we change this to be a call to this.validationService.showError(error);
instead? As far as I know, that's the general recommendation for non-specific error handling.
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.
{ | ||
path: "device-management", | ||
component: DeviceManagementComponent, | ||
data: { titleId: "devices" }, | ||
}, |
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.
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.
🏅 Thank you for refactoring this to use abstract and actual methods instead of arrow functions.
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.
Excellent docs throughout. Thank you!
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.
Same comment as here: https://github.com/bitwarden/clients/pull/12455/files#r1894224023
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.
🏅 Thank you for adding this missing test suite!
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-1214?atlOrigin=eyJpIjoiOGUyMGIwODJmODQwNDlkMjlhZmFhZDYxNmVjN2EyZGEiLCJwIjoiaiJ9
📔 Objective
Adds a device management tab under settings -> security. Allows a user to manage the devices of their account by approving them, logging them out or deleting them.
📸 Screenshots
GMT20241220-201106_Clip_Alec.Rippberger.s.Clip.12_20_2024.mp4
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes