bbc / simorgh

The BBC's Open Source Web Application. Contributions welcome! Used on some of our biggest websites, e.g.
https://www.bbc.com/pidgin
Other
1.42k stars 227 forks source link

Fix brand links for services with variants #12192

Closed amoore108 closed 1 week ago

amoore108 commented 1 week ago

Overall changes

Testing

  1. Visit http://localhost:7080/serbian/cyr/srbija-68707945?renderer_env=live
  2. Hover over the brand logo and confirm the URL is /serbian/cyr
  3. Click the link and confirm it takes you to /serbian/cyr
  4. Visit http://localhost:7080/serbian/lat/srbija-68707945?renderer_env=live
  5. Hover over the brand logo and confirm the URL is /serbian/lat
  6. Click the link and confirm it takes you to /serbian/lat

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

amoore108 commented 1 week ago

Do we need to add logic in to handle Uzbek?

E.g. if I visit http://localhost:7080/uzbek/articles/cwyxvn9dd52o/cyr?renderer_env=live and I hover over the brand then I see http://localhost:7080/uzbek/cyr - which I don't think we have support for yet on live.

Good point. I tested Uzbek with a CPS asset but not Optimo, so yea I'll add some temporary logic for Uzbek until we release the variant homepages.