feature/add-git-timeline-renderer #863

Merged
prologic merged 2 commits from tkanos/yarn:feature/add-git-timeline-renderer into main 2 months ago
tkanos commented 2 months ago
  • In order to create a useless but cool git timeline view like (and refactor the code to be more expandable):
git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all

I did some Refactor : I remove the if else on the timeline.go, to create :

  • a timeline package to encapsulate the behavior
  • an interface "Parser" to handle the behavior (+ a factory "GetParser")
  • an interface "Printer" to handle the print.
  • an Unit Test to check gitparser.

For the current code I have just :

  • move to timeline folder
  • adapt some logic to fit on the new interface system
  • add some logic that git_parser needed (like more color and an hashaArray to change the color)

For Git_parser :

  • I sort twts to create a Daq (encapsulating twt)
  • I create my own printer (to handle the different markdown interpretation)

To test :

make build
./yarnc timeline --git
- In order to create a useless but cool git timeline view like (and refactor the code to be more expandable): ``` git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all ``` I did some Refactor : I remove the if else on the timeline.go, to create : - a timeline package to encapsulate the behavior - an interface "Parser" to handle the behavior (+ a factory "GetParser") - an interface "Printer" to handle the print. - an Unit Test to check gitparser. For the current code I have just : - move to timeline folder - adapt some logic to fit on the new interface system - add some logic that git_parser needed (like more color and an hashaArray to change the color) For Git_parser : - I sort twts to create a Daq (encapsulating twt) - I create my own printer (to handle the different markdown interpretation) To test : ``` make build ./yarnc timeline --git
tkanos added 2 commits 2 months ago
69270b8885 Add line color
Owner

Seems to work for me 😂 Whilst I don't like the output (it seems noisey to me, but that's just my opinion mostly becuase of my vision impairment!) I'll revoew the code changes here shortly and merge 👌

Seems to work for me 😂 Whilst I don't like the output (it seems noisey to me, but that's just my opinion mostly becuase of my vision impairment!) I'll revoew the code changes here shortly and merge 👌
Poster

Yep it's just geeky, but the most important here is the refactoring, to be able to handle many "parser" or "render", you name it.

I can remove the git part if you prefer (not married with it, even if I loved the tests I did)

The refactoring part is important for example, for the next PR, where easily i can add a new "parser" that is the -f option from tail.

Yep it's just geeky, but the most important here is the refactoring, to be able to handle many "parser" or "render", you name it. I can remove the git part if you prefer (not married with it, even if I loved the tests I did) The refactoring part is important for example, for the next PR, where easily i can add a new "parser" that is the -f option from tail.
Owner

I can remove the git part if you prefer (not married with it, even if I loved the tests I did)

@tkanos No, please lave it 😅 I will just focus on the refactoring, don't worry about my opinion per se on the UX of it, I'm sure it can be improved over time 👌

> I can remove the git part if you prefer (not married with it, even if I loved the tests I did) @tkanos No, please lave it 😅 I will just focus on the refactoring, don't worry about my opinion per se on the UX of it, I'm sure it _can_ be improved over time 👌
prologic approved these changes 2 months ago
prologic left a comment
Owner

LGTM 👌

LGTM 👌
prologic merged commit f647be900c into main 2 months ago
prologic deleted branch feature/add-git-timeline-renderer 2 months ago

Reviewers

prologic approved these changes 2 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as f647be900c.
Sign in to join this conversation.
Loading…
There is no content yet.