tektoncd / website

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

Add release selector to docs #516

Closed geriom closed 1 year ago

geriom commented 1 year ago

Changes

Preview with Nightly and LTS
Screenshot from 2023-02-23 13-46-45
Preview with only Latest
Screenshot from 2023-02-23 13-47-30
Preview for docs outside components
Screenshot from 2023-02-23 13-47-50

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

See the contribution guide for more details.

AlanGreene commented 1 year ago

I'm not sure if displaying the docs for main by default makes sense. The corresponding code may not yet be available in an official release and I don't think we want to encourage users to install development / nightly builds by default.

I think the default experience for users should be to see the docs for the latest official release of each project, with an option to switch to main if they wish.

afrittoli commented 1 year ago

I'm not sure if displaying the docs for main by default makes sense. The corresponding code may not yet be available in an official release and I don't think we want to encourage users to install development / nightly builds by default.

I think the default experience for users should be to see the docs for the latest official release of each project, with an option to switch to main if they wish.

This is indeed the reason why main was not first in the config. I switched the configs from being tag based to branch based so that it is possible to add doc fixes onto branches and get them displayed on the website with no need for a new release on the project side.

geriom commented 1 year ago

Thank you @afrittoli @AlanGreene for the feedback. I'll update the PR to point to the latest release and instead have the nightly release as a link.

I'm not 100% sure "Nightly release" is the right name for all the repos. Any other ideas?

geriom commented 1 year ago

PR description and title updated. Now it defaults to the latest release, with links to nightly (repo main) and LTS if available.

@AlanGreene @afrittoli please take a look.

AlanGreene commented 1 year ago

Seems like there's a problem when the latest release is an LTS release.

  1. Go to https://deploy-preview-516--tekton.netlify.app/docs/dashboard/
  2. See expected switcher image
  3. Click 'Go to latest LTS release'
  4. image

This is not reproducible on main as there's already a newer Dashboard release (0.33) but can be reproduced by removing that (or Pipelines 0.45) from the config so the latest release is LTS.

geriom commented 1 year ago

This is not reproducible on main as there's already a newer Dashboard release (0.33) but can be reproduced by removing that (or Pipelines 0.45) from the config so the latest release is LTS.

Makes sense, because if the latest and LTS are the same, the corresponding folder in vault doesn't exist. A matter of checking and updating the link.

Another case of "it works on my machine" because I had cached files from the previous versions of this PR. Thank you for the thorough testing.

This should be fixed now. Please take another look.

tekton-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlanGreene

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/website/blob/main/OWNERS)~~ [AlanGreene] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
afrittoli commented 1 year ago

As a follow-up, it would be nice to have the same header while in vault too ! Thanks for this! /lgtm