Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

feat(repositories): #1533 repositories will show in descending order #1537

Closed
wants to merge 2 commits into from

Conversation

webkhushboo
Copy link
Contributor

closes #1533

Notes

A summary of what was achieved in this PR

  • Show the repository in descending order

@eddiejaoude eddiejaoude changed the title Issue 1533 feat(repositories): #1533 repositories will show in descending order Sep 26, 2019
'repositories',
(ref: firebase.firestore.Query) => ref
.orderBy('updatedOn', 'desc')
).doc<IRepository>(uid).valueChanges()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is finding a single repository, ordering it doesn't make sense when there is only always 1 result?

I think we need to sort it here

    <div class="repository" *ngFor="let uid of project.repositories">
      <dashboard-repository [uid]="uid" [isAdmin]="isAdmin()"></dashboard-repository>
    </div>

https://github.com/DashboardHub/PipelineDashboard/blob/v0.11.9/web/src/app/projects/view/view.component.html#L75

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here only uid of repositories are coming so we can't sort it here . Here we are just passing the uid of repository and showing it using another component.
Either We need all repositories with the updatedOn date too or we have to create function to fetch all repositories then sort the uid and pass them here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can sort with a pipe on the array? https://angular.io/guide/pipes#custom-pipes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we are not getting the updatedOn field in the array . How we will sort ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that is a problem 😂🤦‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this one needs some thought. May be we can update the array to be an array of objects with uid and updatedAt dates? I am not sure the knock on effect though, so would need looking into further

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets park this ticket for now, I moved to blocked column as its not urgent

@eddiejaoude
Copy link
Contributor

Closing PR as the work is not simple and requires more data available

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order project repos by last updated date
2 participants