content: delete unit-sidebar-details and unused experiments
There are several unused experiments in the templates that have been
fully rolled out and are now deleted.
Change-Id: I603c5e56c24406f718b02e68109b46c347657a75
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/283258
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
diff --git a/content/static/html/base.tmpl b/content/static/html/base.tmpl
index 1af51b1..dbed2b0 100644
--- a/content/static/html/base.tmpl
+++ b/content/static/html/base.tmpl
@@ -21,7 +21,7 @@
<link href="/third_party/dialog-polyfill/dialog-polyfill.css?version={{.AppVersionLabel}}" rel="stylesheet">
<title>{{if .HTMLTitle}}{{.HTMLTitle}} · {{end}}pkg.go.dev</title>
{{block "pre_content" .}}{{end}}
-<body class="Site{{if .AllowWideContent}} Site--wide{{end}}{{if (.Experiments.IsActive "unit-page")}} Site--redesign{{end}}">
+<body class="Site{{if .AllowWideContent}} Site--wide{{end}} Site--redesign">
<header class="Site-header Site-header--dark">
<div class="Banner">
<div class="Banner-inner">
@@ -87,11 +87,7 @@
</aside>
<div class="NavigationDrawer-scrim js-scrim" role="presentation">
</div>
-{{if (.Experiments.IsActive "unit-page")}}
- <div class="Site-content">{{block "main_content" .}}{{end}}</div>
-{{else}}
- <main class="Site-content">{{block "main_content" .}}{{end}}</main>
-{{end}}
+<div class="Site-content">{{block "main_content" .}}{{end}}</div>
<footer class="Site-footer">
{{block "pre_footer" .}}{{end}}
<div class="Footer">
diff --git a/content/static/html/helpers/_unit_meta.tmpl b/content/static/html/helpers/_unit_meta.tmpl
index 73a8c5c..07d438f 100644
--- a/content/static/html/helpers/_unit_meta.tmpl
+++ b/content/static/html/helpers/_unit_meta.tmpl
@@ -5,9 +5,7 @@
-->
{{define "unit_meta"}}
- {{if (.Experiments.IsActive "unit-sidebar-details")}}
- {{template "unit_meta_details" .}}
- {{end}}
+ {{template "unit_meta_details" .}}
<div class="UnitMeta">
<div class="UnitMeta-header">Repository</div>
{{if .Details.RepositoryURL}}
diff --git a/content/static/html/pages/search.tmpl b/content/static/html/pages/search.tmpl
index 45bd5c1..a15d8f8 100644
--- a/content/static/html/pages/search.tmpl
+++ b/content/static/html/pages/search.tmpl
@@ -19,11 +19,7 @@
<img class="SearchResults-emptyContentGopher" src="/static/img/gopher-airplane.svg" alt="The Go Gopher">
<h3 class="SearchResults-emptyContentMessage">No results found.</h3>
<p class="SearchResults-emptyContentMessage">
- {{if (.Experiments.IsActive "frontend-fetch")}}
- If you think “{{.Query}}” is a valid package or module, you could try downloading it by visiting <a href="https://pkg.go.dev/{{.Query}}">pkg.go.dev/{{.Query}}</a>.
- {{else}}
- If you think “{{.Query}}” is a valid package, you could try downloading it following the <a href="/about#adding-a-package">instructions here</a>.
- {{end}}
+ If you think “{{.Query}}” is a valid package or module, you could try downloading it by visiting <a href="https://pkg.go.dev/{{.Query}}">pkg.go.dev/{{.Query}}</a>.
</p>
</div>
{{else}}
diff --git a/internal/experiment.go b/internal/experiment.go
index 7a8de4c..0c0d8c4 100644
--- a/internal/experiment.go
+++ b/internal/experiment.go
@@ -6,15 +6,13 @@
package internal
const (
- ExperimentNotAtLatest = "not-at-latest"
- ExperimentUnitSidebarDetails = "unit-sidebar-details"
+ ExperimentNotAtLatest = "not-at-latest"
)
// Experiments represents all of the active experiments in the codebase and
// a description of each experiment.
var Experiments = map[string]string{
- ExperimentNotAtLatest: "Enable the display of a 'not at latest' badge.",
- ExperimentUnitSidebarDetails: "Enable the details section in the right sidebar.",
+ ExperimentNotAtLatest: "Enable the display of a 'not at latest' badge.",
}
// Experiment holds data associated with an experimental feature for frontend