tektoncd / website

Tekton Website
https://tekton.dev
Apache License 2.0
62 stars 149 forks source link

Header shows undefined when selecting an LTS release #504

Closed AlanGreene closed 1 year ago

AlanGreene commented 1 year ago

Expected Behavior

The version dropdown should show the selected version in the header.

See for example with Pipelines v0.43.x image

Header displays the selected version.

Actual Behavior

Select an LTS release and the header shows undefined instead of the version. image

Steps to Reproduce the Problem

  1. Go to https://tekton.dev/vault/pipelines-v0.41.x-lts/

Additional Info

AlanGreene commented 1 year ago

Most likely happening here: https://github.com/tektoncd/website/blob/58dda28aff6a206884189c069291292a592e2ca6/templates/version-switcher.js.template#L99 and https://github.com/tektoncd/website/blob/58dda28aff6a206884189c069291292a592e2ca6/templates/version-switcher.js.template#L107

It would have versionName as v0.41.x which doesn't match the displayName v0.41.x LTS

Any concerns with switching to a prefix match instead?

afrittoli commented 1 year ago

Sounds good to me, thank you @AlanGreene