git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitweb refactoring

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 22, 2006, 18:37 UTC
Message-ID
<e7eo1r$j87$1@sea.gmane.org>
In-Reply-To
<e7ed1r$9ve$1@sea.gmane.org>

Another approach to refactoring gitweb would be to look at it's output. Currently (with the exception of summary view), we have four main types of views:

1. 'short listing' view, using zebra tables, which list "objects", each with
some number of columns usually not hyperlinked, object name/title,
sometimes shortened, sometimes post-processed which is link to the object,
then some object related links. Actions using this type of view: shortlog,
history, tree, tags, heads, blame; files affected part of commit view.
Examples of columns:
  Age, Author, Title[*1*] (link), commit|commitdiff    for shortlog
  Mode, Filename (link), tree or blob|history          for tree
2. 'single object' view, with fixed number of blocks. Actions using this
type of view: commit, tag.
3. 'long listing' view, which list "object"; description of each object
takes more than one line. Actions using this type of view: log, search.
4. 'large object' view, in which "object", optionally with some header, is
written line by line, with some syntax highlighting, sometimes with line
numbering, with at least one div per line. Actions using this type of view:
blob, commitdiff, blobdiff. Currently diffs are not splitted into chunks at
the HTML level (chunks are not encompassed in div; perhaps they should,
perhaps not - HTML like header structure vs DocBook nesting).
5. 'other' non HTML output, including blob_plain, commitdiff_plain,
blobdiff_plain, rss, opml, git_logo; perhaps in the future commitdiff_email
(for git-am or sending to the list), snapshot (tar, tar.gz, tar.bz2),
git_favicon.
Some views have subviews of other type.
Page as whole consist of:
* page header (which includes searchbox, what is not obvious) with 
  breadcrumbs up to action, 
* two part navigation bar: 
  - first part is always single hash action listing
      summary | shortlog | log | commit | commitdiff | tree 
    with and exception of base (first) commit which doesn't have commitdiff.
  - second part is either "pager" for log and shortlog, i.e.
      HEAD . prev . next
    or "type selection" for commitdiff, blobdiff and blob, sometimes
    including head (why not HEAD?).
* sometimes empty title of current hash or hash_base (current commit),
  or empty and linking to summary page.
* path (filename) header for tree and blob
* body of the page
* page footer with project description, and RSS link.

[*1*] Processed and shortened title (first line of commit), tooltip using title attribute of link if shortened (gitweb-xmms2 broke that with ntroduction of committags), tags which references this commit shown (now only for summary I think, and tag(s) length is not taken into account when shortening title/oneline description)

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Jakub Narebski
Message 2 of 2 in “gitweb refactoring”
  1. Jakub NarebskiJun 22, 2006
  2. Jakub NarebskiJun 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.