-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add ability to toggle the commits graph via env variable #110
base: master
Are you sure you want to change the base?
Conversation
@zdoc01 Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of making it possible to disable parts of the app. Also using environment-variables it probably the right way to do that.
What I did not like is the way the "buildBoxes" function works. If such a big rewrite is needed it also should generalize the handling of all the other boxes and not only one.
@@ -45,25 +45,25 @@ variables have been set correctly, you can print them in the terminal -- for exa | |||
|
|||
All the settings the dashboard looks at are in the sample file `sample.env`. This file isn't used by the dashboard, it just | |||
lists the environment variables that you can copy in your `rc` files: | |||
- `TTC_BOTS` are the 3 twitter bots to check, comma separated. The first entry | |||
- `TTC_BOTS` -- the 3 twitter bots to check, comma separated. The first entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this is that this changes makes it realy difficult to review your PR.
Pull request should ideally only taggle on feature or issue and should not make any changes to code that is not part of this change-set.
I like the new style. could you create a new PR that "fixes" the README please!?
@@ -102,6 +101,62 @@ function tick() { | |||
doTheCodes(); | |||
} | |||
|
|||
function buildBoxes(showCommitsGraph) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the buildBoxes
manages multibe boxes the funtion parameter should not be that specific.
I would recommend removing the parameter and just use the global config
internally.
Hey @notwaldorf! Thanks for taking the time to build and open source this awesome tool! I love it.
I tend to keep my terminal split into multiple panes, and I noticed the commits graph seems to have rendering issues when in smaller viewports, so I thought it would be helpful if I could easily hide it via environment variables (sort of aligns with #109). I do still like having the total number of commits easily visible for a given day and week, so I added them to the Today and Week box labels when the commits graph is hidden. Here's a quick look:
Before
After
The PR itself mostly just consists of introducing the new config value and adjusting the size of the boxes accordingly, as well as adding the total number of commits to the box labels.
Let me know what you think!