Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add version select capability for v2.0 (main branch) #1617

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

M00nF1sh
Copy link
Collaborator

@M00nF1sh M00nF1sh commented Nov 4, 2020

We add a version selector based on MDC-select component.
sample: https://m00nf1sh.github.io/aws-load-balancer-controller/v2.0/

solves #1595, #1559

The logic works as below:

  1. on page load, it loads versions.json and parse versions within it.
  2. for each version, a list item for such version will be added into dom.
  3. list item for current selected version will be mark as selected, we use below logic to decide:
    1. we injected a baseURL data-attribute into the versionSelect, which allow us decide the base for specific version, e.g. https://domain/path/version/
    2. we parse current version from https://domain/path/version/
    3. if current version matches the list item's version or list item's version's aliases, it's selected.
  4. on selection change, we redirect page to correct version

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kishorj, M00nF1sh
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@M00nF1sh M00nF1sh merged commit cf5f89d into kubernetes-sigs:main Nov 4, 2020
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants