Code in motion. To continue to serve the legacy unit page
while the new layout experiment is deactivated, copying the
assets into the new static directory.
Change-Id: I99d450d91403e2ba6d5f0df9a086fe7576e91087
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327410
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>
There are several places where we need to compute the latency
measurement for recording an opencensus measurement.
A dcensus.Latency function is added so that
we can ensure latency is being calculated in the same way for all
measurements.
Change-Id: Ic138f29106f88c9c468084816d8856e47bbd7cc2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247359
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>
Web assets are being reorganized in the pattern
content/<service>(/<domain>)/<file> to make the structure of
the web services and our component based development pattern
easier to understand.
New shared assets will go into content/shared grouped by
component.
Templates used to generate package docs moves to content/doc.
Assets used in the frontend move to content/frontend grouped by
by page.
Assets used in the worker move to content/worker.
In slightly more detail the final result will look like:
static/doc
body.tmpl
outline.tmpl
...
static/frontend
/badge
/homepage
...
/unit
/versions
/main
...
static/shared
/breadcrumb
/button
/typography
...
static/worker
worker.css
worker.ts
...
Code in motion. The frontend still reads from content/static.
Change-Id: I03dc39bfd3c94ff8d749a2c8e440b201276c40ba
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327295
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Limit testing and linting to content/static directory
temporarily before copying frontend assets into a new
folder structure. This will prevent errors while transitioning
and be undone in a later CL.
Change-Id: I4f1629be42ebbe2813586f321e394b7f862ce3d6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327294
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>
Applying the fix from CL 326349 to the new playground
module.
Change-Id: I8174d62b44b164a1e1b161ed60d87f61f17ec3c9
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327292
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The old image file contained excess whitespace.
Switching to the cropped image and adusting styles
fit the new image size.
Change-Id: Idd0a3603192c5bd70c64c605746eb451afb21ae3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327290
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 internal kokoro build.sh currently runs the following:
devtools/ci/ci.sh
devtools/ci/nodejs.sh npm install --quiet
devtools/ci/nodejs.sh npm run lint
devtools/ci/nodejs.sh npm run test
devtools/ci/e2e.sh
Rather than having multiple files referenced in the internal kokoro
file, moving these tests to ci.sh. That way it is more opaque what we
are running in CI, and easier to add/remove files and comment out lines
for testing.
devtools/ci/nodejs.sh will be deleted in a future CL once it has been
removed from the internal build.sh.
Change-Id: I397a5d5cd2efb59da7a771617330f70b980911b0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326970
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>
A copy of devtools/ci/nodejs.sh is made to devtools/nodejs.sh, and the
latter is now referenced where devtools/ci/nodejs.sh was previously used.
This makes it easier to comment out tests when testing configuration
changes to kokoro.
Also, since the contents of ./devtools/nodejs.sh are used in non-ci
parts of the repo, so it makes sense to have that script outside the ci/
folder.
In a future CL, rather than having these 3 lines in the kokoro config:
devtools/ci/nodejs.sh npm install --quiet
devtools/ci/nodejs.sh npm run lint
devtools/ci/nodejs.sh npm run test
They will be moved to devtools/ci/nodejs.sh, which will use
devtools/nodejs.sh.
Change-Id: I156324a625666ead31be18ae19e5608d38e0faf1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326989
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
The contents of this file was empty when added in CL 326649.
Change-Id: I0ee29544e6b0747befc10553a2800e15608861cc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326969
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
InMemory.WaitForTesting was waiting for the set of workers to be
empty, but that's not quite the same as the queue being empty: all the
workers can finish momentarily before a new one starts up.
Wait for the queue itself to be empty.
Change-Id: Icf0e970fdb2f45aa30c358c9d4af1083442a0293
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327109
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 snapshots to include minor layout shifts
caused by the new base stylesheet.
Change-Id: I12aff0e4ea9e4f9fdd507db56dec37bfb209fc4b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326814
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>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
basepage.HTMLTitle is changed from "Licenses" to "License Policy" for
consistency with the templates.
In a future CL, basePage.HTMLTitle should be removed.
Change-Id: If20e8e42518ca2ef957023c91905dee626ed7d96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326770
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
A setup is added using docker-compose, which allows us to run e2e tests
locally and in CI.
As of this CL, e2e/basic.test.ts can be run locally using
`./e2e/docker/run.sh e2e/basic.test.ts`.
Change-Id: Ief17c51ed7ab7de9cc8c535a7061f18d75763ecd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326649
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>
Adds title and description to the legacy and new layout
unit pages. MetaDescription is updated to be the synopsis
of the documentation page.
Change-Id: Ie214229fa61075b75bb69d0eadb8060906da2519
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326812
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Switching color usage to color intents as a prerequisite
for dark mode.
Change-Id: Id958ba13cecfd7c07d88e4b331750bf270007bcc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326810
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
The title for the search page should be "<query> - Search Results", not
"Search Help · pkg.go.dev" which was previously overriding the former
title.
Change-Id: Ieb38c5dd8fd771e6cd0a71edf5a2e801cc74429c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326769
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Trust: Julie Qiu <julie@golang.org>
Rather than using github.com/golang/* for the golang.org/* repos, use
cs.googlesource.com/go when available.
Change-Id: I88acf4c1316b160b0852ef954a515276e92ad975
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326190
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Only .ts files in content/static/js were checked in CI for
type safety. Changing the tsconfig file to check all .ts
files in content/static and fixing existing type warnings.
Change-Id: I7187156124fed4aaf138d8afe3aa02891b4c7e4a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326710
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>
Replace two of the three deleted tests.
The third deleted test was for git.pirl.io. That site is currently
unreachable and we haven't seen a module from it since March, so I'm
assuming it's offline.
Fixesgolang/go#46676
Change-Id: Ib0fcc8f58eeda938dbdf90199185c1424e34613a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326670
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>
Read from the imports table instead of package_imports, under an
experiment.
Change-Id: Id5b61285325f28a168faeb25651839663269feaf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326450
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>
The TransactSerializable test flaked about one time in fifty.
Retry it to deflake.
Now it doesn't fail even with -count 1000 on my machine.
Change-Id: I61e1f115dfe479d12f848dc4596572804cbbc19c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326451
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Write a package's import paths to the new imports table
as well as the existing package_imports table.
Change-Id: Ie0afe5aa90e79e8371a51cc6fc5f68de3dc62cd8
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326449
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>
Adjusting the padding around the outline
ensures that the keyboard focus indicator
is visible when items in the nav are tabbed
into.
Change-Id: Ie796dcba0bb0169eedc8089051a1bd449c5362db
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326354
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>
Increasing line heights to improve legibility on
the documentation pages.
Change-Id: I52c29a8d03c8f36aa6a82fc61a88e79760155059
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326352
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
The imports page already has sufficient space between
the header and the title. Removing the excess margin
to match the rest of the unit pages.
Change-Id: Iffd37c4ea08d88197b47d73a8345ed7a0c4353e4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326353
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
The accented icon filter is adjusted to match the
color of links.
Change-Id: I980c7a423c4107d4fe9ff541c50a55f27344203e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326351
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Now that we remove titles of the readme with changes from
CL 309393 the special case we selectively rendered text
content in headings, in which a heading contains a badge,
is unlikely to occur.
README headings my contain code blocks, images with alt
text, or other content. Removing the selective rendering
of header content will lead to a more consistent and predictable
README outline.
Fixesgolang/go#46550
Change-Id: Ia6f41b6fa776694f4a9d6b032e24763d1e6b4613
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326350
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Runs npm and npx commands by default using the
docker helper script instead of the local install.
This will keep everyone synced on the nodejs version
and CI current with our local setup.
You can override this by setting GO_DISCOVERY_NPM_CMD=npm
and GO_DISCOVERY_NPX_CMD=npx to use your locally installed
binaries.
Change-Id: I08841e372d995229eb9ceba328c4a17e2f4c420c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326549
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Jamal Carvalho <jamal@golang.org>
Pinning the nodejs image to the long term support
version and adding pseudo-tty to fix warning in CI.
Change-Id: Idd283029b0667a673b7f8f4844c7e92a605edb3b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326550
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>
We have a metric for total unprocessed modules, including new ones and
those we are reprocessing.
Add a metric that tracks only the new ones: those with status 0 or 500
(the latter to count the number of failed new modules).
This metric is a better choice for an alert, since during reprocessing
we expect a very large total backlog, but we never want a large
backlog of new modules.
Change-Id: Ibc3cbee1d867f6a454748237352a70cf9eb500c0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326290
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>
A script is added which can be used to seed a database with modules.
Change-Id: I322cb6a5919f04cc9c75fca0ea2e23a91c01639e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/325749
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>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Templates for the doc have moved to content/static/dochtml.
Change-Id: Ia61a4eddc6c1abcc3e557809194979006a86ffed
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326058
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>