gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Add a sort option popup to branch list view

Open UUGTech opened this issue 1 year ago β€’ 11 comments

This Pull Request fixes/closes #2129, #2024

It changes the following:

  • show last commit date and last commit author on branchlist popup.
  • make it possible to sort by branch name, last commit date, and last commit author.

I followed the checklist:

  • [ ] I added unittests
  • [x] I ran make check without errors
  • [x] I tested the overall application
  • [x] I added an appropriate item to the changelog
Screenshot 2024-03-22 at 19 48 35

https://github.com/extrawurst/gitui/assets/55311933/2d85c200-9746-46c7-9b28-c9568af14399

UUGTech avatar Mar 22 '24 12:03 UUGTech

Thanks for taking a go at this!

If you look at other popups like the options or search-in-log popup you will notice that the way we do these is: using the navigation cursors to pick an option instead of adding a bunch of new key bindings for each option uniquely. if you could convert this on to the same that would be awesome

extrawurst avatar Mar 22 '24 15:03 extrawurst

Thank you for pointing that out. Now, it works with navigation keys πŸ˜„

https://github.com/extrawurst/gitui/assets/55311933/e921cc8f-f017-49c2-b7d4-ee2e7c769da8

UUGTech avatar Mar 25 '24 04:03 UUGTech

@extrawurst Sorry for the delay πŸ™‡β€β™‚οΈ I updated according to your feedback and left some comments.

UUGTech avatar Apr 14 '24 07:04 UUGTech

@extrawurst Thank you for your review.

when sorting it should also keep the selection: right now it only keeps the same index selected which will mostly be a different branch when sorting changes.

Easier way to find new branch is required in #2129, also I think sorting is that kind of feature. I thought keeping the selection makes it difficult. πŸ€” I myself am not strongly attached to it, so If you still prefer to keep the selection, then I will do so.

the popup list entries should also not use a focused (bold) style, make it more in line with other popups (search, fuzzy find)

Thank you. I'll fix this.

UUGTech avatar Apr 14 '24 10:04 UUGTech

I myself am not strongly attached to it, so If you still prefer to keep the selection, then I will do so.

yes please. the use case you describe is better fixed by providing quick scroll-to-top/bottom shortcuts like we also have in the commit log list view

extrawurst avatar Apr 21 '24 16:04 extrawurst

Other popups are in a bold style Screenshot 2024-04-24 at 21 51 50

Which is better? not bold: Screenshot 2024-04-24 at 21 51 34 bold: Screenshot 2024-04-24 at 21 58 47

Currently, branch_sort popup is in bold style. This is same with other popups. If they should not be bold, I will fix all popups.

UUGTech avatar Apr 24 '24 13:04 UUGTech

the use case you describe is better fixed by providing quick scroll-to-top/bottom shortcuts like we also have in the commit log list view.

I made an issue for this.

UUGTech avatar Apr 24 '24 13:04 UUGTech

Other popups are in a bold style Screenshot 2024-04-24 at 21 51 50

Which is better? not bold: Screenshot 2024-04-24 at 21 51 34 bold: Screenshot 2024-04-24 at 21 58 47

Currently, branch_sort popup is in bold style. This is same with other popups. If they should not be bold, I will fix all popups.

Let’s go non bold and make only the selection bold

extrawurst avatar Apr 24 '24 14:04 extrawurst

updated the style of these popups

branch-sort popup

https://github.com/extrawurst/gitui/assets/55311933/233382d6-b6e3-46c1-98d9-479042be8c1c

logs-search popup

https://github.com/extrawurst/gitui/assets/55311933/97ff4991-9edd-4b14-b107-090bbc59ecb5

fuzzy-find popup

Screenshot 2024-05-01 at 12 25 34

UUGTech avatar May 01 '24 03:05 UUGTech