Skip to content

Commit ff90c87

Browse files
authored
Improve 'Privacy' section in profile settings (#25309)
- Improve "Hide the activity from the profile page" label - E-Mail privacy icon in user profile now redirects to Privacy section - E-Mail privacy settings moved to Privacy section Previously, the user was redirected to the setting itself, however, that is not a good design choice because the setting itself would be at the very top of the user's browser window. This fix doesn't fix the problem entirely, but it is definitely an improvement compared to its previous iteration.
1 parent a55ff0d commit ff90c87

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

options/locale/locale_en-US.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ comment_type_group_project = Project
662662
comment_type_group_issue_ref = Issue reference
663663
saved_successfully = Your settings were saved successfully.
664664
privacy = Privacy
665-
keep_activity_private = Hide the activity from the profile page
665+
keep_activity_private = Hide Activity from profile page
666666
keep_activity_private_popup = Makes the activity visible only for you and the admins
667667

668668
lookup_avatar_by_mail = Look Up Avatar by Email Address

templates/user/profile.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<li>
3636
{{svg "octicon-mail"}}
3737
<a href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a>
38-
<a href="{{AppSubUrl}}/user/settings#keep-email-private">
38+
<a href="{{AppSubUrl}}/user/settings#privacy-user-settings">
3939
{{if .ShowUserEmail}}
4040
<i class="ui right" data-tooltip-content="{{.locale.Tr "user.email_visibility.limited"}}">
4141
{{svg "octicon-unlock"}}

templates/user/settings/profile.tmpl

+8-7
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
<label for="email">{{.locale.Tr "email"}}</label>
2626
<p>{{.SignedUser.Email}}</p>
2727
</div>
28-
<div class="inline field">
29-
<div class="ui checkbox" id="keep-email-private">
30-
<label data-tooltip-content="{{.locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
31-
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
32-
</div>
33-
</div>
3428
<div class="field {{if .Err_Description}}error{{end}}">
3529
<label for="description">{{$.locale.Tr "user.user_bio"}}</label>
3630
<textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}" maxlength="255">{{.SignedUser.Description}}</textarea>
@@ -47,7 +41,7 @@
4741
<div class="ui divider"></div>
4842
<!-- private block -->
4943

50-
<div class="field">
44+
<div class="field" id="privacy-user-settings">
5145
<label for="security-private"><strong>{{.locale.Tr "settings.privacy"}}</strong></label>
5246
</div>
5347

@@ -77,6 +71,13 @@
7771
</div>
7872
</div>
7973

74+
<div class="field">
75+
<div class="ui checkbox">
76+
<label data-tooltip-content="{{.locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
77+
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
78+
</div>
79+
</div>
80+
8081
<div class="field">
8182
<div class="ui checkbox" id="keep-activity-private">
8283
<label data-tooltip-content="{{.locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{.locale.Tr "settings.keep_activity_private"}}</strong></label>

0 commit comments

Comments
 (0)