Skip to content

add sorting of the channel and history lists #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2020

Conversation

jamaljsr
Copy link
Member

Closed #86

This PR adds the ability to manually sort the channel and history lists by clicking on the column headers.

Steps to Test

  1. Go to the Terminal page
  2. Click on the column headers (click twice on the same header to change the direction)
  3. Confirm the channels are sorting in the correct order
  4. Go to the Loop History page
  5. Clicking on the column headers
  6. Confirm the loops are sorting in the correct order

@jamaljsr jamaljsr requested a review from guggero August 21, 2020 22:47
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 💯
I really like the idea of the "reset sorting" icon on the main page. Any reason not to add it to the loop history page as well?

@jamaljsr
Copy link
Member Author

Any reason not to add it to the loop history page as well?

The only reason I added the "reset sorting" icon is because the channel list is initially sorted by the Balance Mode defined in Settings and this column has no header to click. If the user sorts manually, they need a way to get back to the original Balance Mode sorting. I initially added a header to this column, but I didn't like the way it looked. So I added this icon instead.

The Loop history list is sorted by Update Date by default, which does have a column header. So the user can easily revert to this sorting method by clicking on the header if they choose to do so.

Hope that makes sense.

@guggero
Copy link
Member

guggero commented Aug 24, 2020

Ah, makes sense, thanks!

@jamaljsr jamaljsr merged commit 75f0c83 into lightninglabs:master Sep 7, 2020
@jamaljsr jamaljsr deleted the sorting branch September 7, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manual sorting of the channel/history lists
2 participants