Missing "Up" navigation link between parts and doc root?
Hello devs,
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have
to go for the "Home" link which is far on the right when on the root page
of a part?
Is there a good reason not to have the "Up" link there as well?
--
Fabien.
On Sun, Jun 21, 2020 at 09:19:27AM +0200, Fabien COELHO wrote:
Hello devs,
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have to
go for the "Home" link which is far on the right when on the root page of a
part?Is there a good reason not to have the "Up" link there as well?
Yes, please. I asked for this feature in December of 2018 but have not
gotten around to implementing it:
/messages/by-id/20181231235858.GB3052@momjian.us
Can someone make this improvement?
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
On 2020-06-21 09:19, Fabien COELHO wrote:
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have
to go for the "Home" link which is far on the right when on the root page
of a part?Is there a good reason not to have the "Up" link there as well?
The original stylesheets explicitly go out of their way to do it that
way. We can easily fix that by removing that special case. See
attached patch.
That patch only fixes it for the header. To fix it for the footer as
well, we'd first need to import the navfooter template to be able to
customize it. Not a big problem though.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
0001-doc-Don-t-hide-the-Up-link-when-it-is-the-same-as-Ho.patchtext/plain; charset=UTF-8; name=0001-doc-Don-t-hide-the-Up-link-when-it-is-the-same-as-Ho.patch; x-mac-creator=0; x-mac-type=0Download
From fd256cfd4bc59daa2520083eca7ee3ca83991bfd Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Jul 2020 10:56:48 +0200
Subject: [PATCH] doc: Don't hide the "Up" link when it is the same as "Home"
Reported-by: Fabien COELHO <coelho@cri.ensmp.fr>
Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.22.394.2006210914370.859381%40pseudo
---
doc/src/sgml/stylesheet.xsl | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index aeaa1e7c10..af0ac129e9 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -57,7 +57,6 @@ Customization of header
<xsl:variable name="row1" select="$navig.showtitles != 0"/>
<xsl:variable name="row2" select="count($prev) > 0
or (count($up) > 0
- and generate-id($up) != generate-id($home)
and $navig.showtitles != 0)
or count($next) > 0"/>
@@ -95,8 +94,7 @@ Customization of header
</td>
<td width="10%" align="{$direction.align.start}">
<xsl:choose>
- <xsl:when test="count($up)>0
- and generate-id($up) != generate-id($home)">
+ <xsl:when test="count($up)>0">
<a accesskey="u">
<xsl:attribute name="href">
<xsl:call-template name="href.target">
@@ -117,7 +115,6 @@ Customization of header
<th width="60%" align="center">
<xsl:choose>
<xsl:when test="count($up) > 0
- and generate-id($up) != generate-id($home)
and $navig.showtitles != 0">
<xsl:apply-templates select="$up" mode="object.title.markup"/>
</xsl:when>
--
2.27.0
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
On 2020-06-21 09:19, Fabien COELHO wrote:
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have
to go for the "Home" link which is far on the right when on the root page
of a part?Is there a good reason not to have the "Up" link there as well?
The original stylesheets explicitly go out of their way to do it that
way.
Can we find any evidence of the reasoning? As you say, that clearly was
an intentional choice.
regards, tom lane
On 2020-Jul-03, Tom Lane wrote:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
On 2020-06-21 09:19, Fabien COELHO wrote:
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have
to go for the "Home" link which is far on the right when on the root page
of a part?Is there a good reason not to have the "Up" link there as well?
The original stylesheets explicitly go out of their way to do it that
way.Can we find any evidence of the reasoning? As you say, that clearly was
an intentional choice.
If it helps, this seems to have been first introduced in commit b8691d838be.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
The original stylesheets explicitly go out of their way to do it that
way.Can we find any evidence of the reasoning? As you say, that clearly was
an intentional choice.
Given the code, my guess would be the well-intentioned but misplaced
desire to avoid a redundancy, i.e. two links side-by-side which point to
the same place.
--
Fabien.
Hello Peter,
The original stylesheets explicitly go out of their way to do it that way.
We can easily fix that by removing that special case. See attached patch.That patch only fixes it for the header. To fix it for the footer as well,
we'd first need to import the navfooter template to be able to customize it.
Thanks for the patch, which applies cleanly, doc compiles, works for me
with w3m.
Not a big problem though.
Nope, just mildly irritating for quite a long time:-) So I'd go for back
patching if it applies cleanly.
--
Fabien.
On Sat, Jul 4, 2020 at 08:47:53AM +0200, Fabien COELHO wrote:
Hello Peter,
The original stylesheets explicitly go out of their way to do it that
way. We can easily fix that by removing that special case. See attached
patch.That patch only fixes it for the header. To fix it for the footer as
well, we'd first need to import the navfooter template to be able to
customize it.Thanks for the patch, which applies cleanly, doc compiles, works for me with
w3m.Not a big problem though.
Nope, just mildly irritating for quite a long time:-) So I'd go for back
patching if it applies cleanly.
Can we get Peter's patch for this applied soon? Thanks. Should I apply
it?
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
On 2020-08-25 21:48, Bruce Momjian wrote:
On Sat, Jul 4, 2020 at 08:47:53AM +0200, Fabien COELHO wrote:
Hello Peter,
The original stylesheets explicitly go out of their way to do it that
way. We can easily fix that by removing that special case. See attached
patch.That patch only fixes it for the header. To fix it for the footer as
well, we'd first need to import the navfooter template to be able to
customize it.Thanks for the patch, which applies cleanly, doc compiles, works for me with
w3m.Not a big problem though.
Nope, just mildly irritating for quite a long time:-) So I'd go for back
patching if it applies cleanly.Can we get Peter's patch for this applied soon? Thanks. Should I apply
it?
I have made the analogous changes to the footer as well and committed this.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On Sun, Sep 6, 2020 at 04:59:11PM +0200, Peter Eisentraut wrote:
On 2020-08-25 21:48, Bruce Momjian wrote:
On Sat, Jul 4, 2020 at 08:47:53AM +0200, Fabien COELHO wrote:
Hello Peter,
The original stylesheets explicitly go out of their way to do it that
way. We can easily fix that by removing that special case. See attached
patch.That patch only fixes it for the header. To fix it for the footer as
well, we'd first need to import the navfooter template to be able to
customize it.Thanks for the patch, which applies cleanly, doc compiles, works for me with
w3m.Not a big problem though.
Nope, just mildly irritating for quite a long time:-) So I'd go for back
patching if it applies cleanly.Can we get Peter's patch for this applied soon? Thanks. Should I apply
it?I have made the analogous changes to the footer as well and committed this.
I see this only applied to master. Shouldn't this be backpatched?
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
On 2020-09-08 21:10, Bruce Momjian wrote:
On Sun, Sep 6, 2020 at 04:59:11PM +0200, Peter Eisentraut wrote:
I have made the analogous changes to the footer as well and committed this.
I see this only applied to master. Shouldn't this be backpatched?
I wasn't planning to. It's not a bug fix.
Other thoughts?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On 2020-09-08 21:10, Bruce Momjian wrote:
I see this only applied to master. Shouldn't this be backpatched?
I wasn't planning to. It's not a bug fix.
Other thoughts?
Yep. ISTM nicer if all docs have the same navigation, especially as
googling often points to random versions. No big deal anyway, in six year
all supported versions will have a up link on the part level! :-)
--
Fabien.
On 2020-09-11 14:58, Fabien COELHO wrote:
On 2020-09-08 21:10, Bruce Momjian wrote:
I see this only applied to master. Shouldn't this be backpatched?
I wasn't planning to. It's not a bug fix.
Other thoughts?
Yep. ISTM nicer if all docs have the same navigation, especially as
googling often points to random versions. No big deal anyway, in six year
all supported versions will have a up link on the part level! :-)
Okay, backpatched to PG10.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services