git-bars icon indicating copy to clipboard operation
git-bars copied to clipboard

different per day display

Open jgtoriginal opened this issue 2 years ago • 7 comments

Apologies if this is opinionated, if so just disregard. I just found it hard to read when using the day view. So I did the following updates to my fork.

  • added days with no commits on day view
  • added colour per day to make it easier to read.
  • group by week

jgtoriginal avatar May 25 '23 00:05 jgtoriginal

Thanks for the PR @jgtoriginal. Can you share a screenshot showing the changes?

knadh avatar May 26 '23 08:05 knadh

@knadh sure thing.

image

jgtoriginal avatar Jun 01 '23 10:06 jgtoriginal

Thanks @jgtoriginal. Adding empty days and grouping by weeks is nice. Those colours are ... wild though ^_^. We can put that behind an optional --colorize flag (and maybe apply the Dim constant in colorama).

knadh avatar Jun 02 '23 07:06 knadh

absolutely! will do!

On Fri, Jun 2, 2023, 8:10 AM Kailash Nadh @.***> wrote:

Thanks @jgtoriginal https://github.com/jgtoriginal. Adding empty days and grouping by weeks is nice. Those colours are ... wild though ^_^. We can put that behind an optional --colorize flag (and maybe apply the Dim constant in colorama).

— Reply to this email directly, view it on GitHub https://github.com/knadh/git-bars/pull/4#issuecomment-1573262081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANT4MDAYLZH37FWK6KSHO3XJGGVTANCNFSM6AAAAAAYOCI4SE . You are receiving this because you were mentioned.Message ID: @.***>

jgtoriginal avatar Jun 02 '23 13:06 jgtoriginal

It turns out that Style.BRIGHT works better than Style.DIM I can either leave it with bright, or just leave normal. But I think dim is not making the trick.

This is NORMAL image

This is BRIGHT image

This is DIM image

And this is without passing the --colorize option image

jgtoriginal avatar Jun 02 '23 14:06 jgtoriginal

Thanks @jgtoriginal. I was reviewing your PR locally and figured a few areas that could be refactored in the core to make your PR simpler.

Please check out the refactor branch.

  • Clean update date handling to use an actual datetime.datetime instead of strings from git logs.
  • Add semantic date backfilling to get_logs (this is optionally done via the new -f=true flag).
  • This returns a back-filled list of logs for the git date range from the source (get_logs()). This in turn back-fills all groupings: week, month, year, not just days. Your PR needn't back fill dates the print function anymore.

If this looks fine, please clone the refactor branch, apply your PR on it, and resend the PR to the refactor branch. Thank you once again!

knadh avatar Jun 03 '23 09:06 knadh

PS: The refactor branch is merged into master in case you're still working on this.

knadh avatar Aug 20 '23 04:08 knadh