feat(app): support expandable commit list and adjust default commit loading#138
Conversation
agavra
left a comment
There was a problem hiding this comment.
@saleemdjima the experience with this change is good, but the way it's implemented is a bit rigid. I'd like to be able to have "fetch more" actually fetch more instead of just hiding/showing 15 commits
src/app.rs
Outdated
| Err(TuicrError::NoChanges) => { | ||
| // No unstaged changes - try to get recent commits | ||
| let commits = vcs.get_recent_commits(5)?; | ||
| let commits = vcs.get_recent_commits(20)?; |
There was a problem hiding this comment.
I think it'd be nice not to have a limit and to allow continuing to hit "show more" to always shore more commits. if that's challenging to implement we can just fetch 100 and every time you hit "show more" we just show 10 more commits
There was a problem hiding this comment.
Thanks for the feedback! That makes sense. I agree that “fetch more” should actually fetch additional commits. I’ll rework this to support incremental loading.
|
This update introduces incremental commit loading along with viewport-based scrolling for the commit list. I added some constants :
Design decisionFully loading all commits would require changing the |
@saleemdjima I'm sorry to expand the scope of this but I'd rather we just implemented that in this PR, fetching 1000 commits always seems like overkill and I'd like this functionality to work across all of them (hg/jj/git) LMK if you don't have bandwidth to take that on and I can add it to my backlog. |
|
Ah ok, sorry I think I misunderstood earlier ! I'm updating the implementation and make it consistent across git / hg / jj in this PR. Thanks ! |
c75300e to
8da3cb5
Compare
agavra
left a comment
There was a problem hiding this comment.
This is great, thank you @saleemdjima for the contribution 🔥
This pull request resolves issues #129 and #39.
fixes #129
fixes #39
Changes
commit_expandedto track whether the commit list is expanded or not.Notes