A script is added to create an experiment.yaml file which will enable
all experiments.
Documentation on how to enable experiments is consolidated in
experiment.md. Instructions on how to use this script is added.
Change-Id: I46dc75a5f84d3100b8ecb45453f803afab5c19af
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/264757
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>
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>
Experiments are now managed via a YAML config file.
Change-Id: I8c70e14bcbdcf3372994b80b1fa420fcbc5232f0
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/259839
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Package documentation is added to devtools/cmd/css and the css filepath is fixed since being moved from content/static/css.
Change-Id: I4f12513a26c273e605a57c8101a1ed06f72e1b23
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253609
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>
Several packages were missing package documentation, which is now added.
Change-Id: I1a88ebebaee0fddeb5a7bb9e2573375ad887c311
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253607
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
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>
This change implements the latest designs for the site header,
adds a new fixed header to details pages, and updates to the
latest Closure Compiler Docker image tag to support an API used
by the new fixed header implementation (ResizeObserver).
The global header is no longer sticky, but on the details page
a hybrid header that shows a combination of the header content
and details tabs is displayed when the inline tab list goes out
of view.
Both the inline and fixed tab lists are responsive in that the
elements are pushed to an overflow container when they can no
longer fit on screen. A native <select> tag is used for this to
avoid implementing a popup menu (perhaps that can be done in a
future change).
The mechanism used to copy the current path to the clipboard has
also been updated to avoid hacks that didn’t play well with
screen readers. This method does not work on iOS, but a message
is displayed to the user in that case.
Fixesgolang/go#37110
Change-Id: I2b8b73d7e85c122992b106e9b89d7e207be9f099
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/245400
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
This change creates a badge generation tool page for package authors. A future change will add
documenation of this feature and a link to the about page.
Fixesgolang/go#36982
Change-Id: Ia64ba9db73ed92b853f1f955330caf93d996da91
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241273
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Users can now remove experiments using the experiment devtool.
Change-Id: I02e2a2b10686271f4b63cd40cdfac6eea28878ae
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241602
Reviewed-by: Jonathan Amsterdam <jba@google.com>
There's no reason to use a hard-coded name when running postgres in the
CI script (and in fact, that's why we're storing the resulting container
name in a variable).
Change-Id: I9db408fac8c02f07d038240afed5d17ead9bbefe
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241738
Reviewed-by: Julie Qiu <julie@golang.org>
For simplicity, add a new script that runs all.bash CI using Docker
only. This will facilitate hooking into Kokoro (a Google internal CI
runner).
Change-Id: I2faa6190e6ecc35a2b2dc9151f173dc07f80d9b5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/241603
Reviewed-by: Julie Qiu <julie@golang.org>
Experiments are renamed to be shorter, so that they are easier to type
in query params and when inserting into the database.
Descriptions are added for each experiment, which will be used when
inserting an experiment with the script in
devtools/cmd/experiment/experiment.go.
Change-Id: Ie3f6ba05dbe075c899fc09f139c9b9fc93f7650d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240944
Reviewed-by: Jonathan Amsterdam <jba@google.com>
A script is added to add/update/list experiments.
Change-Id: I9fa306ab102a4ac458ee93f5751b43b9999db4c5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240948
Reviewed-by: Jonathan Amsterdam <jba@google.com>
The frontend fetch UI is updated with a styled button, and loading dots
to indicate that a fetch request is in progress.
The Fetch API is now used instead of AJAX to make requests.
Updates golang/go#36811
Updates golang/go#37002
Change-Id: Ia37113dd9976f8e147875371c099f7b2bfd4bd85
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240459
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Report any scripts that will change dynamically due to a template
expansion. CSP hashing can't support scripts like that, because the
contents and therefore the hash will change on each execution.
Change-Id: I975859a59c8f5d19bcd0ffc5dad1e5068a380587
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240500
Reviewed-by: Julie Qiu <julie@golang.org>
Add a tool that checks the script hashes used
for our Content Security Policy (CSP).
Run the tool from all.bash.
(Also, prettier decided to change CONTRIBUTING.md.)
Fixes b/159711607.
Change-Id: I4498a19143c53fb90bcf0560ccaf529f4fb72a81
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/240138
Reviewed-by: Julie Qiu <julie@golang.org>
+ Load all JavaScript files at the end of the page so that DOM
parsing won’t be blocked by script execution.
+ Extract out Google Tag Manager script tag and place init logic in
a separate file instead of using an inscrutable, minified inline
script.
+ Add the JavaScript compilation script.
+ Update license headers to have a range so that multiple licenses
are not included in the minified source when only the date is
different.
+ Update the prettier config to avoid arrow parentheses unless they
are needed to match existing style.
Change-Id: I7331ee7fab04eb2ff45b5f59928b3e5817d35813
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/752822
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-by: Alexander Rakoczy <rakoczy@google.com>