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 827
    • Issues 827
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 71
    • Merge Requests 71
  • 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 5 hours 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
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #67753368 passed for 9dc4d33a on refactor/es-feeds
    Requires 2 more approvals from Devs.
    Emiliano Balbuena
    Emiliano Balbuena
    Ben Hayward
    Ben Hayward
    Martin Santangelo
    Martin Santangelo
    Brian Hatchet
    Brian Hatchet
    Marcelo Rivera
    Marcelo Rivera
    Ready to be merged automatically. Ask someone with write access to this repository to merge this request
    • Discussion 5
    • Commits 3
    • Pipelines 3
    • Changes 12
    0/5 discussions resolved
    • Loading...
    • Mark Harding @markeharding mentioned in merge request engine!221 5 hours ago

      mentioned in merge request engine!221

    • Mark Harding @markeharding added 1 commit 2 hours 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 hour 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 hour 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 hour 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 hour 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 hour 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 hour 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.

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 1 hour 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 hour 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 hour 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 hour ago
        Maintainer

        These 12s should be defined as constants

      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
    None
    Assign to
    None
    Milestone
    None
    Assign milestone
    None
    Time tracking
    No estimate or time spent
    0
    Labels
    None
    Assign labels
    • View project labels
    Lock merge request
    Unlocked
    6
    6 participants
    user avatar
    Emiliano Balbuena
    user avatar
    Ben Hayward
    user avatar
    Martin Santangelo
    user avatar
    Brian Hatchet
    user avatar
    Marcelo Rivera
    user avatar
    Mark Harding
    Reference: minds/front!373