Граф коммитов

3379 Коммитов

Автор SHA1 Сообщение Дата
Julie Qiu 754bc2ca63 internal/{frontend,postgres}: add GetSymbolHistory
postgres.GetPackageSymbol and symbol.IntroducedHistory are factored into
a single GetSymbolHistory function, in preparation for optimizing this
logic.

For golang/go#37102

Change-Id: I04f726ae6f9731ee2e099b47e414aeaef90d5779
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/312049
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-21 19:14:31 +00:00
Julie Qiu 8185298a14 internal/postgres: remove do-not-insert-new-documentation
Change-Id: I4b5e4b4e6556f6f724dd01c08b7014c30b10a2b3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310313
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>
2021-04-21 19:14:16 +00:00
Jonathan Amsterdam 3b55c14936 internal/godoc: don't render doc on worker
The Package.Render method is only used on the worker to get the
synopsis and other doc-related information. Ever since we started
rendering doc on the frontend, the worker has ignored the rendered
documentation.

So stop rendering the doc, and rename the method to DocInfo to reflect
that.

One minor consequence is that we no longer flag packages with
excessively large doc as having a bad status. As far as the worker is
concerned, they are fine; the error will manifest on the frontend (and
we will serve a "documentation too large" page). This is all good: we
only used a distinct status in this case so we could reprocess if our
limits changed, but these modules no longer need reprocessing.

For golang/go#40850

Change-Id: I3c7c49f0beb7a6d8a37daabdce75f83ef108eddb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/312270
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>
2021-04-21 15:40:50 +00:00
Jamal Carvalho 16c4ace13c e2e: standardize and rename test cases
Code in motion.

The file names for the snapshots were long and
repeated a lot of words. Simpler test layouts
and a standardized naming convention will make
the snapshots easier to identify and the tests more
consistent across files.

A test's filename already contains the name of the
page referenced in the enclosed tests. The snapshot
filenames are test filename concatenated with the
describe and test block names they appear within.
Having the outer describe block is redundant for tests
like homepage.ts.

Similar tests that diverge between mobile and
desktop have the suffix (mobile) and (desktop).
Tests runs can target test cases by regex. This
will make it easier to run tests for a specific
page layout.

Change-Id: I8dbd706cd017a07b8a35be9155d15ac8aab95fdd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/312090
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-04-20 22:00:06 +00:00
Jamal Carvalho 13a365b694 e2e: additional unit details snapshot tests
Adds snapshot tests for various features on the unit page.
- accessibility tree
- readme expand and collapse
- directories expand and collapse
- jump to without identifiers
- jump to identifier
- documentation outline

Change-Id: I491b6305fb09923ed65db4db87622e9452a06420
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311970
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-04-20 21:46:40 +00:00
Julie Qiu 36b26e4957 internal/postgres: invoke middleware.ElapsedStat
middleware.ElapsedStat wasn't being called on GetVersionsForPath and
GetPackageSymbols, which is now fixed.

Change-Id: Ie6b9003eca509448a4bb2e5aa127ca1f32777ab5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311929
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-20 21:01:45 +00:00
Julie Qiu 66b562dfe2 internal: add do-not-insert-new-documentation to tests
All tests that affect the documentation table are updated so that
experiment do-not-insert-new-documentation is active.

Change-Id: I3672a7b18e50bc1cbe4820efe0e6e13ff9687596
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310811
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
2021-04-20 19:37:48 +00:00
Julie Qiu d77f6fa981 migrations: swap in new documentation table
Tests will break for this CL, because the tables have changed but tests
are still reading from new_documentation. Tests will pass once
CL 310313 has been merged, which should be merged at the same time as
this CL.

Change-Id: I260ef5b5812a6d7c081a3f3b67e1d4778c557920
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310376
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-20 19:37:14 +00:00
Jamal Carvalho 298adfcf61 cmd,internal/frontend: remove legacy playground code
Now that interactive playgrounds have been rolled out
the legacy code can be removed.

Change-Id: I6bab20a24364ba996197ac4bc4553c779e4fab1d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311849
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-04-20 17:14:51 +00:00
Julie Qiu 893cc2b71a internal/frontend: add additional stats in serveUnitPage stack
Change-Id: I17c9eb093e9e5728477ab0b39c748cc5923d8590
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311629
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>
2021-04-19 22:54:32 +00:00
Jamal Carvalho 7990825ab6 e2e: add check for page errors
Added an event listener for any uncaught exceptions
and asserted in tests that no exceptions occur.

Change-Id: I719687e21135ccd0c1d6613a472084cd7bd9b84e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311377
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>
2021-04-19 19:38:47 +00:00
Jamal Carvalho 4daebb9770 content/static: switch logo png to svg and remove lazy load
Switching the Google logo png for the svg gives us
a 90% file size reduction. Removing lazy-load
attribute will lead to less flaky tests and is not
necessary now that we are using an svg logo.

Change-Id: Idb1a983dcb79d71f0e1cb6a55bd1e0f7734ac886
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311470
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>
2021-04-19 19:38:26 +00:00
Jonathan Amsterdam 5d8e7d49a9 package-lock.json: update
Change-Id: I6af384c9190041b04fecbe950a0796d7c3ec6738
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311449
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>
2021-04-19 19:20:03 +00:00
Julie Qiu cf19af9784 internal/postgres: add stats for GetPackageSymbols
Change-Id: I05ce3fa7415e0d114b3d9241352992487b830e8c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311430
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>
2021-04-19 18:32:40 +00:00
Julie Qiu 26982222eb internal/postgres: add stats for GetUnit and GetUnitMeta
Additional stats are added to GetUnit and GetUnitMeta to debug latency
issues.

Change-Id: I07abb3191af2e5802670390029f148fa78863679
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311429
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>
2021-04-19 18:32:29 +00:00
Jamal Carvalho f934b63075 doc: update frontend docs
Updated frontend docs to reflect changes to npm scripts
and e2e test config.

Change-Id: I4b4b675dc3ff6d17d31db441c2854c05890edc0a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311409
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-04-19 17:52:17 +00:00
Jamal Carvalho a938b4543a e2e: update unit details snapshots
The unit page was updated to strip the protocol
from the repository url.

Change-Id: I6b2019211c51ec2373f9caa8393689081c7cb93a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311374
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>
2021-04-19 15:59:09 +00:00
Jamal Carvalho 45f2ff2970 devtools,e2e: update docker run flags
Adds the --rm flag to automatically clean up
docker containers after script runs. Removes
the -it flag for docker_nodejs as it causes
an error in CI.

Change-Id: If8cae56bc9dbe691ff216053e222b43e5591623a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311373
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jamal Carvalho <jamal@golang.org>
2021-04-19 15:58:58 +00:00
Jamal Carvalho 4a59031e85 all.bash: switch npm to run_npm in scripts
Using run_npm instead of npm directly in bash scripts.
This will default to local npm when available but use
docker-ized npm when the npm command is not found on
the host machine.

Change-Id: I08c0e69c5f18a29059eaf4787bc03d8eba99562b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311349
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>
2021-04-19 15:58:46 +00:00
Jamal Carvalho 5bcad7d5c0 e2e: refactor tests to improve performance
Refactors some tests to reuse page contexts. This
speeds up the overall test run by about 25%.

Change-Id: Id3e16d4b82c19119a1767788f4c9520e59c779af
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311310
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-19 13:50:11 +00:00
Jamal Carvalho d461afa5f1 all.bash: remove obsolete bash scripts
Change-Id: Ic3686f67bcf853241a11b1bbb2b2f8bf164ec5df
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311229
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>
2021-04-19 13:49:37 +00:00
Jamal Carvalho c24d9db582 e2e: use base url to match pkgsite request
Use BASE_URL to detect when a request should be
modified to include the authorization header.
This prevents an issue where BASE_URL might be
discovery.appspot.com instead of pkg.go.dev.

Change-Id: I508a041b631e6be593ae36bb8b3a36bbf6285bcd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310532
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>
2021-04-19 13:49:24 +00:00
Jamal Carvalho 9bcbe5a0f9 e2e: add unit page tests and test stubs
Adds visual tests and test stubs for the unit page.

Change-Id: I1e7eb1df23390e4e54bf32ebde54ca15a7adfdfa
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310932
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>
2021-04-19 13:48:32 +00:00
Jamal Carvalho 1a3d58024b e2e: update search visual tests
The content on the search page varies too much to
have a stable test. Updates the spec to replace
variable content with constant values limiting
the test to layout and style checks only.

Change-Id: I107c925c99fbeeaf3325975420d32a23fd3b343b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310931
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-19 13:48:23 +00:00
Jamal Carvalho 49190e2a4a e2e: add and update basic snapshot tests
Updates golden images for badge, error, fetch, license policy
and search help visual tests.

Change-Id: Ibf68aff7a03568d65af33506594621cf3d2590ae
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310930
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>
2021-04-19 13:47:38 +00:00
Jamal Carvalho 51c067f992 devtools,e2e: remove legacy e2e config
Remove unused config files and obsolete tests.

Change-Id: Ia99baf9a328be31327b1783768be27e686e82946
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310929
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>
2021-04-19 13:47:22 +00:00
Jonathan Amsterdam b6b1be2cd5 internal/licenses: tweak BSD-3 exceptions
To accommodate a few licenses, we had a copy of the entire BSD.lre
file from licensecheck with two minor tweaks. This caused scanner
creation time to go from about 2 seconds to about 8 seconds.

The first of these tweaks is no longer applicable (I checked with the
entire contents of the prod DB).

The second arose from a single license, the LICENSE file in
github.com/ThePiachu/Golang-Koblitz-elliptic-curve-DSA-library, and
various forks and copies of it.

I made this license and minor variants its own LRE file and removed
BSD.lre.

We still accept the same licenses, and now scanner creation time is
back around 2 seconds.

Change-Id: Icc4af86744c5842ff03e4ca524943244f7b9b9a1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311029
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-04-19 13:46:48 +00:00
Jonathan Amsterdam c975b30b23 internal/frontend: cosmetic tweaks to stripScheme and its test
Change-Id: Id402444e267e471acd0ace13640225325d3a35ff
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/311309
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>
2021-04-19 13:44:39 +00:00
Aleksei Tirman 06dca04425 x/pkgsite: remove protocol from source code links
A new template function for stripping scheme from URL applied to repository
URL in the Details block.

Fixes golang/go#40943

Change-Id: Ie767e90c3763e8792544b5df62ce79a5cf00374f
GitHub-Last-Rev: a2b0ca2c73
GitHub-Pull-Request: golang/pkgsite#26
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310229
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-19 12:42:07 +00:00
Jamal Carvalho 594a8c609d e2e: update snapshot test config
The e2e tests will prefer a locally installed npm binary and
use a prebuilt headless chrome docker image. This will speed up
test runs for devs with npm installed but still leave the option
to opt out of installing node directly on the host machine.

Jest now uses a custom test environment that initializes global
variables, starts chrome, and adds authorization headers to
requests.

Change-Id: Ie43952ada6fd3e4df0fd522c84691186ef0d7f80
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310314
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-04-17 00:41:41 +00:00
Julie Qiu cd563e35d8 internal/postgres: add exp to getDocIDsForPath
ExperimentDoNotInsertNewDocumentation is added to getDocIDsForPath, so
that we can deprecate new_documentation in a future CL.

Change-Id: I53b35d4e629974c70aec43ed0b4f124d46085dd6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310312
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>
2021-04-16 21:12:53 +00:00
Jamal Carvalho 89d278373e content/static: fix unit directories module badge
Change-Id: I2a281ac821778b38df02d232a4ffcb76f76a8e8c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310381
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>
2021-04-16 20:31:37 +00:00
Julie Qiu 6db4e92ce5 internal/postgres: delete insert-symbols
Change-Id: I654b4b6186d49a9a8a83874747ab5ee9d909fe9a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310380
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>
2021-04-16 19:00:33 +00:00
Julie Qiu 200b17f85e internal: delete unused WithSymbols fieldset
Change-Id: I0441003b053a096364d2a1458c69b5ebc81ce375
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310379
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>
2021-04-16 16:21:02 +00:00
Julie Qiu 9f9e4bc7ca internal: add experiment do-not-insert-new-documentation
We want to rename new_documentation to documentation, and drop the
current documentation table.

INSERTs into new_documentation are added as a first step.

Change-Id: I2f4038890436946b2c140c108faa4740e16abe4e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310375
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>
2021-04-16 02:35:07 +00:00
Julie Qiu c2da062d1d internal/postgres: filter symbols versions
GetPackageSymbols no longer returns incompatible or non-release
versions.

For golang/go#37102

Change-Id: Ifc906e3bf8236707f0f2d29bd5aa1dc825412297
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310377
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>
2021-04-16 02:34:47 +00:00
Jamal Carvalho dc646e6466 content/static: update colors to match style guide
Change-Id: I5d576a2c8e0f68f31ec0097d2064ccb6ab02aa96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310132
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-04-15 21:04:44 +00:00
Julie Qiu 72f143e102 content: remove utm_source=pkggodev
When redirecting from pkg.go.dev to beta.pkg.go.dev, a utm_source is
added to the URL. This is now removed in removeUTMSource.

Change-Id: Iae4f7cfe4c6356672a6a6916d182e9c68e342132
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310129
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>
2021-04-15 19:17:25 +00:00
Jamal Carvalho 217d00dcf6 content/static: add readme outline to mobile nav
Adds top level readme outline headings
to the mobile select dropdown nav.

For golang/go#43325

Change-Id: Ib2664838303e4b4bcbf54967253f10aa036706f3
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310372
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>
2021-04-15 17:33:59 +00:00
Jamal Carvalho 44ea98d5f5 content/static: move mobile outline container to frontend template
The container for the mobile outline was part of
a template used in the dochtml package making it
difficult to extend from the frontend. Limiting
the dochtml sidenav-mobile template to the minimum
necessary html will allow us to add the readme
headings to the mobile outline. This change moves
the non-dochtml html to a new file to do just that.

For golang/go#43325

Change-Id: Ieef429034e7082215bd2cdb75bbf88f30683cf96
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310371
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>
2021-04-15 17:33:30 +00:00
Jamal Carvalho 97a92f0ae7 stylelint: add color-hex-case rule
Change-Id: I3c8308a54aa49d829110ea4758e8299bab60d6bc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310373
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>
2021-04-15 16:57:02 +00:00
Jonathan Amsterdam 220d953306 migrations: drop modules.deprecated_comment
For golang/go#43265

Change-Id: I5885853463ed52915a7956e66bdfae9498ce90df
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309710
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>
2021-04-15 11:54:45 +00:00
Jamal Carvalho 6c2224a940 content/static: update empty message in jump to modal
Change-Id: I0efd36a203f094db922ae3ceeaa0d3fa658a6109
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310230
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>
2021-04-15 01:45:45 +00:00
Jamal Carvalho 52c38d2ae8 content/static: readme outline reflects heading structure from markdown
The structure of the headings in the readme is now reflected
in the readme outline up to three levels of depth.

For golang/go#43325

Change-Id: Iee639fea299e93bfd5223dac3a50b663ce0ca89b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310131
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-04-14 20:38:49 +00:00
Julie Qiu d8be50f33b content/static/css: align baseline for identifiers
The baseline for the identifier name and "add in <version" text are now
aligned.

Change-Id: I2995c8ab3942a8b333bdf7e9bc353d927460919d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310130
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-04-14 19:57:24 +00:00
Jamal Carvalho ba3c42a350 content/static: show message for pages with no jump to items
The Jump to modal does not contain any jump-able items
on pages without documentation symbols. We plan to explore
adding identifiers from the readme and directories sections
in future updates to the modal.

For golang/go#44718

Change-Id: I71ea5caf2aee1960dec41f89f86ce861f944242a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309489
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-14 19:51:20 +00:00
Jamal Carvalho df7a615b2a internal/frontend: extract nested table of contents from markdown
The processReadme function now returns a nested table
of contents extracted from the readme file based on
the hierarchy of headings in the document.

If the document has only a single top level heading
and that heading has children it is assumed to be a
title and removed from the table of contents.

For golang/go#43325

Change-Id: I5b67a7e356820477851e6c34493e2517f889b02f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309393
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>
2021-04-14 17:53:15 +00:00
Julie Qiu 12c70eaa04 content: fix deprecation bug
In the new versions page, the deprecation badge is always shown. It is
now only shown when the module is actually deprecated.

Change-Id: I21bb99f553a9161ee02ad329e137d823cd08722b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309829
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>
2021-04-13 19:21:36 +00:00
Julie Qiu de03279301 README.md: delete outdated roadmap section
Change-Id: I61201f7797e4f81080037f47f2ec8ea27453fdd4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309491
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-13 18:55:41 +00:00
Jonathan Amsterdam 103f9ede54 internal: remove unit-meta-with-latest experiment
For golang/go#43265

Change-Id: I1d056a893fdff60744ff328ab9f4a1b6665b3e32
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309709
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>
2021-04-13 18:23:35 +00:00