Open Bug 1088315 Opened 10 years ago Updated 7 years ago

Change style on hg.mozilla.org to be based on default "paper" style

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect, P4)

defect

Tracking

(Not tracked)

People

(Reporter: gps, Unassigned)

References

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/909] )

hg.mozilla.org is running the gitweb_mozilla theme, which is based on a copy of the gitweb theme from a long time ago. AFAICT, the choice of the gitweb theme back in 2007/2008 was pretty arbitrary and there is no strong reason to support it.

Since we wish to track upstream Mercurial releases more closely and since the "paper" theme tends to get more love (and IMO it looks better), I'd like us to switch the Mozilla theme to be based on "paper" instead of "gitweb." Note: we'll still need a custom theme because we need to add pushlog, etc support.

This is a low priority bug. But it's something I want to track and get people on board with so we can roll it out whenever we're ready.
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/586]
Summary: Change theme on hg.mozilla.org to be based on default "paper" theme → Change style on hg.mozilla.org to be based on default "paper" style
I don't have a strong opinion, but anything that gets us running closer to modern code, and less custom code, gets my support.  I have a gentle preference for the paper style as well.
paper appears to be lacking blame links; that would be a huge productivity loss.
(In reply to :Ms2ger from comment #2)
> paper appears to be lacking blame links; that would be a huge productivity
> loss.

That's because it's called "annotate" instead of "blame"
One thing to take into account is that gitweb_mozilla has links to bugzilla and pushlog that would be lost with an unmodified paper.

On a subjective note, i hate paper's waste of horizontal space with its sidebar.
As part of working on bug 1075275, I found a comment by mpm implying that we should switch away from gitweb: http://bz.selenic.com/show_bug.cgi?id=3833#c9 (mpm is the maintainer and BDFL of Mercurial).
(In reply to Mike Hommey [:glandium] from comment #4)
> One thing to take into account is that gitweb_mozilla has links to bugzilla
> and pushlog that would be lost with an unmodified paper.

The ways links work is you install a filter that applies itself on the template. It works on any style. See hgext/pushlog-legacy/buglink.py in version-control-tools.

We would need to add pushlog support to paper, of course.

> On a subjective note, i hate paper's waste of horizontal space with its
> sidebar.

Yeah, that's kind of annoying. I'm not a huge fan of infinite scroll either. Although, I'm pretty sure there is an option to disable that.

I don't think it would take a competent webdev much effort to implement a sliding sidebar on paper. Code lives at http://selenic.com/repo/hg/file/default/mercurial/templates.

Speaking of sidebars, they do scale better. If we wanted to start adding different "views" for changesets such as "builds containing this changeset," it's much easier in paper than gitweb, where you quickly run out of horizontal real estate.
(In reply to Mike Hommey [:glandium] from comment #3)
> (In reply to :Ms2ger from comment #2)
> > paper appears to be lacking blame links; that would be a huge productivity
> > loss.
> 
> That's because it's called "annotate" instead of "blame"

No annotate either, at least on /rev/.
(In reply to :Ms2ger from comment #7)
> > That's because it's called "annotate" instead of "blame"
> 
> No annotate either, at least on /rev/.

What would you expect "annotate" to do on /rev/?

gitweb_mozilla doesn't have blame links on /rev/ either http://hg.mozilla.org/mozilla-central/rev/3ab73d1619b9
As Gavin pointed out on dev-planning, paper links the full changeset summary line by default to go to /rev/<node>. We like our current linkifying of bug #'s inside the summary line on gitweb_mozilla (accomplished via a template filter). Since you can't have links inside links, this poses a problem that needs resolved.
(In reply to Mike Hommey [:glandium] from comment #8)
> (In reply to :Ms2ger from comment #7)
> > > That's because it's called "annotate" instead of "blame"
> > 
> > No annotate either, at least on /rev/.
> 
> What would you expect "annotate" to do on /rev/?
> 
> gitweb_mozilla doesn't have blame links on /rev/ either
> http://hg.mozilla.org/mozilla-central/rev/3ab73d1619b9


                                            vvvvvvvv
gfx/thebes/gfxWindowsPlatform.cpp    file | annotate | diff | revisions
gfx/thebes/gfxWindowsPlatform.h      file | annotate | diff | revisions
widget/windows/nsWindow.cpp          file | annotate | diff | revisions
                                            ^^^^^^^^
I brought up the lack of the per-file links in paper on #mercurial in Freenode. There seemed to be a warm reception to adding them.

If you want to hack them in, you'll want to update http://selenic.com/repo/hg/file/eb763217152a/mercurial/templates/paper/changeset.tmpl#l60 (I *think* gitweb's implementation is at http://selenic.com/repo/hg/file/eb763217152a/mercurial/templates/gitweb/map#l28).

Also, paper's linking of the entire summary line is at http://selenic.com/repo/hg/file/eb763217152a/mercurial/templates/paper/shortlogentry.tmpl#l4.

These should all be minor issues.
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/586] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/904] [kanban:engops:https://kanbanize.com/ctrl_board/6/586]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/904] [kanban:engops:https://kanbanize.com/ctrl_board/6/586] [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/908] [kanban:engops:https://kanbanize.com/ctrl_board/6/586] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/908] [kanban:engops:https://kanbanize.com/ctrl_board/6/586] [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/909] [kanban:engops:https://kanbanize.com/ctrl_board/6/586]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/909] [kanban:engops:https://kanbanize.com/ctrl_board/6/586] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/909]
Depends on: 1117021
(In reply to Gregory Szorc [:gps] from comment #6)
> The ways links work is you install a filter that applies itself on the
> template. It works on any style. See hgext/pushlog-legacy/buglink.py in
> version-control-tools.

While looking at the patch in bug 1117021 I learned about the built-in "websub" filter, which allows you to have regexes specified in hgrc that apply to web content. We could almost certainly replace the existing buglink filter with this.
QA Contact: hwine → klibby
You need to log in before you can comment on or make changes to this bug.