Speedcubing-Canada / speedcubing-canada-web

https://speedcubingcanada.org
2 stars 3 forks source link

Home not always highlighted in nav bar #36

Open kr-matthews opened 1 year ago

kr-matthews commented 1 year ago

If you visit https://www.speedcubingcanada.org/en (or https://www.speedcubingcanada.org/fr) without a trailing / then the home option in the nav bar isn't highlighted. It's only highlighted at https://www.speedcubingcanada.org/en/ (and https://www.speedcubingcanada.org/fr/). https://www.speedcubingcanada.org/, and any non-existing urls, redirect to the home url without the trailing /, so this comes up a lot.

JonEsparaz commented 1 year ago

Also, https://www.speedcubingcanada.org/en/organization/ will highlight Home instead of Organization.

Probably worth our first set of unit tests to check this behaviour when a patch is made (can be a separate contribution, I can do the tests myself or provide details on the testing framework).

JonEsparaz commented 10 months ago

I'll get this fixed once #54 is merged. Hopefully we can make the localization logic less convoluted overall, but we'll see.