Open vapier opened 6 years ago
Interesting. Do you mean that when navbar.md is present,
A. It should replace the header from gitiles.customHeader (https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/resources/com/google/gitiles/templates/Common.soy#53 --- the "Google Git" logo and "Switch User" etc links in the example you linked to), or B. It should show up right below that header, or C. It should show up below the file listing, right above the README.md content ?
i think the rendering between md & non-md files should be consistent. from that starting point ...
the user acct management should always be there in the upper right. it'd be in the same bar as the header.
wrt gitiles.customHeader, i can see it go either way wrt merging or appending. i don't have a strong opinion there.
<div>
<align-left>gitiles.customHeader?</align-left>
<center>whatever custom title in navbar.md</center>
<align-right>sign in/out links</align-right>
</div>
I see. This may be complicated, since the current behavior when viewing an md file is the case A I described (i.e., the navbar replaces the gitiles header, or more precisely, there is no gitiles header).
Hm, we could try making this configurable: by default always show the gitiles site header (which would provide the consistency you're describing), and allow projects to stop showing it for md files if they want. That kind of configurability could happen via templates (just like customHeader). Maybe this is not so complicated after all.
navbar.md currently renders when you view md files, but it doesn't render in non-md files
for example, we can see it here: https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/README.md
but not in the directory listings: https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/ https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/lib/
but not in various plain text files: https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/BUILD https://gerrit.googlesource.com/gitiles/+/e3fbf15324680e78c79aab292a6de84eb0c78b66/WORKSPACE
the navbar.md should be visible in all of these for consistency