Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: Fix incorrect sorting of self-hosted versions on a select menu DOCS-516 - #1618

Merged
nicklem merged 8 commits into
masterfrom
fix/dropdown-menu-sorting-DOCS-516
Feb 10, 2023
Merged

nicklem merged 8 commits into
masterfrom
fix/dropdown-menu-sorting-DOCS-516

Conversation

@nicklem

@nicklem nicklem commented Feb 7, 2023

Copy link
Copy Markdown
Contributor

The ordering logic that sorts self-hosted versions on the version select dropdown breaks for numbers >= 10, causing the well-known and wrong sorting 1, 10, 2, 3, 4, ...

image

❗ Note to reviewers

  • In production, the dropdown is populated dynamically using data pulled from https://docs.codacy.com/versions.json. This doesn't work when previewing, since the versions.json endpoint returns 404.
  • I've therefore committed versions.json as test data to populate the dropdown in the preview.
  • This, in turn, causes some console errors as the JS tries to fetch and process the sitemaps of other versions (which are also not available on the preview). You can therefore ignore those console errors.

👀 Live preview

https://fix-dropdown-menu-sorting-docs-516--docs-codacy.netlify.app/

🚧 To do

  • Remove test data before merging.

@nicklem
nicklem requested a review from a team as a code owner February 7, 2023 10:16
@github-actions
github-actions Bot temporarily deployed to Netlify February 7, 2023 10:19 Inactive
@nicklem
nicklem requested a review from a team February 7, 2023 10:30
@github-actions
github-actions Bot temporarily deployed to Netlify February 7, 2023 14:16 Inactive
Comment thread docs/assets/javascripts/version-select.js
Comment thread docs/assets/javascripts/version-select.js Outdated
Comment thread docs/assets/javascripts/version-select.js Outdated
Comment thread docs/assets/javascripts/version-select.js Outdated
nicklem and others added 2 commits February 9, 2023 09:51
Co-authored-by: Inês Gomes <[email protected]>
Co-authored-by: Inês Gomes <[email protected]>
@github-actions
github-actions Bot temporarily deployed to Netlify February 9, 2023 08:54 Inactive
@github-actions
github-actions Bot temporarily deployed to Netlify February 9, 2023 09:02 Inactive
@github-actions
github-actions Bot temporarily deployed to Netlify February 9, 2023 09:09 Inactive
@nicklem
nicklem enabled auto-merge (squash) February 10, 2023 09:44
@github-actions
github-actions Bot temporarily deployed to Netlify February 10, 2023 09:45 Inactive
@nicklem
nicklem force-pushed the fix/dropdown-menu-sorting-DOCS-516 branch from f73aa48 to 4b55f41 Compare February 10, 2023 09:49
@github-actions
github-actions Bot temporarily deployed to Netlify February 10, 2023 09:51 Inactive
@nicklem
nicklem merged commit 63ccb95 into master Feb 10, 2023
@nicklem
nicklem deleted the fix/dropdown-menu-sorting-DOCS-516 branch February 10, 2023 09:54
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
prcr pushed a commit that referenced this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants