-
Notifications
You must be signed in to change notification settings - Fork 369
Add the ability to put some text in the commit bubble. (commitDotText) #196
Conversation
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.
Looks nice, thanks for this update 👍 Just few comments and it's good for me 😉
(I also add this feature to the v2.0.0 roadmap)
src/gitgraph.js
Outdated
@@ -1053,6 +1053,7 @@ | |||
* @param {number[]} [options.lineDash = this.template.commit.dot.lineDash] | |||
* | |||
* @param {string} [options.message = "He doesn't like George Michael! Boooo!"] - Commit message | |||
* @param {string} [options.message] - short commit message (A few chars) to appear on the commit dot |
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.
Bad copy/past here, this should be [options.messageShort]
😉
src/gitgraph.js
Outdated
@@ -1205,6 +1207,19 @@ | |||
} | |||
} | |||
|
|||
if (this.messageShort !== undefined) { |
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.
You can write if (this.messageShort)
here, to be consistant with the actual code style.
examples/index.js
Outdated
@@ -77,6 +77,7 @@ var commitConfig = { | |||
dotStrokeWidth: 10, | |||
messageHashDisplay: false, | |||
messageAuthorDisplay: true, | |||
messageShort: "C1", |
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 don't think messageShort
is explicit enough for people without context.
What do you think about something like commitDotText
? Something else?
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.
Great idea. I'll update.
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.
Good for me 👌
Good for me too. Merging it. |
Add ability to put some text in the commit bubble.
![image](https://user-images.githubusercontent.com/1269679/42344482-78786a8e-806a-11e8-910a-c8228363079a.png)
I'm using this to generate some docs and find it useful for referring to commits.