From eb92b4332b04443545189cffdcd397b4eac99016 Mon Sep 17 00:00:00 2001 From: Teetow Date: Thu, 16 Oct 2025 19:14:43 +0200 Subject: [PATCH] feat: consolidate prerelease downloads --- public/_redirects | 7 +- src/assets/data/audacityReleases.ts | 12 +- src/assets/data/promotions.ts | 4 +- src/components/footer/Footer.astro | 2 +- src/components/next/AlphaDetails.astro | 75 +++++++++++ src/components/next/BetaDetails.astro | 17 +++ src/layouts/BaseLayout.astro | 2 +- src/pages/download.astro | 2 +- src/pages/next.astro | 166 +++++++++++++++++++++++++ 9 files changed, 274 insertions(+), 13 deletions(-) create mode 100644 src/components/next/AlphaDetails.astro create mode 100644 src/components/next/BetaDetails.astro create mode 100644 src/pages/next.astro diff --git a/public/_redirects b/public/_redirects index 776f769..02cb2f2 100644 --- a/public/_redirects +++ b/public/_redirects @@ -19,7 +19,7 @@ /gitbook-access https://app.gitbook.com/invite/-MhmG2mhIIHTtQPuHV_k/acNI2LAF6LtdJW06t4Hc /devserver https://discord.gg/N3XKxzTrq3 /dev https://audacity.gitbook.io/dev/ -/nightly /beta +/nightly /next /au4win https://nightly.link/audacity/audacity/workflows/au4_build_windows/master /au4mac https://nightly.link/audacity/audacity/workflows/au4_build_macos/master /au4lin https://nightly.link/audacity/audacity/workflows/au4_build_linux/master @@ -29,6 +29,11 @@ /) / /vpat /VPAT.pdf +# prerelease +/au4 /next 301 +/alpha /next 301 +/beta /next 301 + # campaign links /survey https://docs.google.com/forms/d/e/1FAIpQLSd42XPhC69bKUA9kbYiTXboRLaj9Q11_BUEXTK0v0TzWJQmDQ/viewform?usp=dialog /audacitypromo https://www.youtube.com/watch?v=Lb7jx4wdXXE&mtm_campaign=audacityapp&mtm_content=welcomescreen_video diff --git a/src/assets/data/audacityReleases.ts b/src/assets/data/audacityReleases.ts index 40f6a99..f494811 100644 --- a/src/assets/data/audacityReleases.ts +++ b/src/assets/data/audacityReleases.ts @@ -13,8 +13,6 @@ export type ReleaseDirectory = { src?: ReleaseInfo[]; }; -export type ActivationState = "active" | "inactive"; - export const audacityReleases: ReleaseDirectory = { version: "3.7.5", win: [ @@ -149,7 +147,7 @@ export const hasDownloadAssets = (downloads?: ReleaseDirectory): boolean => { export type PreReleaseEntry = { id: string; label: string; - status: ActivationState; + isActive: boolean; summary: string; pageHref: string; downloads: ReleaseDirectory; @@ -158,10 +156,10 @@ export type PreReleaseEntry = { export const alphaPreRelease: PreReleaseEntry = { id: "alpha", label: "Alpha", - status: "active", + isActive: true, summary: "Get an early look at the next major release. Expect unfinished features and potential bugs.", - pageHref: "/au4", + pageHref: "/next", downloads: { version: "Audacity 4 Alpha 1", win: [ @@ -195,9 +193,9 @@ export const alphaPreRelease: PreReleaseEntry = { export const betaPreRelease: PreReleaseEntry = { id: "beta", label: "Beta", - status: "inactive", + isActive: false, summary: "Help us test upcoming features before they ship.", - pageHref: "/beta", + pageHref: "/next", downloads: { version: "3.5.0 beta", win: [ diff --git a/src/assets/data/promotions.ts b/src/assets/data/promotions.ts index 44e6b80..ef0db16 100644 --- a/src/assets/data/promotions.ts +++ b/src/assets/data/promotions.ts @@ -24,11 +24,11 @@ const promoData: Record = { audacity4Alpha: { isActive: true, priority: 50, - suppressOnPaths: ["/au4", "/download"], + suppressOnPaths: ["/next", "/download"], message: "Want a peek at our next big release?", cta: { text: "Try the Audacity 4 Alpha", - link: "/au4", + link: "/next", }, tracking: { category: "Promo CTA", diff --git a/src/components/footer/Footer.astro b/src/components/footer/Footer.astro index 10a8a45..2fb06bc 100644 --- a/src/components/footer/Footer.astro +++ b/src/components/footer/Footer.astro @@ -5,7 +5,7 @@ import { preReleaseList, } from "../../assets/data/audacityReleases"; const activeDownloadCampaign = preReleaseList.find((entry) => - entry.status === "active" && hasDownloadAssets(entry.downloads) + entry.isActive && hasDownloadAssets(entry.downloads) ) ?? null; const hasPreRelease = Boolean(activeDownloadCampaign); const activePreReleaseAriaLabel = hasPreRelease && activeDownloadCampaign diff --git a/src/components/next/AlphaDetails.astro b/src/components/next/AlphaDetails.astro new file mode 100644 index 0000000..cb15ba0 --- /dev/null +++ b/src/components/next/AlphaDetails.astro @@ -0,0 +1,75 @@ +--- +--- +
+

+ The purpose of this alpha build is to test the core features of Audacity 4 on a + wide selection of hardware and operating systems. +

+

+ If you experience severe issues or crashes, please file an issue on GitHub + (requires a free GitHub account). +

+ + +

What's implemented

+ +
    +
  • Recording and playback
  • +
  • Editing audio
  • +
  • Applying effects (destructive and real-time)
  • +
  • Exporting audio files
  • +
  • + Configuring and re-arranging the interface (including the new Workspaces + feature) +
  • +
+ +

A note on compatibility ⚠️

+

+ Projects saved in Audacity 4 are not backwards compatible. We recommend you make + a copy of your important projects before opening them in Audacity 4. +

+ +

Unimplemented features

+

+ Some yet-to-be finalized features might appear non-functional, or have been + excluded from Audacity's interface. These are features not yet ready for user + testing, and have been disabled. +

+
    +
  • Nyquist, LADSPA and VAMP and the OpenVINO plugins
  • +
  • Preferences from Audacity 3 are not carried over
  • +
  • Envelopes and label tracks
  • +
  • Spectrogram view and the spectral editing mode
  • +
  • Most built-in effects, including generators and analyzers
  • +
  • Opening multiple projects at the same time
  • +
+ +
+

Submit your feedback!

+

+ We're always eager to hear what you have to say, but it's especially important + we hear from you during this early phase. Please let us know what you think, + using the following places: +

+ +
+
diff --git a/src/components/next/BetaDetails.astro b/src/components/next/BetaDetails.astro new file mode 100644 index 0000000..a70bba7 --- /dev/null +++ b/src/components/next/BetaDetails.astro @@ -0,0 +1,17 @@ +--- +--- +
+

+ Download the latest beta build and help us test upcoming Audacity features. +

+

+ If you'd like to help us with testing, instructions can be found below. +

+ +
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 2d52f7d..bdb65ab 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -20,7 +20,7 @@ const { const isNoAdPage = Astro.request.url.includes("/post-download") || - Astro.request.url.includes("/au4"); + Astro.request.url.includes("/next"); const hasActiveStaticPromo = Object.values(promoData).some((promo) => { const isActive = promo.isActive ?? true; return isActive && Boolean(promo.cta); diff --git a/src/pages/download.astro b/src/pages/download.astro index a1922fd..f563cd2 100644 --- a/src/pages/download.astro +++ b/src/pages/download.astro @@ -14,7 +14,7 @@ const { version } = audacityReleases; const sourceDownloads = audacityReleases.src ?? []; const primarySourceDownload = sourceDownloads[0] ?? null; const activeDownloadEntries = preReleaseList.filter( - (entry) => entry.status === "active" && hasDownloadAssets(entry.downloads), + (entry) => entry.isActive && hasDownloadAssets(entry.downloads), ); const hasDownloadCampaigns = activeDownloadEntries.length > 0; diff --git a/src/pages/next.astro b/src/pages/next.astro new file mode 100644 index 0000000..7eb5025 --- /dev/null +++ b/src/pages/next.astro @@ -0,0 +1,166 @@ +--- +import { + alphaPreRelease, + betaPreRelease, +} from "../assets/data/audacityReleases"; +import SplitDownloadButton from "../components/button/SplitDownloadButton.jsx"; +import FeaturedVideo from "../components/video/FeaturedVideo"; +import AlphaDetails from "../components/next/AlphaDetails.astro"; +import BetaDetails from "../components/next/BetaDetails.astro"; +import BaseLayout from "../layouts/BaseLayout.astro"; +import "../styles/icons.css"; + +const pageTitle = "Audacity ® | Pre-release downloads"; +const pageDescription = + "Test upcoming Audacity builds for Windows, macOS, and Linux."; + +const releaseConfigurations = [ + { + entry: betaPreRelease, + Details: BetaDetails, + }, + { + entry: alphaPreRelease, + Details: AlphaDetails, + }, +]; + +const activeConfig = + releaseConfigurations.find(({ entry }) => entry.isActive) ?? null; + +const activeRelease = activeConfig?.entry ?? null; +const DetailsComponent = activeConfig?.Details ?? null; +const releaseDownloads = activeRelease?.downloads ?? null; +const releaseVersion = releaseDownloads?.version ?? ""; +const windowsDownloads = releaseDownloads?.win ?? []; +const macDownloads = releaseDownloads?.mac ?? []; +const linuxDownloads = releaseDownloads?.lin ?? []; +const isAlphaRelease = activeRelease?.id === "alpha"; + +const downloadSections = activeRelease + ? [ + { + id: "windows", + title: `${releaseVersion} for Windows`, + os: "Windows", + entries: windowsDownloads, + }, + { + id: "mac", + title: `${releaseVersion} for macOS`, + os: "macOS", + entries: macDownloads, + }, + { + id: "linux", + title: `${releaseVersion} for Linux`, + os: "Linux", + entries: linuxDownloads, + }, + ].filter((section) => section.entries.length > 0) + : []; +--- + + +
+
+
+ { + activeRelease ? ( + <> +

{releaseVersion}

+ {DetailsComponent && } + {isAlphaRelease && ( + + )} + + ) : ( +
+

+ Pre-release downloads are currently unavailable. +

+

+ Check back soon or download the latest stable version of Audacity. +

+ + Browse stable downloads + + +
+ ) + } +
+ +
+
+