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 802
    • Issues 802
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 61
    • Merge Requests 61
  • 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
  • !221

Closed
Opened 3 months ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

WIP: [Sprint/X](bug): Default hashtags for mature channels

Closes https://gitlab.com/minds/front/issues/915

Mature channels were not automatically being flagged by default as NSFW.

I believe that a newer system has been put in using the user objects nsfw (arr) attribute; based on this I made an assumption that is_mature (bool) is the older systems way of handling this, and wrote a condition for it accordingly, marking the post as the last item other in the list. Without this previously marked channels would not be correctly marked as NSFW - but there was no way to distinguish why their channel is NSFW.

Tested it locally hard-coding


nsfw = [1, 2] 
is_mature = null;

and


nsfw = null
is_mature = true;

and both being null.

Edited 17 minutes ago by Ben Hayward

Check out, review, and merge locally

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

git fetch https://gitlab.com/benhayward.ben/front.git default-hashtags-for-mature-channels
git checkout -b benhayward.ben/front-default-hashtags-for-mature-channels FETCH_HEAD

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 benhayward.ben/front-default-hashtags-for-mature-channels

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 benhayward.ben:default-hashtags-for-mature-channels into master
  • Email patches
  • Plain diff
Pipeline #69965084 failed for 46818015 on benhayward.ben:default-hashtags-for-mature-channels
          Requires approval.

          Closed by Ben Hayward 13 minutes ago

          The changes were not merged into master

          Allows commits from members who can merge to the target branch

          Did not close #915

          Deletes source branch

          • Discussion 3
          • Commits 4
          • Pipelines 4
          • Changes 2
          0/2 threads resolved
          • Loading...
          • Ben Hayward @benhayward.ben changed the description 3 months ago

            changed the description

          • Ben Hayward @benhayward.ben added 1 commit 3 months ago

            added 1 commit

            • ec49e7de - Update nsfw-selector.component.ts

            Compare with previous version

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 3 months ago
            src/app/modules/newsfeed/poster/poster.component.html
            40 40 <ng-container *mIfFeature="'top-feeds'; else oldNSFW">
            41 41 <m-nsfw-selector
            42 42 (selected)="onNSWFSelections($event)"
            43 [user]="this.minds.user"
            • Mark Harding
              Mark Harding @markeharding · 3 months ago
              Owner

              this should not be used in the context of html

              Edited by Mark Harding 3 months ago
            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 3 months ago
            src/app/common/components/nsfw-selector/nsfw-selector.component.ts
            59 70 this.onSelected.next(reasons);
            60 71 }
            61 72
            73 /**
            74 * Toggles on all NSFW tags that the logged in user has on them -
            75 * if using the old system of is_mature sets the reason to other.
            76 */
            77 toggleDefaultNSFW(){
            78 let arr: any[] = (this.user && this.user.nsfw.length !== 0) ? this.user.nsfw
            79 : this.user.is_mature ? [this.service.reasons.length - 1]
            • Mark Harding
              Mark Harding @markeharding · 3 months ago
              Owner

              hard code to 6

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding · 3 months ago
            Owner

            We also require server side forcing

          • Mark Harding @markeharding added MR::Awaiting Review label 1 week ago

            added MR::Awaiting Review label

          • Ben Hayward @benhayward.ben added 345 commits 1 hour ago

            added 345 commits

            • ec49e7de...162992f9 - 344 commits from branch minds:master
            • 46818015 - Merge branch 'master' of gitlab.com:minds/front into default-hashtags-for-mature-channels

            Compare with previous version

          • Ben Hayward @benhayward.ben marked as a Work In Progress 1 hour ago

            marked as a Work In Progress

          • Ben Hayward @benhayward.ben unmarked as a Work In Progress 18 minutes ago

            unmarked as a Work In Progress

          • Ben Hayward @benhayward.ben marked as a Work In Progress 17 minutes ago

            marked as a Work In Progress

          • Ben Hayward @benhayward.ben closed 13 minutes ago

            closed

          • 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
          0 Assignees
          None
          Assign to
          None
          Milestone
          None
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          1
          Labels
          MR::Awaiting Review
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          2
          2 participants
          user avatar
          Ben Hayward
          user avatar
          Mark Harding
          Reference: minds/front!221