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 797
    • Issues 797
    • 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
  • !373

Open
Opened 1 week ago by Mark Harding@markeharding0 of 2 tasks completed0/2 tasks
  • Report abuse
Report abuse

Refactor/es feeds

TODO:

  • Re-introduce block client side
  • Re-synchronise entities in the background

Check out, review, and merge locally

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

git fetch origin
git checkout -b refactor/es-feeds origin/refactor/es-feeds

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 refactor/es-feeds

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 refactor/es-feeds into master
The source branch is 45 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #69090199 failed for 02710e34 on refactor/es-feeds
    Requires 2 more approvals from Devs.
    Brian Hatchet
    Brian Hatchet
    Marcelo Rivera
    Marcelo Rivera
    Emiliano Balbuena
    Emiliano Balbuena
    Martin Santangelo
    Martin Santangelo
    Ben Hayward
    Ben Hayward
    Ready to be merged automatically. Ask someone with write access to this repository to merge this request
    • Discussion 6
    • Commits 6
    • Pipelines 6
    • Changes 24
    0/5 discussions resolved
    • Loading...
    • Mark Harding @markeharding mentioned in merge request engine!221 1 week ago

      mentioned in merge request engine!221

    • Mark Harding @markeharding added 1 commit 1 week ago

      added 1 commit

      • 9dc4d33a - (fix): use combineLatest to ensure obversables are in sync for hasMore

      Compare with previous version

    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 week ago
      src/app/modules/channels/sorted/sorted.component.html
      21 21
      22 22 <ng-container *ngIf="['images', 'videos'].indexOf(type) > -1; else entityListView">
      23 23 <m-newsfeed__tiles
      24 [entities]="getAllEntities()"
      24 [entities]="feedsService.feed | async"
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
        Maintainer

        Yaaaay! Asyc pipes <3

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 week ago
      src/app/common/services/feeds.service.ts
      96 this.params.sync = 1;
      97 }
      98 return this;
      99 }
      69 100
      70 // Garbage collection
      101 setOffset(offset: number): FeedsService {
      102 this.offset.next(offset);
      103 return this;
      104 }
      71 105
      72 this.feedsSync.gc();
      73 setTimeout(() => this.feedsSync.gc(), 15 * 60 * 1000); // Every 15 minutes
      106 fetch(): FeedsService {
      107 this.inProgress.next(true);
      108 this.client.get(this.endpoint, {...this.params, ...{ limit: 150 }}) // Over 12 scrolls
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
        Maintainer

        Hissssssssss, I hate the spread operator so much. Your call if we use it, but I find it impossible to keep track of what objects we're mapping.

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 week ago
      Last updated by Mark Harding 8 minutes ago
      src/app/common/services/feeds.service.ts
      123 clear(): FeedsService {
      124 this.offset.next(0);
      125 this.inProgress.next(true);
      126 this.rawFeed.next([]);
      127 return this;
      128 }
      81 129
      82 return {
      83 entities,
      84 next,
      85 }
      86 } catch (e) {
      87 console.error('FeedsService.get', e);
      88 throw e;
      89 }
      130 hydrateEntities(): FeedsService {
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
        Maintainer

        Aren't we already hydrating entities in this corresponding MR. engine!221

        I'd expect this to return an array of hydrated entities, but this looks like it's returning the service itself.

      • Mark Harding
        Mark Harding @markeharding · 8 minutes ago
        Owner

        Yes this function isn't actually used

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 week ago
      src/app/modules/channels/sorted/sorted.component.ts
      14 14 import { PosterComponent } from "../../newsfeed/poster/poster.component";
      15 15 import { SortedService } from "./sorted.service";
      16 16 import { ClientMetaService } from "../../../common/services/client-meta.service";
      17 import { Observable } from "rxjs";
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
        Maintainer

        Added this, but it doesn't look like we're using it? Or is it necessary to use async pipes in the template?

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 week ago
      src/app/modules/groups/profile/feed/sorted.component.ts
      125
      126 if (this.entities && !refresh) {
      127 this.entities.push(...entities);
      128 } else {
      129 this.entities = entities;
      130 }
      131
      132 if (!next) {
      133 this.moreData = false;
      134 }
      135
      136 this.offset = next;
      94
      95 this.feedsService
      96 .setEndpoint(`api/v2/feeds/container/${this.group.guid}/${this.type}`)
      97 .setLimit(12)
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
        Maintainer

        These 12s should be defined as constants

      Please register or sign in to reply
    • Mark Harding @markeharding added 1 commit 1 week ago

      added 1 commit

      • 94ed6cc6 - (refactor): re-implement boost and block

      Compare with previous version

    • Mark Harding @markeharding added 1 commit 1 week ago

      added 1 commit

      • 6b663682 - (chore): use maps for object

      Compare with previous version

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

      added MR::Awaiting Review label

    • Mark Harding @markeharding added 1 commit 1 day ago

      added 1 commit

      • 02710e34 - (fix): spacing

      Compare with previous version

    • 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
    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
    6
    6 participants
    user avatar
    Brian Hatchet
    user avatar
    Marcelo Rivera
    user avatar
    Emiliano Balbuena
    user avatar
    Martin Santangelo
    user avatar
    Ben Hayward
    user avatar
    Mark Harding
    Reference: minds/front!373