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

Update some US edition navlinks so that they don't redirect #27062

Merged
merged 3 commits into from
Apr 22, 2024
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
31 changes: 20 additions & 11 deletions common/app/navigation/NavLinks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ object NavLinks {
/* NEWS */
val science = NavLink("Science", "/science")
val tech = NavLink("Tech", "/technology")
val usTech = NavLink("Tech", "/us/technology")
val politics = NavLink("UK politics", "/politics")
val media = NavLink("Media", "/media")
val globalDevelopment = NavLink("Global development", "/global-development")
Expand Down Expand Up @@ -80,15 +81,23 @@ object NavLinks {
val auEnvironment = ukEnvironment.copy(children =
List(climateCrisis, energy, wildlife, biodiversity, oceans, pollution, greatBarrierReef),
)
val usEnvironment = ukEnvironment.copy(children = List(climateCrisis, wildlife, energy, pollution, greenLight))

val usEnvironment =
NavLink("Environment", "/environment", children = List(climateCrisis, wildlife, energy, pollution, greenLight))

val money = NavLink("Money", "/money", children = List(property, pensions, savings, borrowing, careers))
val ukBusiness = NavLink(
"Business",
"/business",
children = List(economics, banking, money, markets, projectSyndicate, businessToBusiness, retail),
)
val usBusiness =
ukBusiness.copy(children = List(economics, diversityEquality, smallBusiness, retail))

val usBusiness = NavLink(
"Business",
"/us/business",
children = List(economics, diversityEquality, smallBusiness, retail),
)

val auBusiness = ukBusiness.copy(children = List(markets, money, projectSyndicate, retail))

/* OPINION */
Expand Down Expand Up @@ -122,9 +131,9 @@ object NavLinks {
footballClubs,
),
)
val soccer = NavLink(
val usSoccer = NavLink(
title = "Soccer",
url = "/soccer",
url = "/us/soccer",
children = List(
footballScores,
footballTables,
Expand Down Expand Up @@ -187,7 +196,7 @@ object NavLinks {
val ukTravel = NavLink("Travel", "/travel", children = List(travelUk, travelEurope, travelUs))
val usTravel = ukTravel.copy(children = List(travelUs, travelEurope, travelUk))
val auTravel = ukTravel.copy(children = List(travelAustralasia, travelAsia, travelUk, travelEurope, travelUs))
val wellness = NavLink("Wellness", "/wellness")
val usWellness = NavLink("Wellness", "/us/wellness")

val todaysPaper = NavLink(
"Today's paper",
Expand Down Expand Up @@ -308,12 +317,12 @@ object NavLinks {
world,
usEnvironment,
ukraine,
soccer,
usSoccer,
usBusiness,
tech,
usTech,
science,
newsletters,
wellness,
usWellness,
),
)
val intNewsPillar = ukNewsPillar.copy(
Expand Down Expand Up @@ -409,7 +418,7 @@ object NavLinks {
)
val usSportPillar = ukSportPillar.copy(
children = List(
soccer,
usSoccer,
NFL,
tennis,
MLB,
Expand Down Expand Up @@ -522,7 +531,7 @@ object NavLinks {
)
val usLifestylePillar = ukLifestylePillar.copy(
children = List(
wellness,
usWellness,
fashion,
food,
recipes,
Expand Down
12 changes: 6 additions & 6 deletions common/test/resources/reference-navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@
},
{
"title": "Soccer",
"url": "/soccer",
"url": "/us/soccer",
arelra marked this conversation as resolved.
Show resolved Hide resolved
"children": [
{
"title": "Live scores",
Expand Down Expand Up @@ -1176,7 +1176,7 @@
},
{
"title": "Business",
"url": "/business",
"url": "/us/business",
"children": [
{
"title": "Economics",
Expand Down Expand Up @@ -1207,7 +1207,7 @@
},
{
"title": "Tech",
"url": "/technology",
"url": "/us/technology",
"children": [],
"classList": []
},
Expand All @@ -1225,7 +1225,7 @@
},
{
"title": "Wellness",
"url": "/wellness",
"url": "/us/wellness",
"children": [],
"classList": []
}
Expand Down Expand Up @@ -1279,7 +1279,7 @@
"children": [
{
"title": "Soccer",
"url": "/soccer",
"url": "/us/soccer",
"children": [
{
"title": "Live scores",
Expand Down Expand Up @@ -1442,7 +1442,7 @@
"children": [
{
"title": "Wellness",
"url": "/wellness",
"url": "/us/wellness",
"children": [],
"classList": []
},
Expand Down
Loading