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

Add the ability to put some text in the commit bubble. (commitDotText) #196

Merged
merged 3 commits into from
Jul 9, 2018

Conversation

carlorivera
Copy link

Add ability to put some text in the commit bubble.
image

I'm using this to generate some docs and find it useful for referring to commits.

Copy link
Collaborator

@fabien0102 fabien0102 left a 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
Copy link
Collaborator

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) {
Copy link
Collaborator

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.

@@ -77,6 +77,7 @@ var commitConfig = {
dotStrokeWidth: 10,
messageHashDisplay: false,
messageAuthorDisplay: true,
messageShort: "C1",
Copy link
Owner

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?

Copy link
Author

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.

@carlorivera carlorivera changed the title Add the ability to put some text in the commit bubble. Add the ability to put some text in the commit bubble. (commitDotText) Jul 9, 2018
Copy link
Collaborator

@fabien0102 fabien0102 left a comment

Choose a reason for hiding this comment

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

Good for me 👌

@nicoespeon
Copy link
Owner

Good for me too. Merging it.
Thanks @carlorivera 👍

@nicoespeon nicoespeon merged commit bf7a583 into nicoespeon:develop Jul 9, 2018
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.

None yet

3 participants