gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Add notification when correctly copying hash commit

Open SergioRibera opened this issue 2 years ago • 2 comments

This Pull Request fixes/closes #1160.

It changes the following:

  • When copying the hash of a commit, it displays a confirmation dialog if it has been copied correctly

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

SergioRibera avatar Oct 04 '22 05:10 SergioRibera

I also ran into these usability issues with copying.

Maybe it would be useful to display the text that was copied in the notification?

Additionally, copying might fail (e.g. if both xclip and xsel are missing or if gitui is being run via ssh). The notification could report that failure instead when it happens. Maybe a good place to catch that error is at the call site of copy_commit_hash in commitlist.rs?

alexmaco avatar Oct 06 '22 09:10 alexmaco

I also ran into these usability issues with copying.

Maybe it would be useful to display the text that was copied in the notification?

Additionally, copying might fail (e.g. if both xclip and xsel are missing or if gitui is being run via ssh). The notification could report that failure instead when it happens. Maybe a good place to catch that error is at the call site of in ?copy_commit_hash``commitlist.rs

You are very right, I think it would be very useful to know what text is being copied, on the other hand I also agree with you, I think it is useful to show the error message if the copy fails, in that case I did nothing because I did not know what to do with that error, now I have an idea, so I will be making changes and will update the PR

SergioRibera avatar Oct 08 '22 06:10 SergioRibera

please rebase/squash so I can merge it

extrawurst avatar Oct 18 '22 11:10 extrawurst

oh and please fix clippy :)

extrawurst avatar Oct 18 '22 12:10 extrawurst

@extrawurst That's it, I fixed all the clippy and formatting errors in the project (I think it should go in another PR but the CI was not working due to some base errors)

Cries in CI/CD * image

If you need any changes, please let me know

SergioRibera avatar Oct 18 '22 23:10 SergioRibera

I am so sorry I only meant the changes for stable clippy, you are right the remaining stuff should and IS in another PR already: https://github.com/extrawurst/gitui/pull/1390

extrawurst avatar Oct 19 '22 08:10 extrawurst

https://github.com/extrawurst/gitui/pull/1390 is merged now, so please update with current master again

extrawurst avatar Oct 19 '22 11:10 extrawurst

@extrawurst Done, now a query please, what version of rust do you use?

SergioRibera avatar Oct 19 '22 22:10 SergioRibera

Please rebase again and resolve the conflicts so we can merge this

extrawurst avatar Oct 20 '22 14:10 extrawurst

please fix the clippy errors

extrawurst avatar Oct 24 '22 14:10 extrawurst

@extrawurst Done 😃

SergioRibera avatar Oct 25 '22 03:10 SergioRibera

Thanks for sticking at this!

extrawurst avatar Oct 26 '22 12:10 extrawurst