-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Move Application Passwords entry to user details #23834
base: trunk
Are you sure you want to change the base?
Conversation
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
List(viewModel.applicationTokens) { token in | ||
ApplicationTokenListItemView(item: token) | ||
ZStack { | ||
Color(.systemGroupedBackground) |
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.
(nit) this should not be needed as long as you are displaying the List
at the bottom. The ProgressView
could be shown as an .overlay
.
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 couldn't get it to work. Do you mind showing me an example?
Color(.systemGroupedBackground) | ||
.ignoresSafeArea() | ||
|
||
Group { |
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.
(nit) Group
seems redundant.
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.
Removed in 1b0daa0
List(viewModel.applicationTokens) { token in | ||
ApplicationTokenListItemView(item: token) | ||
} | ||
.listStyle(.insetGrouped) |
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.
(nit)I'd suggest using a .plain
list for plain lists. The same applies to the list of users. In the list of users, I'd display the current account and the top and add some sort of marker that it is.
@@ -3,6 +3,7 @@ import XCTest | |||
|
|||
@testable import WordPress | |||
|
|||
@MainActor |
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.
Actors support in XCTest has been a bit shaky. I'd suggest writing all new tests in swift-testing. It's pretty similar to XCTest https://developer.apple.com/documentation/testing/migratingfromxctest
@@ -58,14 +66,13 @@ class ApplicationTokenListViewModel: ObservableObject { | |||
@Published | |||
private(set) var applicationTokens: [ApplicationTokenItem] | |||
|
|||
private let dataProvider: ApplicationTokenListDataProvider! | |||
let dataProvider: ApplicationTokenListDataProvider! |
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.
Does it need a force unwrap?
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.
Good catch! Addressed in db61f33
If the site doesn't have a valid Application Token, every request just fails – there's no feedback or alerting. We should address that before this ships. I also noticed that User Management is still behind a feature flag – with this change, we should tie user management and application passwords together, because otherwise it's impossible to get at your application password list. |
Should admin users be able to see others' application passwords? |
This is an existing issue with account passwords too. There is no re-authentication flow, when account password is changed.
Not sure about if they should, but they can 😄 . On web, admin users can view, add, and revoke others application passwords. |
This is an alternative to #23819.
In #23819, application passwords are displayed in the user details view, like wp-admin. But I think @kean 's suggestion in #23819 (comment) makes more sense.
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: