From 2ba237e3fa6c7c7669e1f62ea3ffc42638e208c3 Mon Sep 17 00:00:00 2001 From: Ioanna Kokkini Date: Thu, 18 Apr 2024 12:12:22 +0100 Subject: [PATCH 1/3] Update some US edition navlinks so that they don't redirect This is a temporary change requested by the SEO team in the US. It's part of a larger work to redesign the navbar so that it doesn't contain links that redirect: https://github.com/guardian/dotcom-rendering/issues/11193. Until we complete this the team has asked us to update only the following links: These URLs in the US subnav -- https://www.theguardian.com/business https://www.theguardian.com/environment https://www.theguardian.com/soccer https://www.theguardian.com/technology https://www.theguardian.com/wellness Updated to their /us/ versions -- https://www.theguardian.com/us/business https://www.theguardian.com/us/environment https://www.theguardian.com/us/soccer https://www.theguardian.com/us/technology https://www.theguardian.com/us/wellness --- common/app/navigation/NavLinks.scala | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/common/app/navigation/NavLinks.scala b/common/app/navigation/NavLinks.scala index 11bbd455f4a..973fe55da8e 100644 --- a/common/app/navigation/NavLinks.scala +++ b/common/app/navigation/NavLinks.scala @@ -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") @@ -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 */ @@ -124,7 +133,7 @@ object NavLinks { ) val soccer = NavLink( title = "Soccer", - url = "/soccer", + url = "/us/soccer", children = List( footballScores, footballTables, @@ -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 wellness = NavLink("Wellness", "/us/wellness") val todaysPaper = NavLink( "Today's paper", @@ -310,7 +319,7 @@ object NavLinks { ukraine, soccer, usBusiness, - tech, + usTech, science, newsletters, wellness, From f5da90eb23dcce148bb99db70999ce13788894a5 Mon Sep 17 00:00:00 2001 From: Ioanna Kokkini Date: Thu, 18 Apr 2024 12:41:43 +0100 Subject: [PATCH 2/3] Update reference-navigation.json --- common/test/resources/reference-navigation.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/test/resources/reference-navigation.json b/common/test/resources/reference-navigation.json index 76d27cb5674..a7afa56f20d 100644 --- a/common/test/resources/reference-navigation.json +++ b/common/test/resources/reference-navigation.json @@ -1127,7 +1127,7 @@ }, { "title": "Soccer", - "url": "/soccer", + "url": "/us/soccer", "children": [ { "title": "Live scores", @@ -1176,7 +1176,7 @@ }, { "title": "Business", - "url": "/business", + "url": "/us/business", "children": [ { "title": "Economics", @@ -1207,7 +1207,7 @@ }, { "title": "Tech", - "url": "/technology", + "url": "/us/technology", "children": [], "classList": [] }, @@ -1225,7 +1225,7 @@ }, { "title": "Wellness", - "url": "/wellness", + "url": "/us/wellness", "children": [], "classList": [] } @@ -1279,7 +1279,7 @@ "children": [ { "title": "Soccer", - "url": "/soccer", + "url": "/us/soccer", "children": [ { "title": "Live scores", @@ -1442,7 +1442,7 @@ "children": [ { "title": "Wellness", - "url": "/wellness", + "url": "/us/wellness", "children": [], "classList": [] }, From 498ca5da68dd1ba2c5a2a5c1bc6af12e1304a0c1 Mon Sep 17 00:00:00 2001 From: Ravi <7014230+arelra@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:57:57 +0100 Subject: [PATCH 3/3] Add US prefix to US links Co-authored-by: Ioanna Kokkini --- common/app/navigation/NavLinks.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/app/navigation/NavLinks.scala b/common/app/navigation/NavLinks.scala index 973fe55da8e..afcba09a12d 100644 --- a/common/app/navigation/NavLinks.scala +++ b/common/app/navigation/NavLinks.scala @@ -131,7 +131,7 @@ object NavLinks { footballClubs, ), ) - val soccer = NavLink( + val usSoccer = NavLink( title = "Soccer", url = "/us/soccer", children = List( @@ -196,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", "/us/wellness") + val usWellness = NavLink("Wellness", "/us/wellness") val todaysPaper = NavLink( "Today's paper", @@ -317,12 +317,12 @@ object NavLinks { world, usEnvironment, ukraine, - soccer, + usSoccer, usBusiness, usTech, science, newsletters, - wellness, + usWellness, ), ) val intNewsPillar = ukNewsPillar.copy( @@ -418,7 +418,7 @@ object NavLinks { ) val usSportPillar = ukSportPillar.copy( children = List( - soccer, + usSoccer, NFL, tennis, MLB, @@ -531,7 +531,7 @@ object NavLinks { ) val usLifestylePillar = ukLifestylePillar.copy( children = List( - wellness, + usWellness, fashion, food, recipes,