From: Jakub Narebski <jnareb@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Git Mailing List <git@vger.kernel.org>,
Jan Engelhardt <jengelh@computergmbh.de>
Subject: Re: RFD: Shipping GitBrowser.js for instaweb
Date: Mon, 3 May 2010 21:12:09 +0200 [thread overview]
Message-ID: <201005032112.10682.jnareb@gmail.com> (raw)
In-Reply-To: <4BDE81D8.8070505@drmicha.warpmail.net>
On Mon, 3 May 2010, Michael J Gruber wrote:
> Jakub Narebski venit, vidit, dixit 02.05.2010 22:14:
>> Michael J Gruber <git@drmicha.warpmail.net> writes:
>>
>>> I was wondering whether it would make sense to ship GitBrowser.js with
>>> Git and how much it would take to do so.
>>>
>>> My personal answer to the 1st Q is Yes: instaweb as well as simple
>>> gitweb installs would benefit from a graphical DAG viewer.
>>>
>>> About the required effort I have no clue: I find it difficult to see
>>> through which repo contains current gitweb, current repo.or.cz mods, and
>>> especially the GitBrowser integration bits. Maybe we could ship the
>>> integration bits without the actual GitBrowser if that is more feasible?
>>
>> The integration parts are actually present in gitweb, I think. It is
>> a matter of configuration to enable 'graphiclog' link like in
>> http://repo.or.cz
>>
>> GitBrowser.js is not, I think, the best solution for having graphical
>> history in gitweb, but would do...
>
> After having a more thorough look at it I agree... We don't want to
> inflate $GIT_DIR/gitweb more than necessary.
Especially that GitBrowser.js (git-browser) does drawing in *JavaScript*,
and requires (included) extra wz_jsgraphics.js JavaScript library
(Walter Zorn's High Performance JavaScript Graphics Library).
>
> But what are the alternatives? Something svg/canvas would be nice, I
> guess. The ruby frontends with graphlog don't convince me at all
> (neither performance-wise nor layout-wise).
1. Using SVG/canvas (probably with Flash as fallback for those web
browser that do not have support for canvas element and/or SVN)
seems like overkill for gitk / qgit / "git log --graph" equivalent
for gitweb... well, unless for something like interactive 'Network'
graph on GitHub, see e.g. http://github.com/jquery/jquery/network
2. Gitweb could generate required images on-the-fly using one of graphics
modules like GD (uses gd library), Imaginer, or Image::Imlib2 (uses
imlib2 library). GD is, I think, most commonly used and available.
We would want to make it conditional on GD (and gd library) being
available.
3. Gitweb could use some ready images, which would be composed to form
graphical representation of history; it would probably use CSS to
change color (and require support for opacity in CSS or transparent
layer in PNG). See also 4.
4. Gitweb could use Unicode characters for tree graphics like git-forest
(http://dev.medozas.de/gitweb.cgi?p=hxtools;a=blob_plain;f=bin/git-forest)
does (I think it uses box drawing characters U+2500-257F). We could
even borrow some code from git-forest, which is also in Perl
(by Jan Engelhardt).
5. Gitweb could use ASCII-art for drawing history, like "git log --graph"
does... perhaps even by directly using (and probably postprocessing)
git-log / git-rev-list output with the '--graph' option. It could
change (transform) ASCII-art to Unicode box drawing characters.
--
Jakub Narebski
Poland
prev parent reply other threads:[~2010-05-03 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 16:25 RFD: Shipping GitBrowser.js for instaweb Michael J Gruber
2010-05-02 20:14 ` Jakub Narebski
2010-05-03 7:57 ` Michael J Gruber
2010-05-03 19:12 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201005032112.10682.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=jengelh@computergmbh.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).