Skip to content

feat: Display Latest Release on Homepage #329

@VaclavElias

Description

@VaclavElias

Description

As a viewer, I would like to see the minor version or latest release displayed on the homepage. This feature would provide clear evidence that development is active, without requiring users to navigate to the GitHub repository.

Requirements

  • Toggleable Feature (internally): The release display should be possible to switch on or off.
  • Dynamic Data Loading: Utilize the GitHub API to fetch the latest version and release date.
  • Asynchronous Loading: Use JavaScript to asynchronously load this data so that it does not block other content on the website and eliminates the need to rebuild the site when the Stride version changes.

Proposed HTML Snippet

<p class="text-light small">
  Latest release: version 4.2.0.2374, released on 20 February 2024.
</p>
<p class="text-light small">Latest release: <span id="stride-version">Loading...</span></p>

AI Generated Example

  // Fetch latest Stride version from GitHub API
  async function fetchLatestVersion() {
    try {
      const response = await fetch('https://api.github.com/repos/stride3d/stride/releases/latest');
      const data = await response.json();
      const version = data.tag_name;
      const releaseDate = new Date(data.published_at).toLocaleDateString();
      document.getElementById('stride-version').innerText = `Version ${version}, released on ${releaseDate}`;
    } catch (error) {
      console.error('Failed to fetch latest version:', error);
      document.getElementById('stride-version').innerText = 'Version information unavailable';
    }
  }

  fetchLatestVersion();
Image

Benefits:

  • Improves user experience by providing transparency about the engine's development status.
  • Reduces the need for manual updates to the website when new versions are released.
  • Enhances the perception of active development and community engagement.

Additional Notes:

  • The feature should be optional and configurable (e.g., via a settings toggle).
  • Ensure the GitHub API call is rate-limited or cached to avoid excessive requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentWebsite text contentdesignDesign mattersjavascriptPull requests that update Javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions