List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: Customization of log view
Date: Mon, 1 May 2017 10:45:16 +0100	[thread overview]
Message-ID: <20170501094516.GD1788@john.keeping.me.uk> (raw)
In-Reply-To: <CAApLaz3cKOX1nPa+mUHs3L2jEdz=ijtcOmDnewTcpOzz4JwFOw@mail.gmail.com>

Hi Simon,

On Sun, Apr 30, 2017 at 02:20:05PM +0000, Simon Steinbeiss wrote:
> I couldn't find any information on this, so excuse me if you've heard this
> question (or: request?) a gazillion times before.
> We've been using cgit for Xfce for many years and we're really happy about
> it. Recently we set up hooks to add references to related commits to
> bugreports in our bugzilla instance. We also managed to make the bug
> references in cgit's commit view hyperlinks to bugzilla, so those two parts
> of our toolchain are more connected.
> 
> What would be a nice extra is having clickable bug links in the log view,
> but I couldn't find any reference that that is currently possible. So first
> of all: is it possible to customize the log view so that we can either make
> the bug references clickable hyperlinks (appearance-wise similar to the
> branch and tag references) directly or e.g. add a new column with the
> buglinks?
> And if it currently isn't possible, is this a feature/option you would also
> be interested in supporting?
> 
> Finally I'm grateful about any pointers as to how to get going in that
> direction!

There's no functionality like this at the moment.  It looks like you're
putting bug references in the subject, so presumably adding a filter
around the subject in ui-log.c is what you're looking for.

We currently pass the subject through the commit filter for the commit
UI, so I guess that could be reued for the log view.

The problem is that in the log UI the subject is a hyperlink but all
our current filters act on plain text.  I guess you could pull apart
cgit_commit_link() to allow opening the <a> tag as a separate step and
have the caller output the body of that tag, which could be passed
through a filter.  But I haven't thought through all of the edge cases
here - what if the filter wants its own hyperlink, like your bug link?
Would it be better to call the filter with the href as an argument, so
it's up to the filter to output the anchor tag around the subject?


John


      reply	other threads:[~2017-05-01  9:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 14:20 simon
2017-05-01  9:45 ` john [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=20170501094516.GD1788@john.keeping.me.uk \
    --to=cgit@lists.zx2c4.com \
    /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).