[PATCH RESEND] hgweb: add a "URL breadcrumb" to the index and repository pages

Angel Ezquerra angel.ezquerra at gmail.com
Thu Dec 20 18:51:29 CST 2012


On Fri, Dec 21, 2012 at 1:38 AM, Angel Ezquerra
<angel.ezquerra at gmail.com> wrote:
> On Fri, Dec 21, 2012 at 12:48 AM, Matt Mackall <mpm at selenic.com> wrote:
>> On Thu, 2012-12-20 at 22:50 +0100, Angel Ezquerra wrote:
>>> # HG changeset patch
>>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>>> # Date 1354130486 -3600
>>> # Node ID f89c9a7e95ffd5a06e104f39ea568a85d7d50fcd
>>> # Parent  47026c725b27b7fdd25eaada7f079235ba2e6694
>>> hgweb: add a "URL breadcrumb" to the index and repository pages
>>
>> Again, a plea to expose a public server that reviewers can look at
>> rather than downloading and applying your patch, figuring out how to
>> configuring a one-off multi-repo hgweb config, and then testing.
>> Otherwise, only a very motivated reviewer will ever get around to
>> looking at it.
>
> I wish I could do so but I don't have access to any public server were
> I could place my demo web server.
>
> If anybody wants to give this a test I suggest using the following
> web.conf file:
>
> ˜˜˜
> [web]
> style = monoblue
> collapse = true
>
> [paths]
>
> test/hg = PATH_TO_THE_HG_REPO
> test/hg2 = PATH_TO_THE_HG_REPO
> test/test2/hg = PATH_TO_THE_HG_REPO
> test/test2/test3/hg2 = PATH_TO_THE_HG_REPO
> ˜˜˜
>
> And starting the server with:
>
> hg serve --web-conf web.conf
>
>
>>> The purpose of this change is to make it much easier to navigate up the
>>> repository tree when the hg web server is used to serve more than one
>>> repository.
>>>
>>> A "URL breadcrumb" is a path where each of the path items can be clicked to go
>>> to the corresponding path page.
>>>
>>> This lets you go up the folder hierarchy very quickly. For example, when showing
>>> the list of repositories in http://myserver/myteams/myprojects, the following
>>> "breadcrumb" will be shown:
>>>
>>> > myteams > myprojects
>>
>> Earlier, I wrote:
>>
>>         I actually think it would be better to present it as:
>>
>>         Mercurial > foo > bar
>>
>>         with link styling.
>>
>>         http://mercurial.markmail.org/thread/eolhlwpsbumup4r3
>>
>> What I get:
>>
>> Mercurial Repositories : > foo > bar
>>
>> without link styling (ie it all looks like inert non-clickable text).
>> The first '>' is a link (??) but I don't know why I'd ever think to
>> click on a separator. Also there's an emoticon in there for some reason.
>
> It took me a while to understand what you meant by emoticon! Now I see
> what you mean. It does indeed look a bit weird once you notice.
>
>> So, to be more precise, I want:
>>
>> Mercurial > foo > bar
>> ^^^^^^^^^   ^^^   ^^^  these should look like links (ie blue)
>> ^^^^^^^^^              this should be the root link
>>           ^     ^      these separators should be inert (ie black)
>
> Would it be acceptable to show this instead?:
>
>> Mercurial > foo > bar
>
> That would be much easier to do since there would not be any special
> case (i.e. the first or last item which would have no '>').
>
> I can place the ' > ' outside of the links as you suggest, which makes
> them be of a different color which in turn makes the actual path
> element links stand out more. These path element links are regular
> URLs that follow the template CSS. In most templates that means that
> the URL does not have an underline, and that their color depends on
> where the anchor is located (usually on the header and in the monoblue
> template on a level 1 header). I don't think that making them look
> like links outside of the header (i.e. blue) everywhere would be a
> good idea (e.g. on the monoblue template making the link items blue as
> non header links would make the text hard to read on top of the blue
> background).
>
> So I propose to just place the '>' separators outside of the links as
> you suggested. I hope that would be enough to make the links stand
> out.
>
> I can send a patch with these changes for you to review (or if someone
> gives me access to a public server I could set a demo there).
>
> Thanks,
>
> Angel

Looking a bit more closely at the different templates, the paper and
coal templates would require some additional styling to make the links
stand out. The gitweb is the one that resembles more your suggestion
while the spartan template index page is quite clear as well although
the actual repository pages are a bit of a mess (some show the
repository path and some don't, I'll need to fix that).

So it seems that some additional level of styling must be added
anyway. I'll see what I can do.

Cheers,

Angel


More information about the Mercurial-devel mailing list