user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/2] www: fix top nav bar for unindexed v1 inboxes
  2022-09-02  9:10  6% [PATCH 0/2] www: unindexed v1 fixes Eric Wong
@ 2022-09-02  9:10  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-09-02  9:10 UTC (permalink / raw)
  To: meta

For /$INBOX/$MSGID/ pages, we need to point all nav bar links
../ regardless of whether ->over exists.  I've also verified
this doesn't affect /$INBOX/new.html at all.
---
 lib/PublicInbox/View.pm | 2 +-
 t/plack.t               | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 2e5228e1..11a94ba9 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -678,7 +678,7 @@ sub _msg_page_prepare_obuf {
 		$ctx->{chash} = content_hash($eml) if $ctx->{smsg}; # reused MID
 		$rv .= "<pre\nid=b>"; # anchor for body start
 	}
-	$ctx->{-upfx} = '../' if $have_over;
+	$ctx->{-upfx} = '../';
 	my @title; # (Subject[0], From[0])
 	for my $v ($eml->header('From')) {
 		my @n = PublicInbox::Address::names($v);
diff --git a/t/plack.t b/t/plack.t
index 32209c7d..3ba2e6fb 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -1,5 +1,5 @@
 #!perl -w
-# Copyright (C) 2014-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use v5.10.1;
@@ -154,6 +154,7 @@ my $c1 = sub {
 	$res = $cb->(GET($pfx . $path));
 	is(200, $res->code, "success for $path");
 	my $html = $res->content;
+	like($html, qr!\bhref="\Q../_/text/help/"!, 'help available');
 	like($html, qr!<title>hihi - Me</title>!, 'HTML returned');
 	like($html, qr!<a\nhref=raw!s, 'raw link present');
 	like($html, qr!&gt; quoted text!s, 'quoted text inline');

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] www: unindexed v1 fixes
@ 2022-09-02  9:10  6% Eric Wong
  2022-09-02  9:10  7% ` [PATCH 1/2] www: fix top nav bar for unindexed v1 inboxes Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-09-02  9:10 UTC (permalink / raw)
  To: meta

While it's rare to find someone running unindexed v1 inboxes
nowadays, we can't drop support for them, either.  So do our
best to ensure they still work.

Eric Wong (2):
  www: fix top nav bar for unindexed v1 inboxes
  www: omit [thread overview] link for unindexed v1

 lib/PublicInbox/View.pm | 10 ++++++++--
 t/plack.t               |  5 ++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-09-02  9:10  6% [PATCH 0/2] www: unindexed v1 fixes Eric Wong
2022-09-02  9:10  7% ` [PATCH 1/2] www: fix top nav bar for unindexed v1 inboxes Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).