Git Product home page Git Product logo

Comments (3)

generalmimon avatar generalmimon commented on June 7, 2024 1

@usta @captn3m0 Um, I may be missing something obvious at the moment, but why exactly are we letting the stupid machine reorder our releases (and often screw it up) in the first place?

I see that the sorting was introduced in #42, which references issue #25. And @captn3m0 writes this in the initial issue comment #25 (comment):

It makes sense to sort by release date (in desc order
so newer releases are at the top).

(...)

Since releases are a map currently, it is hard to sort them.

This is no longer relevant, because releases are lists now, not maps. See just about any product page source:

releases:
- releaseCycle: "3.10"
eol: 2026-10-04
latest: "3.10.7"
latestReleaseDate: 2022-09-05
releaseDate: 2021-10-04
- releaseCycle: "3.9"
eol: 2025-10-05
latest: "3.9.14"
latestReleaseDate: 2022-09-06
releaseDate: 2020-10-05
- releaseCycle: "3.8"

Lists in YAML are guaranteed to preserve order, so the sorting is not needed - if you don't sort it, it will always have exactly the same order in which you specify individual releases.

So I really think we should drop this entire | sort thing here:

{% assign sorted_releases = page.releases | sort: page.sortReleasesBy | reverse %}
{% for r in sorted_releases %}

and just {% for r in page.releases %}. By doing this, we finally put trust into humans that they know in what order they want releases to be displayed.

from endoflife.date.

captn3m0 avatar captn3m0 commented on June 7, 2024

The sort_natural filter doesn't work, so perhaps we need a sort_version filter of our own.

from endoflife.date.

captn3m0 avatar captn3m0 commented on June 7, 2024

I like this idea, would clean up the code as well.

from endoflife.date.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.