neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Reduce number of messages

Open Shatur opened this issue 2 years ago • 13 comments

Is your feature request related to a problem? Please describe. I would suggest to print less messages for the user. For example, message Commiting... or Couldn't commit with 2 other messages: изображение

Describe the solution you'd like I would remove the mentioned 2 messages to make the plugin less noisy.

Describe alternatives you've considered An option for it. Users also could filter some of the messages using noice.nvim, but it would be nice to have better defaults.

Shatur avatar Jul 31 '23 18:07 Shatur

I agree.

What do you think of the plans in https://github.com/NeogitOrg/neogit/issues/537

I'll be getting to it soon, this week has been absolutely packed on my end. Apologies for that

ten3roberts avatar Jul 31 '23 21:07 ten3roberts

What do you think of the plans in https://github.com/NeogitOrg/neogit/issues/537

Parsing git errors could be complicated... They also could be displayed in a different languages depending on user configuration. I would just reduce the number of messages to one with the actual git error.

I'll be getting to it soon, this week has been absolutely packed on my end. Apologies for that

No need to apologize, it's a FOSS project, take you time :)

Shatur avatar Jul 31 '23 22:07 Shatur

I would like to retain the option of having notification messages, although happy if they are disabled by default.

Update: It seems Astrocommunity config for neogit only shows notifications if nvim-notify is present (I am using noice), but setting disable_builtin_notifications = false, makes them appear again. Sorry for the confusion.

practicalli-johnny avatar Aug 01 '23 11:08 practicalli-johnny

I would like to retain the option of having notification messages,

Notifications are good. The problem is that some of them are redundant. Like "Commiting..." - you already see commit buffer on your screen. Same about "Commited!", you clearly can see it when you closed the buffer. The suggestion is to reduce the noise, not remove important messages.

Shatur avatar Aug 01 '23 12:08 Shatur

Agreed that some notifications would not be missed.

Notifications like push are valuable as otherwise it can seem like nothing has happened (without opening "Recent commits")

I also like the pushing to account/repo-name notification as I use specific alias names (--origin name), but could live without it :)

I guess there could be basic and verbose levels of notifications, but perhaps that is adding work for little value. Thank you.

practicalli-johnny avatar Aug 01 '23 13:08 practicalli-johnny

Exactly!

Shatur avatar Aug 01 '23 13:08 Shatur

Couple thoughts. First off, i agree that its overly verbose. I think a good solution would be to have a replacement mechanism, so instead of stacking notifications, they can replace each other, since you only really need the last one.

Second, having a built-in notification system predates vim.notify() and surrounding plugins. Removing the built-in system in favor of a more feature rich, "off the shelf" solution would probably provide a better UX, and reduce our codebase's size. https://github.com/rcarriga/nvim-notify being the choice

Anyone have thoughts on that idea? For/against

CKolkey avatar Aug 01 '23 13:08 CKolkey

I think a good solution would be to have a replacement mechanism

Replacements would be good. But I would consider them as a separate request. Because it won't help for "Commiting" and "Commited", for example. They just redundant. And users likely will have a bigger delay to make them replace each other.

Removing the built-in system

I agree with you. BTW, I was the one who submitted the replacement of the original notification system with vim.notify. But I was asked to make it compatible, see: https://github.com/NeogitOrg/neogit/pull/194

Shatur avatar Aug 01 '23 13:08 Shatur

I think a good solution would be to have a replacement mechanism

Replacements would be good. But I would consider them as a separate request. Because it won't help for "Commiting" and "Commited", for example. They just redundant. And users likely will have a bigger delay to make them replace each other.

Thats fair. It makes sense for fetch/push since your local state doesnt change, but for pull/commit/merge, you can observe if it worked. I can tune that pretty easily.

Removing the built-in system

I agree with you. BTW, I was the one who submitted the replacement of the original notification system with vim.notify. But I was asked to make it compatible, see: https://github.com/NeogitOrg/neogit/pull/194

Ah, I didnt realize. Thats from before I started working on this. If its something you're keen on doing, feel free to finish the job. I'm leaning into breaking changes for a little while while we clean/organize/update different parts of the plugin.

CKolkey avatar Aug 01 '23 13:08 CKolkey

It makes sense for fetch/push since your local state doesnt change, but for pull/commit/merge, you can observe if it worked. I can tune that pretty easily.

Yep! That's what this issue is about.

If its something you're keen on doing, feel free to finish the job. I'm leaning into breaking changes for a little while while we clean/organize/update different parts of the plugin.

Good plan. It's been two years since then, I think most people are using vim.notify now. But I currently busy with a different project.

Shatur avatar Aug 01 '23 15:08 Shatur

All good, I'll try to take care of it sooner than later.

CKolkey avatar Aug 01 '23 16:08 CKolkey

@CKolkey looks like you removed built-in notification system, great! Is there any chance that we can improve the situation with this issue now?

Shatur avatar Sep 24 '23 22:09 Shatur

Yup, I'll see about dealing with this soon :)

CKolkey avatar Sep 25 '23 09:09 CKolkey