-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Improve the handling of “unsettling” profiles (a.k.a. Not Safe For Work) #2098
base: master
Are you sure you want to change the base?
Conversation
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.
- JavaScript isn't needed (and therefore shouldn't be used) to implement opting-in to view unsettling profiles.
- The CSS classes used to apply the blur effect can be generalized, i.e.
blur-3px
andblur-4px
instead ofpanel-blur
,repo-search-blur
andmini-user-blur
. - The
base.html
template isn't the right place to implement hiding unsettling profiles.profile-base.html
is more appropriate.
liberapay/constants.py
Outdated
('hide_giving', (_("Hide total giving from others."), False)), | ||
('hide_receiving', (_("Hide total receiving from others."), False)), | ||
('hide_from_search', (_("Hide this profile from search results on Liberapay."), True)), | ||
('profile_noindex', (_("Tell web search engines not to index this profile."), True)), | ||
('hide_from_lists', (_("Prevent this profile from being listed on Liberapay."), True)), | ||
('is_unsettling', (_("Mark this profile as unsettling"), True)), |
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 checkbox label is too terse, and its (lack of) punctuation isn't consistent with the other labels.
@@ -40,6 +40,7 @@ langs = participant.get_statement_langs() | |||
|
|||
show_income = not participant.hide_receiving and participant.accepts_tips | |||
|
|||
|
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 extraneous blank line should be removed.
{{ _( | ||
"{username} has a repository named {repo_name} in their {platform} account", | ||
"has a repository named {repo_name} in their {platform} account", | ||
username=('<a href="/{0}/">{0}</a>'|safe).format(owner.username), |
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.
If the username
variable isn't used in the string anymore, then it should be removed from the arguments passed to the translation function. However, the larger problem here is that this change assumes that the username is at the beginning of the sentence in every language. A cleaner solution would be to generate the possibly-blurred avatar+username box with a macro or block assignment, and pass it to the translation function in the username
argument.
…y.com into set-profile-unsettling
|
For issue #1965. Implements functionality that allows users to mark their profile as unsettling. These profiles are then blurred/hidden when viewed by other users. Users can only see the content of unsettling profiles after being warned the profile contains unsettling content and confirming that they still want to view the profile.