Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on navigation to Interop 2025 #4229

Merged
merged 9 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions webapp/components/interop-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// The JSON file is used by some Mozilla infrastructure, so the file should
// not be deleted and should match the data in this file.
export const interopData = {
'valid_years': ['2021', '2022', '2023', '2024'],
'valid_mobile_years': ['2024'],
'valid_years': ['2021', '2022', '2023', '2024', '2025'],
'valid_mobile_years': ['2024', '2025'],
'2021': {
'table_sections': [
{
Expand Down
2 changes: 1 addition & 1 deletion webapp/components/wpt-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class WPTHeader extends WPTFlags(PolymerElement) {
<!-- TODO: handle onclick with wpt-results.navigate if available -->
<a href="/">Latest Run</a>
<a href="/runs">Recent Runs</a>
<a href="/interop">&#10024;Interop 2024&#10024;</a>
<a href="/interop">&#10024;Interop 2025&#10024;</a>
<a href="/insights">Insights</a>
<template is="dom-if" if="[[processorTab]]">
<a href="/status">Processor</a>
Expand Down
6 changes: 3 additions & 3 deletions webapp/interop_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ type interopData struct {
}

// Set of years that are valid for Interop 20XX.
var validYears = map[string]bool{"2021": true, "2022": true, "2023": true, "2024": true}
var validMobileYears = map[string]bool{"2024": true}
var validYears = map[string]bool{"2021": true, "2022": true, "2023": true, "2024": true, "2025": true}
var validMobileYears = map[string]bool{"2024": true, "2025": true}

// Year that any invalid year will redirect to.
// TODO(danielrsmith): Change this redirect for next year's interop page.
const defaultRedirectYear = "2024"
const defaultRedirectYear = "2025"

// interopHandler handles GET requests to /interop-20XX and /compat20XX
func interopHandler(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions webapp/interop_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestInteropHandler_redirect(t *testing.T) {
loc, err := resp.Location()
assert.Nil(t, err)
// Check that the path has been properly updated to the current interop effort.
assert.Equal(t, loc.Path, "/interop-2024")
assert.Equal(t, loc.Path, "/interop-2025")
// Check if embedded param is maintained after redirect.
assert.Equal(t, loc.RawQuery, "embedded")
}
Expand All @@ -56,7 +56,7 @@ func TestInteropHandler_redirectMobile(t *testing.T) {
loc, err := resp.Location()
assert.Nil(t, err)
// Check that the path has been properly updated to the current interop effort.
assert.Equal(t, loc.Path, "/interop-2024")
assert.Equal(t, loc.Path, "/interop-2025")
// Check if mobileView param is maintained after redirect.
assert.Equal(t, loc.RawQuery, "mobile-view")
}
Expand All @@ -77,7 +77,7 @@ func TestInteropHandler_redirectdefault(t *testing.T) {
loc, err := resp.Location()
assert.Nil(t, err)
// Check that the path has been properly updated to the current interop effort.
assert.Equal(t, loc.Path, "/interop-2024")
assert.Equal(t, loc.Path, "/interop-2025")
// Check if embedded param is maintained after redirect.
assert.Equal(t, loc.RawQuery, "embedded")
}
Expand Down
4 changes: 2 additions & 2 deletions webapp/static/interop-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"valid_years": ["2021", "2022", "2023", "2024"],
"valid_mobile_years": ["2024"],
"valid_years": ["2021", "2022", "2023", "2024", "2025"],
"valid_mobile_years": ["2024", "2025"],
"2021": {
"table_sections": [
{
Expand Down