Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Trim long tasks name in the middle #16

Merged
merged 1 commit into from
Nov 28, 2013

Conversation

sorich87
Copy link
Contributor

Fix #13

@@ -39,7 +39,20 @@ module.exports = function (grunt) {
return Math.max(acc, row[0].length);
}, 0);

var maxBarWidth = (process.stdout.columns || 80) - (longestTaskName + 20);
var maxBarWidth = ((process.stdout.columns || 80) - 20) / 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think longestTaskName should still be used to figure out the remaining space for the graph, but the comparison for longestTaskName needs to be aware of the max length a task name can be considering it will be condensed if too long.

@dylang
Copy link
Contributor

dylang commented Nov 26, 2013

Nice work on this. I added some feedback.

@sorich87
Copy link
Contributor Author

@dylang I made changes

@dylang
Copy link
Contributor

dylang commented Nov 26, 2013

@sorich87 great work, the changes look good to me.

@sindresorhus I don't have further feedback.

sindresorhus added a commit that referenced this pull request Nov 28, 2013
Trim long tasks name in the middle
@sindresorhus sindresorhus merged commit 8534257 into sindresorhus:master Nov 28, 2013
@sindresorhus
Copy link
Owner

lgtm. nice work @sorich87 :)

and thanks for reviewing @dylang

@sorich87 sorich87 deleted the too-long-name branch November 29, 2013 04:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Percentage generates error for very long names
3 participants