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

Re: [PATCH 4/5] gitweb: Selecting diffs in JavaScript

From
Petr Baudis <pasky@suse.cz>
Date
Aug 26, 2007, 17:21 UTC
Message-ID
<20070826172129.GK1219@pasky.or.cz>
In-Reply-To
<20070826161701.GA3300@auto.tuwien.ac.at>
On Sun, Aug 26, 2007 at 06:17:01PM CEST, Martin Koegler wrote:
> http://repo.or.cz/w/git/repo.git?a=search&h=HEAD&st=grep&s=GitAddLinks
> reveals, that the function GitAddLinks is never called.
> You should add a call to GitAddLinks in fixBlameLinks or call
> both functions in <body onload="...">.

Whoops, sorry - I already had that in, but must have accidentally removed it again.

Show 7 quoted lines
> > One thing for certain is that I would get rid of GitAddLinks and instead
> > have href() add the extra links there, by default display: none and
> > javascript code making it show.
> 
> display: none will only work in CSS capable browses, but not text
> browsers. Also why do we want do increase the size of each generated
> page?

These are both good points. The only thing I'm worried about is browser performance; at least my Firefox can take noticeable few hundreds of milliseconds to insert the links to only moderately sized pages.

Show 7 quoted lines
> > Also, there are obvious UI bugs, like
> > commit and tree entries for commits having redundant base/diff links;
> 
> Is this really a bug? I think it makes the interface more consistent.
> 
> Would it be clear for a (new) user, why some tree entries have the
> base/diff links and some not?

My aim is rather to have every single _entry_ to have a single base/diff linkpair. Having two linkpairs seems more confusing to me.

Show 8 quoted lines
> > But maybe it needs more general overhaul and the links added explicitly
> > in the views, because it really makes sense to have only a single
> > linkpair per entry and it would be good to have this always at the same
> > place, and perhaps in a different color. Hmm. And it seems that it's
> > getting in the way, overally.
> 
> Unless this should be come part of the official gitweb, adding each
> link explicitly would be a maintaince nightmare.

This should become part of the official gitweb, what's the point otherwise. :-)

Show 14 quoted lines
> Changing the color of the base/diff links is no problem. If somebody
> is interessed in this (and tells me, which colors I should use), I can
> adapt my patch.
>
> > What about having another item in the main action menu, 'diff'?
> > Base/diff links are by default display: none but show up when you click
> > at 'diff', in green. They will keep showing up until you click 'diff'
> > again. When you click 'base', both the selected base link and main
> > 'diff' link changes color to red.
> 
> We could call GitAddLinks, if the user clicks on the diff link instead
> of calling GitAddLinks at page load time.
> 
> I could rewrite the JavaScript for this, if you think it is so more useful.
That would be awesome.
-- 
				Petr "Pasky" Baudis
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett
Previous: Martin Koegler
Message 8 of 8 in “gitweb: Support comparing blobs with different names”
  1. 1/5 gitweb: Support comparing blobs with different namesMartin Koegler, May 20, 2007
  2. 2/5 gitweb: support filename prefix in git_patchset_body/git_difftree_bodyMartin Koegler, May 20, 2007
  3. 3/5 gitweb: Add treediff viewMartin Koegler, May 20, 2007
  4. 4/5 gitweb: Selecting diffs in JavaScriptMartin Koegler, May 20, 2007
  5. 5/5 gitweb: Incremental blameMartin Koegler, May 20, 2007
  6. Petr BaudisAug 26, 2007
  7. Martin KoeglerAug 26, 2007
  8. Petr BaudisAug 26, 2007

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.