Add the links in the "Links" section of the unit's README
to the right sidenav.
For golang/go#42968
Change-Id: Ie3744812af12ba365cd7863af09299d4d5c336a6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/274957
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Removes static content used in the legacy package, directory, and module pages.
Moves sidenav and readme styles requests into details page so they are not
loaded on all page requests.
Change-Id: Ief93cb1ec21939dadf0f9f6a0c47abaf4284b2a9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/272827
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The browser find text feature will search through text
even when it is hidden. This change will expand the readme
when the text search feature is activated on the unit page.
Fixesgolang/go#42653
Change-Id: I15a97724c21a975ee04f409a26e409e3ed7efd76
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/272608
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
The default id generator in goldmark is limited to ascii characters
and keeps the text content from inlined images. This change removes
the images from heading ids and preserves all unicode alphanumeric
characters.
Change-Id: I8657dc4aa3f2b8d5b4f5a519992ed85f67d0b7a4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/272447
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This change adds the readme headings to the outline
in the sidenav and unifies the navigation tree into
a single accessible structure.
Styles within the tree are based on the accessiblity
tree structure. This will make it easier to see when
updates to the tree are inserted incorrectly because
they'll be matched by visual breakages on the page.
Sidenav and readme click handlers are updated to
ensure that when an outline item is clicked the
corresponding content is visible.
Change-Id: Ie6062c24f37bec9fffe242aa1398ec815606c613
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271319
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Code in motion. Outline code will be updated to support
a new outline layout that contains the readme headings.
Change-Id: I58d4778f01dd9e1347197f1a8d2d5cd16b35d7a8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271318
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
When a documentation section is empty, the text now displays "This
section is empty."
For golang/go#42652
Change-Id: I9dca537823d8e8aeb5adcb2404e02153ee025ef6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271257
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
At the moment, this error appears in the console on pages without a
Source Files section:
Uncaught TypeError: Cannot read property 'setAttribute' of null
at unit.js:54
It doesn't seem like js-filesOption is being used anywhere, so this
reference is deleted in unit.js.
Change-Id: I8db74ae996d99b1ffef143e5b8ffdc78ba1d9cbe
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/270801
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Currently, "jump to" filters ids by a simple substring match, ordering them alphabetically. This change makes the filtering more powerful by prioritizing exact matches over prefix matches and then substring matches.
E.g. if a package has a symbol named `Foo`, when the Jump dialog is searched for `Foo` it should now come before ids like `BarFoo` (which would previous come on top because of alphabetical order).
This change also removes the use of regexps in the list, using simpler string matching.
Fixesgolang/go#42489
Change-Id: I2f564d28767a27c68ef01ab246aaf4b8755bb902
GitHub-Last-Rev: cd6ca249ce
GitHub-Pull-Request: golang/pkgsite#16
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/269278
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Adds space between variables and constants to make it
clear which description belongs to a declaration.
Change-Id: I916e5538079751298921258611896106266dc580
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/268458
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
Removes various checks for the sidenav experiment now
that the feature is fully rolled out.
Change-Id: I201fda2189252d350f05e50176f2ff9eb0268343
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/268457
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Fixes a bug in the mobile fixed header where it would display
select options for imports and importedby tabs when viewing
units that do not contain a package. The 'Licenses' option is moved
above 'Imports' and 'Imported By' to match the order in the desktop
header.
Fixesgolang/go#42298
Change-Id: I81e170e2b34013f2b2c9111bbc1c8ce90adc3382
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/267938
Trust: Jamal Carvalho <jamal@golang.org>
Trust: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Time to First Byte and First Contentful Paint can be useful as proxy
or supplemental metrics when diagnosing specific issues. For now we'll
focus on the Core Web Vitals to reduce the number of events sent to
Google Analytics. This will be important as traffic to the site grows
so that we do not hit any event caps.
Change-Id: I3c7514d630b65b66d2884efb9f0c1b9ace71630d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/268118
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
When a series has tagged versions, but the current module version does
not, the versions tab will now display the message "No tagged versions in
this module." instead of displaying nothing.
For golang/go#41345
Change-Id: I2137187532bce18d1c60bc7aa138e14a6fb7e559
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266141
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
The separate parts of the unit-page template are now rendered
separately. No HTML parsing is done when rendering the unit page.
Change-Id: I9ee1617eb4eff5d2afd759d3677ba40bb660bd6b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/267399
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Separate the unit template into three parts.
For now, they are all still rendered together, then parsed
apart. But we will change that later.
Change-Id: I2b413bd35adb1d72f00a9df39907b95883da41c7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/267299
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Updates style and copy of the jump to button to clarify its behavior and
updates the heading of the jump to modal to match the button text.
Change-Id: I8536bba10bb152e001475265308c012afc995b17
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264632
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Move the doc rendering templates from hard-coded
strings to files under content/static/html.
Also, parse the templates once, instead of on each call to Render.
Template loading is still under the control of the
internal/godoc/dochtml package, because the templates have to be
parsed with a certain grouping and with some functions defined, and it
would be awkward if callers had to know all that.
An alternative design would pass the directory containing the template
files to Render, but that would require a lot of plumbing.
This is the first of several improvements to internal/godoc.
We also plan to remove godoc.Parse.
Change-Id: I7182dd4ea9bc7189b1144295ad193af30ef9ecc4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266597
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Updates css generator and creates new readme.css file that
preserves github heading styles when using the goldmark
parser.
Change-Id: Iddd2ea99711ffe11c14f6e9e2087b023b7d73325
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266580
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Code in motion. Preparing to generate new readme styles for
the goldmark parser.
For golang/go#39297
Change-Id: I506046ba36fdef6fa935b0600e1037e2d832ad24
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266579
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The sticky header currently links to the anchor tag, while the main
header links to the licenses tab. Update the sticky header to match.
Link fixed: https://photos.app.goo.gl/Xu4z72DPgggm8oFq7
Change-Id: If6be8e01e5ce55876c4dee4a644c47426b6c2dec
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/266142
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Adds data-test-id attributes to elements used in the
pagecheck and server test selectors. Test ids help indicate
that a change in related html structure will break a test
and make the tests more resilient to minor changes in html
structure on a page.
Change-Id: If82b72950b92ffdc8c4708ba886c758d624ff67c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265782
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Updates css selector for h4 level links in the documentation
so the declaration name stays visible when the paragraph link
is hidden.
Change-Id: Ic229626fffdd8f8091b3da3ea60c7d6630aeacc3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265581
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
When the h3 were changed to h4 they no longer
had the correct styles applied to them. This
change corrects the hover state for the header
links and adds a space between the title and
paragraph the icon.
Change-Id: Ie77f93db73202b22b21d69c31f9c4ab962f36b90
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264628
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
The license and imports links in the header
appeared to have an extra space after the label
because of a css quirk. Moving the :after content
to :before content fixes the issue.
Change-Id: I9458c20340b745e5329ad0853bceebc039118864
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264629
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Fixes readme expand logic so that it will open
when an element within it is given focus through
keyboard events.
Change-Id: I66cd406137b6162b3bd8415b5c186f87f0886ee2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264627
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The mobile nav dropdown was indexed too high
and covered the hamburger menu when it was open.
Adjusts the z-index so that the dropdown will
appear behind the hamburger menu.
Change-Id: I016ddee716604fc301308916019ba971a1e9f85f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264626
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
At the moment, the word "latest" is overloaded between latest major and
latest minor. Instead, use "highest" when referencing major versions.
Change-Id: I24f7f26bcff99c2d89b55faa38dbcef62a74d1a1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264325
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Replaces empty query string href with full path
for main page link in header. Removes "?" from url
when going back to main page from meta page.
Change-Id: Id3246d7914003b1436e098db06257438e5c9db2f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264200
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
When the doc for a package does not contain an index
we disable the jump to identifier dialog. This change
prevents both the button in the sidebar and the k key
from opening the modal.
Change-Id: I48e17a4f57f066bf80fdc5452e900f9803ecf933
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264199
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
Adds a link to the header of the source files section
to view the source of a package at the origin.
Change-Id: Ieef083c08602e0ab0d498e422952738bac80d011
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/263957
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
When the repo url is unavailable show a message in the
right sidebar.
Change-Id: I1a54ff674f1f1e514a0af3cc98ad4ec62755e839
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262680
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The message indicating that a package is not redistributable is fixed so
that it is only displayed if the unit is non-redistributable and a
package.
Change-Id: Icdc927b1f49f1f4565d1e9ac2fdad239a5158599
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262772
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Now that we have switched to system fonts the
headings appear too bold. Reducing the font
weight to account for the font family changes.
Change-Id: I6b16040343e56d9f595170203e03a377c665585f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262277
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Source files and directories can be displayed even if the unit is not
redistributable, since this is technical information about the unit.
There is no way of knowing whether a README doesn't exist because the
file isn't there, or if it was removed because the unit is not
redistributable.
As a result, the message informing users that a unit is not
redistributable should only be displayed if a documentation section
would be present otherwise.
Change-Id: Ia702a5090a8693da24ccffd5a1be040072fe188e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262100
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
CanShowDetails is always true, except for licenses. In that case,
redirect users to the main page, instead of showing them an empty
licenses tab.
CanShowDetails and TabSettings.AlwaysShowDetails are longer needed.
Change-Id: I6a3630c38dcaa36c8f5105e410ba5ea70ec8d4c5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262099
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
UnitContentName will only ever be "Main". Instead, hardcode in the text
to be displayed in the template.
Change-Id: Ia26bbc729191f8debb041114c1110b0c3e840dcf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/262098
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Logic for rendering the main unit page (which is not shared with other
tabs) is factored out into a fetchMainPage function and MainDetails
struct. This means that GetUnit and GetImportedBy are no longer
called unnecessarily when fetching data for non-main page tabs.
Data for MainDetails is now stored on UnitPage.Details, as is the case
with other tabs. A couple of fields are added/changed:
* LastCommitTime is renamed to CommitTime, since they mean the same thing
and the latter is less verbose.
* IsPackage is added, which is used to determine whether a documentation
section should be shown, even if the documentation is empty.
* NumImports is added, which is used to display the number of imports
for given package.
UnitPage.Unit is changed to a UnitMeta type, since other fields on Unit
are no longer needed and UnitMeta is more explicit.
Change-Id: I7d5f4de867678c60d697fe9559416f3171f2d15c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261721
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
UnitPage.PackageDetails is renamed to UnitPage.Details, since the
details are not necessarily always for a package.
Change-Id: I151377a59a5515bcc2115489408d497cb9a86789
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261998
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Instead of computing the page type using .Unit methods, use the already
computed page type in these templates.
Change-Id: I7b724b7ca64027aa6a2defbc6d806f6afaa1e095
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261719
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Rather than computing the page type name in the template, use the actual
display name as the value of the page type consts.
This allows us to render pageTypes directly in the templates.
Change-Id: I5de0e165fd96db92afeb066e0f237bc4159f6724
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261718
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Removes Google fonts in favor of system fonts to
improve readability and page load performance.
Fixesgolang/go#40959
Change-Id: Ib462d609de70699cff602f751593bcbd38cfeb48
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261501
Trust: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Updates the styles on the "go to main page" link on
the metadata pages. Keeps header height consistent
between page navigation.
Change-Id: I1f1a5032df03d082db4b070d6ec035297c24fac5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261503
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The Standard library page is no longer labeled as module, and all stdlib
packages are labeled with the "stdlib" label.
pageInfo is refactored and split into pageTitle, pageType, and
pageLabels.
Change-Id: I59cec2e05de01b6c0b191e428e8229fc95d67b2e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259999
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Updates styles for main page sections to fix
target link click. This makes sure the content
appears below the fixed header when target links
are clicked.
Change-Id: Icfb97f00d82aeb3b46e30cae0b379249453f6e96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261500
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Show only fetches in progress on the worker home page.
Change-Id: If0d963bffa4edb80199e817a38d7e89530fedd31
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260938
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Fixes issue where a single item in a nav group
like Index > Examples looks cluttered.
Change-Id: Icf9103c4f6e7b57339df7187ca593f4ef604367f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260727
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The empty alt text indicates to assistive technologies
that the image is decorative and can be ignored.
Change-Id: Ia48bdfe613c25bc178f2c0c1f6c6969340f9eb0d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260726
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds the path to the copy button tooltip to
make explicit what is being copied.
Change-Id: Ie2bc1c6832f86351156699bb85b97384e702bb7a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260725
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
CanonicalURLPath was incorrectly using requested version.
This change updates CanonicalURLPath and replaces it with
URLPath where requested version is needed.
Change-Id: Ie624c91c258d7ec87e8d3fd61c5b339612904a5b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260721
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
Disables the jump to modal from opening when documentation
does not exist for the current page.
Change-Id: Ic67019003ae4adc9482a67a72f2f077eadb0363d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260720
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
This change modifies the script used to generate github styles to save
to a separate css file while converting the px values to rem. Note
thatthe generated styles is formatted properly after run with prettier.
Change-Id: I860e4512a5ff281a6d53210293cb310d5c5e074c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258257
Trust: Miguel Acero <acero@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The top level sections now have anchor links in the format of
#section-<headingName>.
Change-Id: I9813e8ab226f3696ae09378ba3b560525664bfc1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259958
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
The size of h4s is increased, so that functions and types are displayed
at a more readable size.
Change-Id: I48df1bcfe4d319b0a3ae78f4ab89185525d08a17
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259624
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
The directories section is refactored to display content using the new
NestedModule and Subdirectory structs, rather than the old
createDirectory.
The path prefix is now trimmed from nested modules. For example,
golang.org/x/tools/gopls is displayed as "module gopls" on the
golang.org/x/tools page, instead of "module golang.org/x/gopls".
Change-Id: I6e1a160bec42055c78d566e6ed4bc14d542bbfd3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259319
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Creates accordion controller for use in the left sidebar.
Collapses and expands top level sidenav sections.
Change-Id: I11122b96a10241d55e125515b5b8ccb41f27c461
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259629
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Moves the generated github styles into its own "readme.css" file. This
is preparing for the next CL that will generate changes for the
readme.css file.
Change-Id: Ic9f617695030129334b2eb9a47cb74a982576748
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257697
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Miguel Acero <acero@google.com>
Hides the expand icon on the left of outline sections for functions,
types, and notes when the sections are empty. Adds anchor links to the
functions, types, and notes sections. Collapses inactive sections when
a new section is focussed. The file sidenav.js is copied into
legacy_sidenav.js.
Change-Id: I637cdc867c7d1b4aee941f12c09f061fdef070f7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259446
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
The play button now shows an icon to indicate that clicking that button
will take the user to an external site.
Change-Id: I92c0f13ee22f1f04ae12196d0d656f8ec088ffcb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259214
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The header is updated so that a single link to the license tab is shown,
instead of a separate anchor link to each license.
Change-Id: Ib6b2d948f96227805e73816c0cc1108eea1ca8a5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259213
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
"Standard library" is also cased with a lowercase "library" throughout
the site. Previously, some parts of the site displayed "Standard
Library".
Change-Id: I41e1ff411f19ebd592991c39edaed68534cf8dc1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259205
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Adds JS to update the active sidebar section on page load
and adds event listeners to update the active section on
selection.
Change-Id: Ib5a8948089cf1981d8a3097183bf9f85659e49da
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259202
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Updates unit page count to use db.GetImportedBy for data. This will report
incorrect numbers when using proxy datasource.
Change-Id: Ie5b0004f3ef7a00436cb6cddfb030f263cdacbe8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259197
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
An initial version of the source files section is added to the unit
page. The content for this section should be present, but needs to be
styled in a future CL accordingly to spec.
Change-Id: I398bcd3052048567e5c3a9695427afc3a85a0731
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259005
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Changes jump to input to button in sidebar to
account for keyboard navigation. Prevents modal
from opening on element focus.
Change-Id: I79515cae0338d0e0dcfadde70193346c47e5e434
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258526
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Makes right sidebar scroll with the rest of the
documentation page.
Change-Id: I9f433f4f8d8542e2db29482938e3aecfbf1c9246
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258287
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
To understand worker behavior better, add more information
the worker home page.
- The name of the pod (hostname), so we can know which pod we're
looking at.
- More memory statistics, to understand why workers restart.
- Information about all the fetches in progess, and finished within
the last minute.
Change-Id: I38098069f5e03166971e67ad53a64c539ef8b5cf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/258017
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Drop all empty sections. Use airplane gopher image with a empty
message for packages without documentation.
Change-Id: I35e8d074b96b9b218799f4e4139ea3662a73eb62
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257975
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Updates the copy in the back link on metadata pages.
Change-Id: I6e938e88f440f39261fdb3b6c240648d7988329d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257970
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds jump to identifier element to the right sidebar.
Focusing on the element will open the jump to modal.
Change-Id: I0dc49d0d5fd93b7f1e4c85f0960cffe03fbb1df8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257661
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Updates the class selector in jump.js to use a js specific class.
Classes used in js to select elements should have the js prefix.
Change-Id: I6481b29c14fa9da11ccdaa76842919283a25fe39
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257657
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds a navigation element to return to
the unit page from package data pages.
Change-Id: I704e60e37ae587365c3713b448260944c384f34b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257140
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds package details data to unit struct and
render pages for versions, licenses, imports
and imported by tabs.
Change-Id: I38ce022bd7ea4a2df53310f3d2dd631fcca020ce
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256879
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Gather information about the current cgroup, which
is the implementation of a docker container.
Move all the memory functions to a separate file.
Reduce the display values to the ones that seem to be the most
meaningful.
Change-Id: Ifad13d96750356b6343a65d4945314029e092567
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256519
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Creates new files for unit fixed header ui
in preparation for future changes that diverge
from the existing fixed nav. Contains no code changes
outside of renamed css classes.
Change-Id: I450565deea86d88bb10c580f840d0cdd59c5c683
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256540
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
Adds css to unhide the doc index on the unit page and
an index link in the sidenav that is hidden on the
package details page.
Change-Id: Ieffe1368aaa1fc7cfcd4250359279b94d18a500b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256537
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds the seperated sidenav and mobile nav to unit page.
Change-Id: Iae960e4ff103591d101b6300ccdf70a05d575fe5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256039
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
If the experiments come from a config file, they can't be dynamically
updated. So remove the update form on the worker home page.
Change-Id: I1a6dda10570aa7e08b0392af593dfcc6b44cfa91
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/256517
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Instead of using globals, put all loadshedding state
into a struct.
Also, generalize the names so they're not zip-specific.
This CL address Rob's comments on https://golang.org/cl/c/pkgsite/+/255759/6.
Change-Id: I2200ec45bfc9b2d3dc82aa62b4eb211849d9d9ca
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255979
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Keep track of load-shedding statistics.
Display them on the worker home page, along
with various memory statistics that help
to understand the worker's memory usage.
Change-Id: I6582ffbd2be5c0f4c6c6d1750f489a77922b0ffb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255977
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Update comment that points to an incorrect path to the correct one.
Change-Id: Ie7c923cec5afe9c195b71ff8a33c542e1d2816da
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255962
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Julie Qiu <julie@golang.org>
Trust: Miguel Acero <acero@google.com>
Run-TryBot: Miguel Acero <acero@google.com>
Adds the initial unit page port of the fixed nav and restructures
the unit page template to match design requirements.
Change-Id: I49eac0bb3fe5809a5e755b8c7ee925dafdfeb2e0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255598
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Creates the html template for the directories section of the unit page.
Change-Id: Ie52a432096d0b7eec9ff6a6b06581954cce92485
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255041
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Creates the html template for the documentation section of the unit page.
Change-Id: I2d87a1d577b785829441f9e3621a021c442fd01a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255022
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Creates the html template for the new readme. Part of a series of
changes related to the new unit page.
Change-Id: Idbddcd00837aaa399d64aff4ef897d8dd75d0136
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/254842
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
In addition to providing a frontend fetch button, link to the manual
way to add a package.
Fixesgolang/go#41347
Change-Id: Iaf767e0cff773ddb9f099067d6bc11e2d6fd25e7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255097
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
This reverts commit dd6f8882c0.
Reason for revert: these classes are still being used
Change-Id: I996d02b1f4c318f4eb2e1b1710e3492314196eda
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/255024
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Previously, requests to pkg.go.dev/<path> were redirected to
pkg.go.dev/<path>?tab=doc.
The behavior is now the opposite: requests to pkg.go.dev/<path>?tab=doc
will redirect to pkg.go.dev/<path>. Requests to pkg.go.dev/<path>
will stay there.
Additionally, requests to pkg.go.dev/<path> will always show the
documentation tab, regardless of whether the package is redistributable.
Previously, users were shown the overview tab when a package is not
redistributable.
Fixesgolang/go#37351
Change-Id: Ic7ccbbb840cf04511d419f06eb7fb40ac57f68be
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/254745
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This is partial implementation of the site redesign. Implements
the new header behind the "unit-page" feature.
Change-Id: I5fdd5c55bb9a9257311f9fd35bafbfab1ea7b7f0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253738
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
This change adds the HTML and CSS changes for the subdirectories
template to include nested modules in the table with a modules badge.
This includes adding a --light-blue CSS variable to reflect the blue
background of the modules badge.
This change also deletes the _directories.tmpl helper template so that
iterating through the packages and nested modules in the HTML table is a
lot clearer.
before/after images: https://photos.app.goo.gl/2reDtNHxThVnDMiL9
Updates golang/go#38596
Change-Id: Id1dad1ba3a28881a203bf90afe1d5372ede2317c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/254019
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
content/static/css is moved to devtools/cmd/css (pure code in motion).
Change-Id: I7b48bf017edffb1b4c3c571ed44bac7e09e37918
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253608
Reviewed-by: Jamal Carvalho <jamal@golang.org>
This change replaces display: none; with display: flex; to enable
executable examples in in the documentation page. The HTML changes used
for this CSS change requires the executable-examples feature flag.
Updates golang/go#36865
Change-Id: I2cb62438663ecbfbccfe1f5b4b6b1e2dbe3e3916
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253599
Reviewed-by: Julie Qiu <julie@golang.org>
Adds a handler to capture rejected promises and
report them to Google Analytics.
For golang/go#40958
Change-Id: Ic0a48d03acbe238bedb2b4eeac7dfb31a8e26d25
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253597
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Adds a handler to catch unhandled exceptions and report them to
Google Analytics.
Updates golang/go#40958
Change-Id: I9d9a501da4fea2e95a36809535b234a7d2537f02
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251918
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Adds the web vitals script built from source to track web vitals metrics
with Google Tag Manager. This will give us more insight into how pkgsite
is performing in the wild and allow us to track changes in performance
before and after the redesign.
Updates golang/go#40958
Change-Id: Ieba237150b6a7056b5dee57911432678bb914b19
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251537
Reviewed-by: Andrew Bonventre <andybons@golang.org>
VersionStats is a relatively costly query, and can cause it the worker
homepage to take a long time to load. This data is moved to the
/versions page instead to reduce latency on the main worker page.
Change-Id: I7273d8244185a2df94b101d2f48174102f2d23de
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/252357
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
With the inclusion of the latest major version function, this commit
changes current "latestversion" naming to "latestminorversion" in the
latestversion middleware to specify the difference between both
functions.
Updates golang/go#37765
Change-Id: I1c4d8edf6ac30431ef1278abaa334d96cd459258
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251083
Reviewed-by: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
This change includes auto expand functionality for examples in
playground.js which is included with the executable-examples feature
flag. This includes:
When users click on an example href that links to an example, the
example will be auto expanded as such:
before example link: https://i.imgur.com/7fSa3E9.gif
after example link: https://i.imgur.com/4dQ4UWO.gif
When a user navigates to a pkg.go.dev url with an example hash (i.e:
?tab=doc#example-AtomicLevel), the example is auto exapnded.
before hash change: https://i.imgur.com/luKw5uo.gif
after hash change: https://i.imgur.com/mzUl33F.gif
Updates golang/go#37520
Change-Id: I6cba5ea979ed516bcdb753eee92eecec7839c2f4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250467
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
- Fix link to task queue: the URL now includes a location ID
- Remove reference to "etl"
Change-Id: Iaa95e1821afde929e93202dc667fd54b5fd27b54
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/250097
Reviewed-by: Julie Qiu <julie@golang.org>
Add the iframe that loads Google Tag Manager when JS is disabled.
It doesn't need a nonce.
Fixesgolang/go#40321.
Change-Id: I93871833c55aa41185cf5d1c2d5a759937fe79b7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/245557
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This change places the side navigation flush left and allows the
documentation to expand to fill the rest of the page. The
documentation container has a maximum width of 60rem (960px)
and is flush left in the main container when it can no longer
expand.
Also moves tab name strings into constants and documents the
fields on the basePage struct.
Updates golang/go#40612Fixesgolang/go#40557
Change-Id: Ia1be6ffb04d6c8819371ad12f56e133e2167d2fd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/248857
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
The address bar URL will be updated to be the canonical url of package.
Canonical url includes the module version in address bar.
Fixesgolang/go#36807
Change-Id: I4a6f9737ff7e112ebf1d093b2eebe2af311fb0c6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/239179
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>