Group explicit overlay #2402
Summary
Closes #2402 Depends on engine!458
Added in overlay for mature groups.
Steps to test
Quick test:
Test logged in and logged out that the overlay shows appropriately for these two groups.
NSFW
https://feat-group-mature-filter-2402.minds.io/groups/profile/1072258408465305612/feed
Non nsfw
https://feat-group-mature-filter-2402.minds.io/groups/profile/1072258496726044686/feed
Thorough test:
- Make a new user (User A)
- With User A, make 2 groups. Call one
nsfw
and onenon-nsfw
. - Log out, and in as the Minds admin account.
- Mark the
nsfw
group as NSFW using the dropdown (remember to refresh if you don't see the option). - Refresh, it should show the overlay. - note down the URL
- Go to User A's channel, mark it as NSFW for Pornography / Nudity - note down the channel URL.
- Refresh the channel, you should see the explicit overlay.
- Switch it back, and refresh; you should not see the explicit overlay.
- Turn it back on and log out
- Check the channel, it should show overlay and should say that it is a channel.
- Check the group, it should also show overlay and should say that it is a group.
Estimated Regression Scope
This change affects the mature overlay in groups and on channels. In the worst circumstance, it could error out and cause issues showing the channel or group. It's also possible it could error out more subtly and show at inappropriate times (of-course I've definitely aimed for this NOT to happen).
- Resolved by Emiliano Balbuena
added 2 commits
changed the description
added scoped labels
- Developer
Feel free to use an existing user if Captcha is not working.
- Developer
Looks like I didn't push the updates to channel
added 24 commits
-
7c81e856...14445689 - 15 commits from branch
master
- dfb73b7d - (wip): Containerized live server (not live, yet)
- f0f5d529 - (feat): Front live server
- b246238e - (refactor): Separate SSR live server and compiler
- ba9aef3f - (feat): Change deploy url
- fe2f400d - (chore): Add nodemon to front packages
- e8cbdbc1 - Merge branch 'master' of gitlab.com:minds/front into feat/group-mature-filter-2402
- 796a1d06 - Merge branch 'goal/local-infra' of gitlab.com:minds/front into feat/group-mature-filter-2402
- 2897c3b8 - Merge branch 'master' of gitlab.com:minds/front into feat/group-mature-filter-2402
- 7f8d2e32 - Missing parts
Toggle commit list-
7c81e856...14445689 - 15 commits from branch
- Developer
@benhayward.ben We have merged in @edgebal 's changes. This has merge conflicts that need updating.
added 12 commits
-
7f8d2e32...745769a5 - 11 commits from branch
master
- f27e0f95 - Merge branch 'master' of gitlab.com:minds/front into feat/group-mature-filter-2402
-
7f8d2e32...745769a5 - 11 commits from branch
changed the description
changed the description
1 <div class="m-channel--explicit-overlay--container" *ngIf="!hidden"> 2 <div class="m-channel--explicit-overlay--content"> 3 <h3>This {{ type }} contains content that is NSFW</h3> - Developer
Let's pass this message as a whole on a translatable attribute. Check overlay.component.ts comment.
5 import { ConfigsService } from '../../services/configs.service'; 6 7 @Component({ 8 selector: 'm-explicit-overlay', 9 templateUrl: 'overlay.component.html', 10 }) 11 export class ExplicitOverlayComponent { 12 readonly siteUrl: string; 13 public hidden = true; 14 public _entity: any; 15 public type: string; 16 17 @Input() set entity(value: any) { 18 if (value) { 19 // change wording for entity label 20 this.type = value.type === 'user' ? 'channel' : value.type; - Developer
For i18n efforts, it will be way better if we pass the whole string via
@Input
binding, something like:@Input() message: string;
Usage:
<m-explicit-overlay [entity]="user" message="This channel contains NSFW etc etc" i18n-message></m-explicit-overlay>
Please, note the
i18n-message
attribute, which tells Angular that the attribute value is translatable.
added scoped label and automatically removed label