-
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
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.78% 33.77% -0.02%
==========================================
Files 2912 2913 +1
Lines 90731 90806 +75
Branches 17159 17175 +16
==========================================
+ Hits 30654 30670 +16
- Misses 57688 57747 +59
Partials 2389 2389 ☔ 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.
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.
Ah ok that makes sense! 4bb0459
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.
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!
…known" platform correctly
@@ -0,0 +1,79 @@ | |||
<div class="tabbed-content"> |
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.
Question: Why tabbed-content
? Did you mean tabbed-header
? And why not use Tailwind?
And a slight UI adjustment: The header for the Devices table isn't quite formatted according to Figma. There should be a bit more spacing between the heading and subheading/paragraph text. (It also doesn't look the same as the headers in the other tabs: Master Password, Two-step login).
Figma
Current Implementation
<i | ||
class="bwi bwi-question-circle tw-flex tw-items-center tw-h-4 tw-w-4 bwi-color-primary" | ||
aria-hidden="true" | ||
></i> |
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.
Is there a corresponding link/popover text for this question mark icon?
*ngFor="let col of columnConfig" | ||
[class]="col.headerClass" | ||
bitCell | ||
[bitSortable]="col.sortable ? col.name : null" |
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.
🎟️ 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