changed milestone to %sprint: Interesting Iguana
changed title from Feat/disable comments 526 to (Feat) disable comments 526
added 4 commits
- b8f503ae...d7f9cc7d - 3 commits from branch
master
- e93b4129 - Merge remote-tracking branch 'upstream/master' into feat/disable-comments-526
- b8f503ae...d7f9cc7d - 3 commits from branch
approved this merge request
added MR::Awaiting Review label
added 8 commits
- 032dc9ae...12a0ab82 - 6 commits from branch
master
- b3689ba5 - Merge branch 'master' of gitlab.com:minds/front
- 4b51976e - Merge branch 'master' into feat/disable-comments-526
- 032dc9ae...12a0ab82 - 6 commits from branch
added 1 commit
- 95ca222a - Adding 'allow-comments-toggle' feature. Setting featuresservice assumption to false
added 45 commits
- 95ca222a...bda69088 - 44 commits from branch
master
- 48216571 - Merge remote-tracking branch 'origin/master' into feat/disable-comments-526
- 95ca222a...bda69088 - 44 commits from branch
added 12 commits
- 48216571...3fad9777 - 11 commits from branch
master
- 5c29a195 - Merge remote-tracking branch 'upstream/master' into feat/disable-comments-526
- 48216571...3fad9777 - 11 commits from branch
42 42 43 43 <ul class="m-comment__ribbon" [hidden]="!toggle.value" #toggle> 44 44 <li class="m-commentRibbon__item" 45 *ngIf="comment.owner_guid == session.getLoggedInUser()?.guid || session.isAdmin() || canEdit" - Owner
Just wanted to double check we wanted to remove canEdit flag
- Last updated by Emiliano Balbuena
87 94 private overlayModal: OverlayModalService, 88 95 private cd: ChangeDetectorRef, 89 96 private timeDiffService: TimeDiffService, 90 private el: ElementRef 97 private el: ElementRef, 98 protected activityService: ActivityService 91 99 ) {} 92 100 93 101 ngOnInit() { 94 102 this.commentAge$ = this.timeDiffService.source.pipe(map(secondsElapsed => { 95 103 return (this.comment.time_created - secondsElapsed * 0.01) * 1000; 96 104 })); 105 this.canReply = this.entity['allow_comments']; - Owner
q. should this be instantiated from the tree/thread level?
- Developer
Adhering to Mark's question here. Remember that, if you don't want to be passing the property through the whole tree, you can also use a shared just-for-state @Injectable() service using
providers: []
on the top level component (the comments list container), and injecting it on the constructor() part of the children components.
- Last updated by Mark Harding
8 10 changeDetection: ChangeDetectionStrategy.OnPush, 9 11 template: ` 10 12 <a [ngClass]="{'selected': object['comments:count'] > 0 }"> 11 <i class="material-icons">chat_bubble</i> 13 <i class="material-icons" *ngIf="allowComments">chat_bubble</i> 14 <i class="material-icons" 15 *ngIf="!allowComments" - Owner
async pipe?
- Owner
ala
*ngIf="!(allowComments$ | async)"
25 export class CommentButton implements OnInit, OnDestroy { 18 26 19 27 object; 28 protected activityChangedSubscription: Subscription; 29 public allowComments = true; 20 30 21 constructor(public client : Client) { 31 constructor( 32 public client: Client, 33 protected activityService: ActivityService, 34 protected cd: ChangeDetectorRef) { 22 35 } 23 36 24 set _object(value : any){ 37 ngOnInit() { 38 this.activityChangedSubscription = this.activityService.activityChanged.subscribe((payload) => { - Owner
could this be in the async pipe? then the component would not need to handle the subscription as angular would
- Last updated by Brian Hatchet
77 83 label: window.Minds.categories[category], 78 84 }); 79 85 } 86 console.log("Working!"); - Developer
- Maintainer
26 27 | 'subscribe' 27 28 | 'unsubscribe' 28 29 | 'rating' 29 | 'block'; 30 | 'block' 31 | 'allow-comments' 32 | 'disable-comments'; - Developer
disable-comments
option is unneeded since you're just usingallow-comments
on the template.
329 336 this.entity.nsfw = nsfw; 330 337 } 331 338 339 onAllowCommentsSelected(areAllowed: boolean) { 340 this.entity.allow_comments = areAllowed; 341 this.selectOption(areAllowed ? 'allow-comments' : 'disable-comments'); - Developer
I'm not really sure about this, if you look at the other examples, toggles are always part of the same "Option".
40 43 41 44 scroll_listener; 42 45 43 menuOptions: Array<string> = ['edit', 'follow', 'feature', 'delete', 'report', 'subscribe', 'set-explicit', 'remove-explicit', 'rating']; 46 menuOptions: Array<string> = ['edit', 'follow', 'feature', 47 'delete', 'report', 'subscribe', 48 'set-explicit', 'remove-explicit', 'rating', 49 'allow-comments', 'disable-comments']; - Developer
Check my comment above re: toggles using the same option ID.