Skip to content

Commit

Permalink
Merge pull request #27062 from guardian/update-us-fronts-to-not-redirect
Browse files Browse the repository at this point in the history
Update some US edition navlinks so that they don't redirect
  • Loading branch information
arelra authored Apr 22, 2024
2 parents 143a35c + 498ca5d commit 79ee005
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
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",
"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

0 comments on commit 79ee005

Please sign in to comment.