google / gitiles

A simple browser for Git repositories.
https://gerrit.googlesource.com/gitiles/
Other
582 stars 174 forks source link

rendering of relative URLs in README.md for directory listing page is wrong #76

Closed spearce closed 7 years ago

spearce commented 7 years ago

Originally reported on Google Code with ID 82

What steps will reproduce the problem?
1. do a web search for "chromium gn"
2. the top link is to https://chromium.googlesource.com/chromium/src/tools/gn/ (this
is perhaps less than ideal, 
but a separate issue). 
3. that directory listing lists the change log for that dir, then //tools/gn/README.md
4. attempt to click on the links at the bottom of the readme, e.g. "Quick Start" (https://chromium.googlesource.com/chromium/src/tools/gn/docs/quick_start.md)
5. get a 404 back

What is the expected output? What do you see instead?

ideally the link would resolve to the version on master.

Failing that, the relative URL could also be rewritten to

https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/quick_start.md
instead.

Failing that, it might be better to just rewrite README.md to point to the full URL,
but I'd be sad to do that since it would hard-code the branch.

Reported by None on 2015-08-17 12:47:42

spearce commented 7 years ago
What steps will reproduce the problem?
1. do a web search for "chromium gn"
2. the top link is to https://chromium.googlesource.com/chromium/src/tools/gn/ (this
is perhaps less than ideal, 
but a separate issue). 
3. that directory listing lists the change log for that dir, then //tools/gn/README.md
4. attempt to click on the links at the bottom of the readme, e.g. "Quick Start" (https://chromium.googlesource.com/chromium/src/tools/gn/docs/quick_start.md)
5. get a 404 back

What is the expected output? What do you see instead?

ideally the link would resolve to the version on master.

Failing that, the relative URL could also be rewritten to

https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/quick_start.md
instead.

Failing that, it might be better to just rewrite README.md to point to the full URL,
but I'd be sad to do that since it would hard-code the branch.

Reported by None on 2015-08-17 12:47:42

spearce commented 7 years ago

Reported by None on 2015-08-17 12:48:00

spearce commented 7 years ago

Reported by None on 2015-08-17 12:48:17

spearce commented 7 years ago
bump ... this is increasingly causing confusion for our users, since this link is the
first thing that shows up when you search for "chromium gn" on Google.

Any thoughts? Should I do the workaround I described in the bug description (to rewrite
to use full URLs)?

Reported by None on 2015-09-03 08:42:31

spearce commented 7 years ago
Ran into this issue today. Would iframing the https://chromium.googlesource.com/chromium/src/tools/gn/+/master/README.md
page in https://chromium.googlesource.com/chromium/src/tools/gn so that all the links
line up correctly be a reasonable solution? The downside is all the content is layed
out separately to the rest of the page.

Reported by None on 2015-09-27 22:17:36

spearce commented 7 years ago
iframing seems like a hack in this scenario. The relative links should resolve without
that.

I spoke with jrn@google.com and he had some ideas as to what the issue was (it may
be difference in the internal instance as opposed to the upstream one since I was unable
to reproduce locally using upstream).

Reported by None on 2015-09-28 09:53:38