Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Dependency List
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 808
    • Issues 808
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 53
    • Merge Requests 53
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds FrontendMinds Frontend
  • Merge Requests
  • !426

Open
Opened 1 week ago by Brian Hatchet@brianhatchet:speech_balloon:
  • Report abuse
Report abuse

(Feat) disable comments 526

Edited 1 week ago by Brian Hatchet

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feat/disable-comments-526 origin/feat/disable-comments-526

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff feat/disable-comments-526

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge feat/disable-comments-526 into master
The source branch is 11 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #71098359 passed for 5c29a195 on feat/disable-comments-526
          Requires 3 more approvals from Devs and Deployers.
          Mark Harding
          Mark Harding
          Ben Hayward
          Ben Hayward
          Marcelo Rivera
          Marcelo Rivera
          Martin Santangelo
          Martin Santangelo
          Emiliano Balbuena
          Emiliano Balbuena
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Deletes source branch

          • Discussion 12
          • Commits 23
          • Pipelines 7
          • Changes 24
          0/9 threads resolved
          • Loading...
          • Brian Hatchet :speech_balloon: @brianhatchet changed milestone to %sprint: Interesting Iguana 1 week ago

            changed milestone to %sprint: Interesting Iguana

          • Brian Hatchet :speech_balloon: @brianhatchet changed title from Feat/disable comments 526 to (Feat) disable comments 526 1 week ago

            changed title from Feat/disable comments 526 to (Feat) disable comments 526

          • Brian Hatchet :speech_balloon: @brianhatchet added 4 commits 1 week ago

            added 4 commits

            • b8f503ae...d7f9cc7d - 3 commits from branch master
            • e93b4129 - Merge remote-tracking branch 'upstream/master' into feat/disable-comments-526

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 1 week ago

            added 1 commit

            • 032dc9ae - fixing comment allowComment access leve

            Compare with previous version

          • Ben Hayward @benhayward.ben approved this merge request 6 days ago

            approved this merge request

          • Mark Harding @markeharding added MR::Awaiting Review label 6 days ago

            added MR::Awaiting Review label

          • Brian Hatchet :speech_balloon: @brianhatchet added 8 commits 6 days ago

            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

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 1 commit 5 days ago

            added 1 commit

            • 95ca222a - Adding 'allow-comments-toggle' feature. Setting featuresservice assumption to false

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 45 commits 5 days ago

            added 45 commits

            • 95ca222a...bda69088 - 44 commits from branch master
            • 48216571 - Merge remote-tracking branch 'origin/master' into feat/disable-comments-526

            Compare with previous version

          • Brian Hatchet :speech_balloon: @brianhatchet added 12 commits 1 day ago

            added 12 commits

            • 48216571...3fad9777 - 11 commits from branch master
            • 5c29a195 - Merge remote-tracking branch 'upstream/master' into feat/disable-comments-526

            Compare with previous version

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 23 hours ago
            src/app/modules/comments/comment/comment.component.html
            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"
            • Mark Harding
              Mark Harding @markeharding · 23 hours ago
              Owner

              Just wanted to double check we wanted to remove canEdit flag

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 23 hours ago
            Last updated by Emiliano Balbuena 17 hours ago
            src/app/modules/comments/comment/comment.component.ts
            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'];
            • Mark Harding
              Mark Harding @markeharding · 23 hours ago
              Owner

              q. should this be instantiated from the tree/thread level?

            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              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.

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 23 hours ago
            Last updated by Mark Harding 23 hours ago
            src/app/modules/legacy/components/buttons/comment.ts
            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"
            • Mark Harding
              Mark Harding @markeharding · 23 hours ago
              Owner

              async pipe?

            • Mark Harding
              Mark Harding @markeharding · 23 hours ago
              Owner

              ala *ngIf="!(allowComments$ | async)"

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 23 hours ago
            src/app/modules/legacy/components/buttons/comment.ts
            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) => {
            • Mark Harding
              Mark Harding @markeharding · 23 hours ago
              Owner

              could this be in the async pipe? then the component would not need to handle the subscription as angular would

            • Please register or sign in to reply
          • Emiliano Balbuena
            Emiliano Balbuena @edgebal started a thread on the diff 17 hours ago
            Last updated by Brian Hatchet 1 hour ago
            src/app/common/components/post-menu/post-menu.component.ts
            77 83 label: window.Minds.categories[category],
            78 84 });
            79 85 }
            86 console.log("Working!");
            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              Developer

              :eyes:

            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 1 hour ago
              Maintainer

              :face_palm:

            • Please register or sign in to reply
          • Emiliano Balbuena
            Emiliano Balbuena @edgebal started a thread on the diff 17 hours ago
            src/app/common/components/post-menu/post-menu.component.ts
            26 27 | 'subscribe'
            27 28 | 'unsubscribe'
            28 29 | 'rating'
            29 | 'block';
            30 | 'block'
            31 | 'allow-comments'
            32 | 'disable-comments';
            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              Developer

              disable-comments option is unneeded since you're just using allow-comments on the template.

            • Please register or sign in to reply
          • Emiliano Balbuena
            Emiliano Balbuena @edgebal started a thread on the diff 17 hours ago
            src/app/common/components/post-menu/post-menu.component.ts
            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');
            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              Developer

              I'm not really sure about this, if you look at the other examples, toggles are always part of the same "Option".

            • Please register or sign in to reply
          • Emiliano Balbuena
            Emiliano Balbuena @edgebal started a thread on the diff 17 hours ago
            src/app/modules/blogs/view/view.ts
            1 import { Component, ElementRef, ViewChild } from '@angular/core';
            1 import { Component, ElementRef, ViewChild, ChangeDetectorRef} from '@angular/core';
            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              Developer

              Space :D

            • Please register or sign in to reply
          • Emiliano Balbuena
            Emiliano Balbuena @edgebal started a thread on the diff 17 hours ago
            src/app/modules/blogs/view/view.ts
            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'];
            • Emiliano Balbuena
              Emiliano Balbuena @edgebal · 17 hours ago
              Developer

              Check my comment above re: toggles using the same option ID.

            • Please register or sign in to reply
          • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
          Please register or sign in to reply
          Assignee
          Brian Hatchet's avatar Brian Hatchet @brianhatchet
          Assign to
          sprint: Interesting Iguana
          Milestone
          sprint: Interesting Iguana
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          1
          Labels
          MR::Awaiting Review
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          6
          6 participants
          user avatar
          Mark Harding
          user avatar
          Ben Hayward
          user avatar
          Marcelo Rivera
          user avatar
          Martin Santangelo
          user avatar
          Emiliano Balbuena
          user avatar
          Brian Hatchet
          Reference: minds/front!426