gitgraph.js

πŸ‘‹ [Looking for maintainers] - A JavaScript library to draw pretty git graphs in the browser

MIT License

Downloads
11.7K
Stars
3K
Committers
53
gitgraph.js - Latest Release

Published by nicoespeon over 5 years ago

gitgraph.js - Fix arrow color on fork commits

Published by nicoespeon over 5 years ago

Thanks to @yappynoppy, arrow color is now the expected one for the first commit of the branch (#216).

Before:

Arrow color problem

After:

Arrow color is the correct one

gitgraph.js - Add commit object to the mouseEventOptions object

Published by nicoespeon almost 6 years ago

Thanks to @srangos, you now have access to the Commit object in mouse event callbacks.

For example:

gitGraph.canvas.addEventListener("commit:mouseover", function (event) {
  // event.data.commit represents the commit being hovered
});
gitgraph.js - Accept options.details HTMLElement in commit method

Published by nicoespeon almost 6 years ago

Thanks to @raul-benito you can now pass an HTMLElement in options.details for commit operations.

This way you can provide a workaround in contexts where document.getElementById is not working (e.g. shadow-dom in web components).

See https://github.com/nicoespeon/gitgraph.js/pull/211 for details.

gitgraph.js - Add a dot font option

Published by nicoespeon about 6 years ago

Thanks to @prudy, you can now specify a font for the dot text. Font defaults to commit message font.

See #201.

gitgraph.js - Text in commit dot

Published by nicoespeon over 6 years ago

Add the ability to put some text in the commit dot:

image

branch.commit({
  message: "Do something awesome",
  commitDotText: "A1"
});

See #196.

Thx @carlorivera πŸŽ‰

gitgraph.js - Fix arrow angle on branching

Published by nicoespeon about 7 years ago

Fix #159 with #171, credits to @yodalee πŸŽ‰ πŸ‘

gitgraph.js - Fix merge rendering with details

Published by nicoespeon over 7 years ago

See #166 (fixed by #168).

Thanks @csombok for fixing this one πŸŽ‰ πŸ‘

gitgraph.js - Fix tooltips on Firefox 53

Published by nicoespeon over 7 years ago

See #164, thanks @moore3071 for this one πŸ‘

Thanks also to @cardil for improving the gitflowsupport.html example βˆ’ see #163.

gitgraph.js - Fix arrows rendering for multiple branches from same commit

Published by nicoespeon over 7 years ago

See #140. Thanks to @yodalee for this one πŸ‘

gitgraph.js - Dashed-style commits

Published by nicoespeon over 7 years ago

See #139.

Now you can define a line dash to your commits and branches:

var gitGraph = new GitGraph();

var master = gitGraph.branch({
  name: "master",
  color: "#F00",
  lineDash: [5]
});

master.commit({
  lineDash: [3, 2],
  dotStrokeWidth: 5,
  message: "This commit stroke is dashed"
});

The lineDash option expects a list of segments to pass to CanvasRenderingContext2D.setLineDash(). These segments are numbers that specifies distances to alternately draw a line and a gap.

Finally, you can specify a lineDash value to the branch and commit options of your custom template.

gitgraph.js - Fix commit details position

Published by nicoespeon over 7 years ago

See #145.

Also includes:

  • add types definition to package.json
  • fix incorrect font height in labels and tags when graph is in a floating container (#155)
gitgraph.js - Add TypeScript Definitions

Published by nicoespeon over 7 years ago

GitGraph's TypeScript definitions are produced in a gitgraph.d.ts file, along the build.

See #150.

gitgraph.js - Configurable tooltips container

Published by nicoespeon over 7 years ago

You can specify a custom HTMLΒ element to contain tooltips displayed in compact mode:

var gitGraph = new GitGraph({
  template: "metro",
  tooltipContainer: document.querySelector("#tooltips"),
  mode: "compact"
});

If you don't provide a tooltipContainer, it will default to document.body.

See #147.

gitgraph.js - Fix horizontal tags alignment

Published by nicoespeon almost 8 years ago

See #132.

gitgraph.js - Display details in vertical-reverse mode

Published by nicoespeon almost 8 years ago

See #81.

gitgraph.js - Fix few quirks in complex graphs drawing

Published by nicoespeon almost 8 years ago

Little fixes to around edge cases for graph drawing (see #120).

gitgraph.js - Tag command & Horizontal labels rotation

Published by nicoespeon almost 8 years ago

#134 -> Thanks to @cgddrd, labels properly rotate in horizontal mode. You can provide a labelRotation configuration to your template too:

var graphConfig = new GitGraph.Template({
    branch: {
        color: "#000000",
        mergeStyle: "straight",
        labelRotation: 0 // -> can be configured
    },
});

var gitGraph = new GitGraph({
  template: graphConfig,
  mode: "extended",
  orientation: "horizontal"
});

#75 -> Now you can tag current HEAD with .tag( "my-tag" ). You can still pass tag options to the method:

var gitGraph = new GitGraph({ template: "metro" });

gitGraph
  .commit("Tag this commit")
  .tag("my-tag");

// alternatively
gitGraph
  .commit("Tag this commit")
  .tag({
    tag: "my-tag",
    tagColor: "green",
    tagFont: "normal 14pt Arial",
    displayTagBox: false
  });

#121 -> Fix rendering when parent branch has no commit.

gitgraph.js - Fix orphaned arrow head scenarios

Published by nicoespeon almost 8 years ago

Template blackarrow used to generate orphaned arrow head in some scenario (see #117).
Those are fixed now.

gitgraph.js - Allow to configure commit default options at branch level

Published by nicoespeon almost 8 years ago

Now you can do things like:

var dev = master.branch({
  name: "dev",
  color: "cyan",
  commitDefaultOptions: { color: "cyan" }
});

This will make your commits be cyan by default on dev branch.
It works for others commit options too.

Package Rankings
Top 23.48% on Repo1.maven.org
Top 1.84% on Npmjs.org
Top 5.01% on Bower.io
Badges
Extracted from project README
All Contributors MIT License lerna Join the chat at https://gitter.im/gitgraphjs/community