Rework user profile settings
Accessibility: - improved semantic layout - Fixes unlabelled input for custom pronouns. CC @hazy - Adds labels to dropdowns. - Shortens certain texts for less verbose screen reader outputs and people with slow reading speed. - Turned optional username rename helper text with low contrast into "normal" help text. UI/UX: - Removes section about primary email which is no longer managed in the profile section. - Fixes section about primary email not displaying in user settings when notifications are not available. - Removes primary email display, because it is not actually a form element here. (Alternatively, we could display it and link to the account settings for managing the email)
This commit is contained in:
parent
de4053db83
commit
2885ea8da2
11 changed files with 195 additions and 174 deletions
|
@ -42,25 +42,16 @@ func TestUserProfileActivity(t *testing.T) {
|
|||
|
||||
// Verify the hint for all types of users: admin, self, guest
|
||||
testUser2ActivityVisibility(t, userAdmin, "This activity is visible to everyone, but as an administrator you can also see interactions in private spaces.", true)
|
||||
hintLink := testUser2ActivityVisibility(t, userRegular, "Your activity is visible to everyone, except for interactions in private spaces. Configure.", true)
|
||||
testUser2ActivityVisibility(t, userRegular, "Your activity is visible to everyone, except for interactions in private spaces. Configure.", true)
|
||||
testUser2ActivityVisibility(t, userGuest, "", true)
|
||||
|
||||
// When viewing own profile, the user is offered to configure activity visibility. Verify that the link is correct and works, also check that it links back to the activity tab.
|
||||
linkCorrect := assert.EqualValues(t, "/user/settings#keep-activity-private", hintLink)
|
||||
if linkCorrect {
|
||||
page := NewHTMLParser(t, userRegular.MakeRequest(t, NewRequest(t, "GET", hintLink), http.StatusOK).Body)
|
||||
activityLink, exists := page.Find(".field:has(.checkbox#keep-activity-private) .help a").Attr("href")
|
||||
assert.True(t, exists)
|
||||
assert.EqualValues(t, "/user2?tab=activity", activityLink)
|
||||
}
|
||||
|
||||
// = Private profile, but public activity =
|
||||
|
||||
// Set profile visibility of user2 to private
|
||||
testChangeUserProfileVisibility(t, userRegular, structs.VisibleTypePrivate)
|
||||
|
||||
// When profile activity is configured as public, but the profile is private, tell the user about this and link to visibility settings.
|
||||
hintLink = testUser2ActivityVisibility(t, userRegular, "Your activity is only visible to you and the instance administrators because your profile is private. Configure.", true)
|
||||
hintLink := testUser2ActivityVisibility(t, userRegular, "Your activity is only visible to you and the instance administrators because your profile is private. Configure.", true)
|
||||
assert.EqualValues(t, "/user/settings#visibility-setting", hintLink)
|
||||
|
||||
// When the profile is private, tell the admin about this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue