From: Maxime Devos <maximedevos@telenet.be>
To: Canan Talayhan <canan.t.talayhan@gmail.com>, guix-devel@gnu.org
Subject: Re: [Outreachy] - Guix Data Service - Set a more informative page title
Date: Tue, 13 Apr 2021 13:57:49 +0200 [thread overview]
Message-ID: <eaae79f17e2137b731271d223e3376cfa0bd4c81.camel@telenet.be> (raw)
In-Reply-To: <CAAosC5LWRR59xBYo+UjjGyBGWPBa7hzg0JPxEPoJj-2vnfyvUg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]
On Tue, 2021-04-13 at 12:01 +0300, Canan Talayhan wrote:
> Hi everyone,
Welcome!
> My name is Canan. I'm an Outreachy applicant. I'm working on the introductory task for
> Guix Data Service.
Is this ‘introductory task’ publicly available? If so, could you post a link?
I'm not up-to-date with Outreachy.
> Introductory task:
> Set a more informative page title for any page where the title is "Guix Data Service"
>
> I've created a patch for the "Jobs" page. If it looks good for everyone then I can proceed with
> other applicable pages.
>
> Now, I'm working on the title part of the code snippet below to make it more elegant.
>
> ```scm
> (define* (layout #:key
> (head '())
> (body '())
> title
> description)
> `((doctype "html")
> (html
> (@ (lang "en"))
> (head
> ,@(if title
> `((title ,(string-append title " - Guix Data Service")))
Typographical nitpick: I would use a proper dash here (the figure dash ‒ or the —
em dash, I always forgot which is correct), instead of the hyphen-minus -.
(Resource: <https://en.wikipedia.org/wiki/Dash#Figure_dash>).
> `((title "Guix Data Service")))
> ```
You could bring the 'if' inside:
`((title ,(if title
(string-append title " ‒ Guix Data Service")
"Guix Data Service")))
and a simplification is possible, as adding a title is unconditional:
(head
(title ,(if title (string-append ...) ...))
...)
> Could you please review and share your comments? I'll be appreciated.
>
> Attached file: jobs-title-and-view.diff
+ (define page-header"Jobs")
Nitpick: I would put a space before "Jobs"? Also, what's the point of
defining this variable, if it is constant?
+ (define page-header "Job")
+
(layout
+ #:title
+ (string-append page-header job-id)
IIRC, job ids are integers, so this would result in titles
like "Job1234"? Titles like "Job 1234" would be better.
I haven't tested the patch, but better page titles are good, thanks!
Maxime.
Sometimes reviewing patches, but without actually testing them.
Guix IRC: mdevos
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-04-13 11:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 9:01 [Outreachy] - Guix Data Service - Set a more informative page title Canan Talayhan
2021-04-13 11:57 ` Maxime Devos [this message]
2021-04-13 15:56 ` Canan Talayhan
2021-04-13 17:51 ` Maxime Devos
2021-04-15 12:08 ` Canan Talayhan
2021-04-15 21:52 ` Christopher Baines
2021-04-16 9:58 ` Canan Talayhan
2021-04-16 11:11 ` Christopher Baines
2021-04-18 13:42 ` Canan Talayhan
2021-04-18 17:53 ` Christopher Baines
2021-04-18 20:37 ` Canan Talayhan
2021-04-19 19:16 ` Christopher Baines
2021-04-21 15:43 ` Canan Talayhan
2021-04-22 19:46 ` Christopher Baines
2021-04-23 8:34 ` Canan Talayhan
2021-04-23 12:10 ` Christopher Baines
2021-04-24 11:39 ` Christopher Baines
2021-04-24 15:30 ` Canan Talayhan
2021-04-24 20:21 ` Christopher Baines
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=eaae79f17e2137b731271d223e3376cfa0bd4c81.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=canan.t.talayhan@gmail.com \
--cc=guix-devel@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.