-
-
Notifications
You must be signed in to change notification settings - Fork 270
Add log margin popup #1715
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
base: master
Are you sure you want to change the base?
Add log margin popup #1715
Conversation
Yeah, for the time being, actions seem like the correct way to build this. The auto-close thing is not always ideal - for a while it wasn't an issue, but this isn't the first time it's been a limitation on desirable behavior. Maybe I can do something about that. Overall this looks very reasonable to me! |
Okay, I think I figured out why the help popup test was failing. I also added a test spec for the margin popup. Hopefully we should be good now! |
Also had to change the help popup slightly: because columns are calculated dynamically, adding an entry for the margin popup changed the order of some of the existing entries.
OK, now we should be good. I think whatever was causing that branch popup test to fail was solved in one of the recent commits to master. Just did one last force push to get rid of an unintended merge commit. Thanks for bearing with me! |
Ah, no worries, I'm always happy when people contribute :) The branch popup test is a bit flakey, no worries there. I'll look at it some day.. maybe. 🤣 |
This is another attempt at adding author (and date) information to recent commits in the status buffer (#652), following #653 and #654.
What currently works:
I tried to follow Magit's default behavior as closely as I could. For the ISO-like date, I added a field to
lib/git/log.lua
to retrieve the commited date as a UNIX timestamp, which was then rendered in the local timezone. I think that should be fine, but if that introduces peformance concerns, or if there is a cleverer way to do this, I'm happy to change this.What doesn't work yet
Pretty much all of the other features. Most notably:
I wanted to put this out here for preliminary feedback, but I still need to write some tests before this is ready to merge. After that, I'm happy to work on the missing features, be that before or after merging this initial implementation (maybe after, judging by the discussion in #653?).
A question
I used popup actions to implement the three features above. This was the closest Neogit correlate I found to mimick Magit, but I'm wondering if I have this right.
I think what's tripping me up is that these features seem more like switches than actions proper (for instance, these "actions" don't spawn any new buffers or popups), so mayble internal switches would be better here. Actions also seem to always close the popup, whereas the margin popup stays open in Magit (though we may also opt not to follow Magit's behavior). I may be overthinking this, but it was something I thought I should check anyway.
Happy to hear any thoughts on this; this the first time I've worked on a Neovim plugin, so any feedback is much appeciated!