List for cgit developers and users
 help / color / mirror / Atom feed
From: andy at warmcat.com (Andy Green)
Subject: [PATCH] cgit.css: add dynamic age update
Date: Mon, 25 Jun 2018 08:15:14 +0800	[thread overview]
Message-ID: <2A606D35-12EF-4714-ACE2-760D5A443E8A@warmcat.com> (raw)
In-Reply-To: <20180625005806.4585133e@leda>



On June 25, 2018 6:58:06 AM GMT+08:00, Christian Hesse <list at eworm.de> wrote:
>John Keeping <john at keeping.me.uk> on Sun, 2018/06/24 12:52:
>> I'd really like to here other people's opinions on this.
>
>I like this change, but we should keep js optional and not break
>existing
>functionality without it. (I did not look at the code, but discussion
>sounds
>like it is good as-is.)

Yes, the only change to the C is one line that adds the unix time like ut=1234567 as an attribute in the span containing the age, because no nice reliable way to eat the formatted datetime already there in the tooltip.  If no JS (sending that can be manually disabled by "js=" in the global conf, per John's suggestion), or it's disabled in browser, the server-generated age is shown static as today.

Same goes for the line range highlight, it devolves to what is there today, no highlights and no ranges, no clipboard, but you can scrape from the URL bar, and relies on browser native logic to scroll to the id after the # one time.

I think generally there can't be feature parity without JS, eg the line range stuff can only be done client-side.  But the new JS features should always cleanly disappear if no JS, with features no worse than today, or it's a bug.

-Andy


      reply	other threads:[~2018-06-25  0:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24  7:59 andy
2018-06-24 11:52 ` john
2018-06-24 12:11   ` andy
2018-06-24 22:58   ` list
2018-06-25  0:15     ` andy [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=2A606D35-12EF-4714-ACE2-760D5A443E8A@warmcat.com \
    --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).