[PATCH] website: Add Help dropdown menu

  • Done
  • quality assurance status badge
Details
4 participants
  • Luis Felipe
  • Mathieu Othacehe
  • pelzflorian (Florian Pelz)
  • Vincent Legoll
Owner
unassigned
Submitted by
Luis Felipe
Severity
normal
L
L
Luis Felipe wrote on 8 Apr 2021 21:49
(name . Luis Felipe via Guix-patches)(address . guix-patches@gnu.org)
hD_LBd4I4i0oRhCDjU9x_Ucr6e_Ui2hjBpHb0AxOPu5i7UuT7KFXZq00b-4TweI_UWGbuN9eNzeuQ72JUcp3uE8SgF_hfhUfQHEsVLsuheg=@protonmail.com
Hi,

This patch converts the Help item of the navigation bar into a dropdown menu as proposed in the thread "Document our WIP" (https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00532.html).


---
Luis Felipe López Acevedo
From dad14c86f4feee4a5e41748db4935870afe15e43 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Thu, 8 Apr 2021 14:34:37 -0500
Subject: [PATCH] website: Add Help dropdown menu.

This change converts the Help item of the primary navigation of the
website into a dropdown menu listing the items currently available in
the Help page.

This was proposed in the thread "Document our WIP" sent to the
guix-devel mailing list on March 27, 2021.

* website/apps/base/templates/components.scm (navbar): Make Help a dropdown.
---
website/apps/base/templates/components.scm | 40 +++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)

Toggle diff (55 lines)
diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 7ca76cc..c965d41 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -405,7 +405,45 @@ manual.
(menu-item #:label "Latest"
#:active-item active-item
#:url (guix-url "download/latest/")))))
- ,(C_ "website menu" (menu-item #:label "Help" #:active-item active-item #:url (guix-url "help/")))
+
+ ,(menu-dropdown #:label (C_ "website menu" "Help")
+ #:active-item active-item
+ #:items
+ (list
+ (C_ "website menu"
+ (menu-item #:label "GNU Guix Manual"
+ #:active-item active-item
+ #:url (guix-url "manual/")))
+ (C_ "website menu"
+ (menu-item #:label "Guix Reference Card"
+ #:active-item active-item
+ #:url (guix-url "guix-refcard.pdf")))
+ (C_ "website menu"
+ (menu-item #:label "Videos"
+ #:active-item active-item
+ #:url (guix-url "videos/")))
+ (C_ "website menu"
+ (menu-item #:label "Cookbook"
+ #:active-item active-item
+ #:url (guix-url "cookbook/")))
+ (C_ "website menu"
+ (menu-item #:label "GNU Manuals"
+ #:active-item active-item
+ #:url (gnu-url "manual/")))
+ (C_ "website menu"
+ (menu-item #:label "Wiki"
+ #:active-item active-item
+ #:url (identity "https://libreplanet.org/wiki/Group:Guix")))
+ (C_ "website menu"
+ (menu-item #:label "IRC Chat"
+ #:active-item active-item
+ #:url (guix-url "contact/irc/")))
+ (C_ "website menu"
+ (menu-item #:label "Mailing Lists"
+ #:active-item active-item
+ #:url (guix-url "contact/")))))
+
+
,(C_ "website menu" (menu-item #:label "Packages" #:active-item active-item #:url (guix-url "packages/")))
,(C_ "website menu" (menu-item #:label "Blog" #:active-item active-item #:url (guix-url "blog/")))

base-commit: c46cc7d80a1e90d3d841e5b59f6e131bf2052c87
--
2.31.0
V
V
Vincent Legoll wrote on 8 Apr 2021 23:06
Re: Document our WIP
(name . Luis Felipe)(address . luis.felipe.la@protonmail.com)
CAEwRq=r6uZTSXFbXOZuxm2MC0O4wDnQdM9MQoqUgtXJmfhL3XQ@mail.gmail.com
Hi,

On Thu, Apr 8, 2021 at 9:55 PM Luis Felipe
<luis.felipe.la@protonmail.com> wrote:
Toggle quote (2 lines)
> > I just sent a patch to include a link to the wiki in the Help page (https://issues.guix.gnu.org/47555).

I'm sorry to not have given feedback, the Help page addition is great
! Nice wiki icon too.

Toggle quote (13 lines)
> > If the patch is applied, I can send a separate patch to update the Help menu as Vincent suggested:
> >
> > Help
> > • GNU Guix Manual
> > • Videos
> > • Cookbook
> > • GNU Manuals
> > • Wiki
> > • IRC Chat
> > • Mailing lists
>
> I've just sent a patch to add this menu (https://issues.guix.gnu.org/47663).

I'm not sure if I can help, but this LGTM (untrained eyes)...

Thanks a lot

--
Vincent Legoll
M
M
Mathieu Othacehe wrote on 9 Apr 2021 08:51
Re: bug#47663: [PATCH] website: Add Help dropdown menu
(name . Luis Felipe)(address . luis.felipe.la@protonmail.com)(address . 47663@debbugs.gnu.org)
878s5sq7bk.fsf@gnu.org
Hello Luis,

Toggle quote (4 lines)
> This patch converts the Help item of the navigation bar into a dropdown menu
> as proposed in the thread "Document our WIP"
> (https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00532.html).

I find that this new dropdown provides an easier access to the Help
links which is nice!

What do we do with the old help/index.html page, that is now not
accessible? Maybe we need to remove this file:
artwork/website/apps/base/templates/help.scm?

Also I noticed that left clicking directly on the "Help" menu causes
some undesired wrapping on the Help items.

Thanks,

Mathieu
L
L
Luis Felipe wrote on 9 Apr 2021 15:32
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(name . 47663@debbugs.gnu.org)(address . 47663@debbugs.gnu.org)
DdSYOpVcOLHVPm1r9UqAW7XvoCKfq2mYBqsdwhSnlXsY1yRTIXxaTAN4ZWDWA9Jzh3UjEVW-Zgwpl8W3_HX1X2BypOiMqrxU-9y3TlAcUkc=@protonmail.com
Hey Mathieu,

??????? Original Message ???????
On Friday, April 9, 2021 6:51 AM, Mathieu Othacehe <othacehe@gnu.org> wrote:

Toggle quote (13 lines)
> Hello Luis,
>
> > This patch converts the Help item of the navigation bar into a dropdown menu
> > as proposed in the thread "Document our WIP"
> > (https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00532.html).
>
> I find that this new dropdown provides an easier access to the Help
> links which is nice!
>
> What do we do with the old help/index.html page, that is now not
> accessible? Maybe we need to remove this file:
> artwork/website/apps/base/templates/help.scm?

Oh, I completely forgot about that, and I'd actually like to keep that page and link to it from the menu too. So let me think how to solve that.


Toggle quote (3 lines)
> Also I noticed that left clicking directly on the "Help" menu causes
> some undesired wrapping on the Help items.

I'll take a look at this too, and send another patch.

Thanks for your help so far, Mathieu.

Best,
M
M
Mathieu Othacehe wrote on 9 Apr 2021 20:55
(name . Luis Felipe)(address . luis.felipe.la@protonmail.com)(name . 47663@debbugs.gnu.org)(address . 47663@debbugs.gnu.org)
87im4v479l.fsf_-_@gnu.org
Hey Luis,

Toggle quote (2 lines)
> Oh, I completely forgot about that, and I'd actually like to keep that page and link to it from the menu too. So let me think how to solve that.

Yes keeping it is fine to me. At first I thought that left clicking the
"Help" menu would open it. Adding a dedicated item in the list also
seems fine.

Toggle quote (2 lines)
> I'll take a look at this too, and send another patch.

Great :)

Thanks,

Mathieu
P
P
pelzflorian (Florian Pelz) wrote on 9 Apr 2021 21:12
Re: [bug#47663] [PATCH] website: Add Help dropdown menu
(name . Mathieu Othacehe)(address . othacehe@gnu.org)
20210409191243.xgvp6c5jdammt6h3@pelzflorian.localdomain
Thank you for working on this.

On Fri, Apr 09, 2021 at 08:55:50PM +0200, Mathieu Othacehe wrote:
Toggle quote (4 lines)
> At first I thought that left clicking the
> "Help" menu would open it. Adding a dedicated item in the list also
> seems fine.

In commit 571e1a416e1148139923418bf801ddb6b11723c3 I made left-click
toggle the dropdown instead because touch devices cannot otherwise
access the dropdown, I think. Am I mistaken?

Regards,
Florian
L
L
Luis Felipe wrote on 9 Apr 2021 21:51
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
eDO1rx9LekchmcIgattkzA_lRu040BLm8aaCIrzv0x3cVwa2cAHTPcmYSQw6_S_5O5qI7nM5QPDT2_RD35qIyeZCvuQ2MMzNk-EO06Iovxg=@protonmail.com
On Friday, April 9, 2021 7:12 PM, pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> wrote:

Toggle quote (12 lines)
> Thank you for working on this.
>
> On Fri, Apr 09, 2021 at 08:55:50PM +0200, Mathieu Othacehe wrote:
>
> > At first I thought that left clicking the
> > "Help" menu would open it. Adding a dedicated item in the list also
> > seems fine.
>
> In commit 571e1a416e1148139923418bf801ddb6b11723c3 I made left-click
> toggle the dropdown instead because touch devices cannot otherwise
> access the dropdown, I think. Am I mistaken?

I think that is the right behavior, Florian. So I'll add the missing link as a new item, like so:

Help
+ All ← Links to /help/
+ Etc.
+ Etc.

And fix any remaining style issues for pointing and touch devices (cursor shouldn't be pointer (it wasn't before), and dropdown menu width should not shrink on click).
L
L
Luis Felipe wrote on 10 Apr 2021 17:24
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
l3yrw2q6Qcc7fmAqycvuPU7Fq2KohdDG9NBu6plSWZ97SePYBDBdRjW8uLrlJx3fgIkgGgV7f9tBLX5ywg1Zp4kWr-gO8HbeXmOw4s_y8Bc=@protonmail.com
On Friday, April 9, 2021 7:51 PM, Luis Felipe <luis.felipe.la@protonmail.com> wrote:

Toggle quote (8 lines)
> I think that is the right behavior, Florian. So I'll add the missing link as a new item, like so:
>
> Help
>
> - All ← Links to /help/
> - Etc.
> - Etc.

The attached patched does this.


Toggle quote (3 lines)
> And fix any remaining style issues for pointing and touch devices (cursor shouldn't be pointer (it wasn't before), and dropdown menu width should not shrink on click).
>

I'd like to address this separately, so I'll file a new issue and provide a patch once I have something.
From 0666d8ec13d1fd069e4123c0b4ee52289650ab91 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Sat, 10 Apr 2021 10:00:51 -0500
Subject: [PATCH] website: Add Help dropdown menu.

This change converts the Help item of the primary navigation of
the website into a dropdown menu listing the items currently available
in the Help page.

This was proposed in the thread "Document our WIP" sent to
the guix-devel mailing list on March 27, 2021.

* website/apps/base/templates/components.scm (navbar): Make Help a dropdown.
---
website/apps/base/templates/components.scm | 44 +++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)

Toggle diff (59 lines)
diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 7ca76cc..6ead1e5 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -405,7 +405,49 @@ manual.
(menu-item #:label "Latest"
#:active-item active-item
#:url (guix-url "download/latest/")))))
- ,(C_ "website menu" (menu-item #:label "Help" #:active-item active-item #:url (guix-url "help/")))
+
+ ,(menu-dropdown #:label (C_ "website menu" "Help")
+ #:active-item active-item
+ #:items
+ (list
+ (C_ "website menu"
+ (menu-item #:label "All"
+ #:active-item active-item
+ #:url (guix-url "help/")))
+ (C_ "website menu"
+ (menu-item #:label "GNU Guix Manual"
+ #:active-item active-item
+ #:url (guix-url "manual/")))
+ (C_ "website menu"
+ (menu-item #:label "Guix Reference Card"
+ #:active-item active-item
+ #:url (guix-url "guix-refcard.pdf")))
+ (C_ "website menu"
+ (menu-item #:label "Videos"
+ #:active-item active-item
+ #:url (guix-url "videos/")))
+ (C_ "website menu"
+ (menu-item #:label "Cookbook"
+ #:active-item active-item
+ #:url (guix-url "cookbook/")))
+ (C_ "website menu"
+ (menu-item #:label "GNU Manuals"
+ #:active-item active-item
+ #:url (gnu-url "manual/")))
+ (C_ "website menu"
+ (menu-item #:label "Wiki"
+ #:active-item active-item
+ #:url (identity "https://libreplanet.org/wiki/Group:Guix")))
+ (C_ "website menu"
+ (menu-item #:label "IRC Chat"
+ #:active-item active-item
+ #:url (guix-url "contact/irc/")))
+ (C_ "website menu"
+ (menu-item #:label "Mailing Lists"
+ #:active-item active-item
+ #:url (guix-url "contact/")))))
+
+
,(C_ "website menu" (menu-item #:label "Packages" #:active-item active-item #:url (guix-url "packages/")))
,(C_ "website menu" (menu-item #:label "Blog" #:active-item active-item #:url (guix-url "blog/")))

base-commit: 3c7adcaa80a7e2f4af90b6d629beed46276d66af
--
2.31.0
M
M
Mathieu Othacehe wrote on 10 Apr 2021 20:51
(name . Luis Felipe via Guix-patches via)(address . guix-patches@gnu.org)
87r1ji0y8b.fsf@gnu.org
Hello,

Toggle quote (2 lines)
> I'd like to address this separately, so I'll file a new issue and provide a patch once I have something.

Fine, pushed this one as 321813e88f06e1743c75a1a3b7fe9a0705514a80.

Thanks,

Mathieu
?
Your comment

This issue is archived.

To comment on this conversation send an email to 47663@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 47663
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch