Skip to content

Commit eb92b43

Browse files
committed
feat: consolidate prerelease downloads
1 parent 5be2826 commit eb92b43

File tree

9 files changed

+274
-13
lines changed

9 files changed

+274
-13
lines changed

public/_redirects

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/gitbook-access https://app.gitbook.com/invite/-MhmG2mhIIHTtQPuHV_k/acNI2LAF6LtdJW06t4Hc
2020
/devserver https://discord.gg/N3XKxzTrq3
2121
/dev https://audacity.gitbook.io/dev/
22-
/nightly /beta
22+
/nightly /next
2323
/au4win https://nightly.link/audacity/audacity/workflows/au4_build_windows/master
2424
/au4mac https://nightly.link/audacity/audacity/workflows/au4_build_macos/master
2525
/au4lin https://nightly.link/audacity/audacity/workflows/au4_build_linux/master
@@ -29,6 +29,11 @@
2929
/) /
3030
/vpat /VPAT.pdf
3131

32+
# prerelease
33+
/au4 /next 301
34+
/alpha /next 301
35+
/beta /next 301
36+
3237
# campaign links
3338
/survey https://docs.google.com/forms/d/e/1FAIpQLSd42XPhC69bKUA9kbYiTXboRLaj9Q11_BUEXTK0v0TzWJQmDQ/viewform?usp=dialog
3439
/audacitypromo https://www.youtube.com/watch?v=Lb7jx4wdXXE&mtm_campaign=audacityapp&mtm_content=welcomescreen_video

src/assets/data/audacityReleases.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ export type ReleaseDirectory = {
1313
src?: ReleaseInfo[];
1414
};
1515

16-
export type ActivationState = "active" | "inactive";
17-
1816
export const audacityReleases: ReleaseDirectory = {
1917
version: "3.7.5",
2018
win: [
@@ -149,7 +147,7 @@ export const hasDownloadAssets = (downloads?: ReleaseDirectory): boolean => {
149147
export type PreReleaseEntry = {
150148
id: string;
151149
label: string;
152-
status: ActivationState;
150+
isActive: boolean;
153151
summary: string;
154152
pageHref: string;
155153
downloads: ReleaseDirectory;
@@ -158,10 +156,10 @@ export type PreReleaseEntry = {
158156
export const alphaPreRelease: PreReleaseEntry = {
159157
id: "alpha",
160158
label: "Alpha",
161-
status: "active",
159+
isActive: true,
162160
summary:
163161
"Get an early look at the next major release. Expect unfinished features and potential bugs.",
164-
pageHref: "/au4",
162+
pageHref: "/next",
165163
downloads: {
166164
version: "Audacity 4 Alpha 1",
167165
win: [
@@ -195,9 +193,9 @@ export const alphaPreRelease: PreReleaseEntry = {
195193
export const betaPreRelease: PreReleaseEntry = {
196194
id: "beta",
197195
label: "Beta",
198-
status: "inactive",
196+
isActive: false,
199197
summary: "Help us test upcoming features before they ship.",
200-
pageHref: "/beta",
198+
pageHref: "/next",
201199
downloads: {
202200
version: "3.5.0 beta",
203201
win: [

src/assets/data/promotions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ const promoData: Record<string, PromoData> = {
2424
audacity4Alpha: {
2525
isActive: true,
2626
priority: 50,
27-
suppressOnPaths: ["/au4", "/download"],
27+
suppressOnPaths: ["/next", "/download"],
2828
message: "Want a peek at our next big release?",
2929
cta: {
3030
text: "Try the Audacity 4 Alpha",
31-
link: "/au4",
31+
link: "/next",
3232
},
3333
tracking: {
3434
category: "Promo CTA",

src/components/footer/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
preReleaseList,
66
} from "../../assets/data/audacityReleases";
77
const activeDownloadCampaign = preReleaseList.find((entry) =>
8-
entry.status === "active" && hasDownloadAssets(entry.downloads)
8+
entry.isActive && hasDownloadAssets(entry.downloads)
99
) ?? null;
1010
const hasPreRelease = Boolean(activeDownloadCampaign);
1111
const activePreReleaseAriaLabel = hasPreRelease && activeDownloadCampaign
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
---
3+
<div class="mt-6">
4+
<p>
5+
The purpose of this alpha build is to test the core features of Audacity 4 on a
6+
wide selection of hardware and operating systems.
7+
</p>
8+
<p>
9+
If you experience severe issues or crashes, please file an issue on GitHub
10+
(requires a free GitHub account).
11+
</p>
12+
<ul class="py-2 list-none">
13+
<li>
14+
<a href="https://github.com/audacity/audacity/issues" class="hyperlink">
15+
Github issues
16+
</a>
17+
</li>
18+
</ul>
19+
20+
<h2 class="mt-6 text-2xl">What's implemented</h2>
21+
22+
<ul class="list-disc mt-2 ml-6">
23+
<li>Recording and playback</li>
24+
<li>Editing audio</li>
25+
<li>Applying effects (destructive and real-time)</li>
26+
<li>Exporting audio files</li>
27+
<li>
28+
Configuring and re-arranging the interface (including the new Workspaces
29+
feature)
30+
</li>
31+
</ul>
32+
33+
<h3 class="mt-2">A note on compatibility ⚠️</h3>
34+
<p class="mt-2">
35+
Projects saved in Audacity 4 are not backwards compatible. We recommend you make
36+
a copy of your important projects before opening them in Audacity 4.
37+
</p>
38+
39+
<h2 class="mt-6 text-2xl">Unimplemented features</h2>
40+
<p class="mt-2">
41+
Some yet-to-be finalized features might appear non-functional, or have been
42+
excluded from Audacity's interface. These are features not yet ready for user
43+
testing, and have been disabled.
44+
</p>
45+
<ul class="list-disc mt-2 ml-6">
46+
<li>Nyquist, LADSPA and VAMP and the OpenVINO plugins</li>
47+
<li>Preferences from Audacity 3 are not carried over</li>
48+
<li>Envelopes and label tracks</li>
49+
<li>Spectrogram view and the spectral editing mode</li>
50+
<li>Most built-in effects, including generators and analyzers</li>
51+
<li>Opening multiple projects at the same time</li>
52+
</ul>
53+
54+
<div>
55+
<h2 class="mt-4 text-2xl">Submit your feedback!</h2>
56+
<p class="mt-2">
57+
We're always eager to hear what you have to say, but it's especially important
58+
we hear from you during this early phase. Please let us know what you think,
59+
using the following places:
60+
</p>
61+
<ul class="py-2 list-none">
62+
<li class="hyperlink">
63+
<a href="https://forum.audacityteam.org/c/au4/64">Audacity Forum</a>
64+
</li>
65+
<li class="hyperlink">
66+
<a href="https://discord.gg/audacity">Audacity Discord</a>
67+
</li>
68+
<li>
69+
<a href="https://github.com/audacity/audacity/issues" class="hyperlink">
70+
Github issues
71+
</a>
72+
</li>
73+
</ul>
74+
</div>
75+
</div>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
---
3+
<div class="my-6">
4+
<p>
5+
Download the latest beta build and help us test upcoming Audacity features.
6+
</p>
7+
<p class="my-2">
8+
If you'd like to help us with testing, instructions can be found below.
9+
</p>
10+
<div class="flex items-center justify-center w-fit rounded-md text-white my-6">
11+
<a href="https://support.audacityteam.org/community/contributing/testing">
12+
<div class="flex items-center gap-3 h-10 pl-4 pr-3 rounded-md bg-blue-700 hover:bg-blue-600">
13+
Instructions for testing
14+
</div>
15+
</a>
16+
</div>
17+
</div>

src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const {
2020
2121
const isNoAdPage =
2222
Astro.request.url.includes("/post-download") ||
23-
Astro.request.url.includes("/au4");
23+
Astro.request.url.includes("/next");
2424
const hasActiveStaticPromo = Object.values(promoData).some((promo) => {
2525
const isActive = promo.isActive ?? true;
2626
return isActive && Boolean(promo.cta);

src/pages/download.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { version } = audacityReleases;
1414
const sourceDownloads = audacityReleases.src ?? [];
1515
const primarySourceDownload = sourceDownloads[0] ?? null;
1616
const activeDownloadEntries = preReleaseList.filter(
17-
(entry) => entry.status === "active" && hasDownloadAssets(entry.downloads),
17+
(entry) => entry.isActive && hasDownloadAssets(entry.downloads),
1818
);
1919
const hasDownloadCampaigns = activeDownloadEntries.length > 0;
2020

src/pages/next.astro

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
import {
3+
alphaPreRelease,
4+
betaPreRelease,
5+
} from "../assets/data/audacityReleases";
6+
import SplitDownloadButton from "../components/button/SplitDownloadButton.jsx";
7+
import FeaturedVideo from "../components/video/FeaturedVideo";
8+
import AlphaDetails from "../components/next/AlphaDetails.astro";
9+
import BetaDetails from "../components/next/BetaDetails.astro";
10+
import BaseLayout from "../layouts/BaseLayout.astro";
11+
import "../styles/icons.css";
12+
13+
const pageTitle = "Audacity ® | Pre-release downloads";
14+
const pageDescription =
15+
"Test upcoming Audacity builds for Windows, macOS, and Linux.";
16+
17+
const releaseConfigurations = [
18+
{
19+
entry: betaPreRelease,
20+
Details: BetaDetails,
21+
},
22+
{
23+
entry: alphaPreRelease,
24+
Details: AlphaDetails,
25+
},
26+
];
27+
28+
const activeConfig =
29+
releaseConfigurations.find(({ entry }) => entry.isActive) ?? null;
30+
31+
const activeRelease = activeConfig?.entry ?? null;
32+
const DetailsComponent = activeConfig?.Details ?? null;
33+
const releaseDownloads = activeRelease?.downloads ?? null;
34+
const releaseVersion = releaseDownloads?.version ?? "";
35+
const windowsDownloads = releaseDownloads?.win ?? [];
36+
const macDownloads = releaseDownloads?.mac ?? [];
37+
const linuxDownloads = releaseDownloads?.lin ?? [];
38+
const isAlphaRelease = activeRelease?.id === "alpha";
39+
40+
const downloadSections = activeRelease
41+
? [
42+
{
43+
id: "windows",
44+
title: `${releaseVersion} for Windows`,
45+
os: "Windows",
46+
entries: windowsDownloads,
47+
},
48+
{
49+
id: "mac",
50+
title: `${releaseVersion} for macOS`,
51+
os: "macOS",
52+
entries: macDownloads,
53+
},
54+
{
55+
id: "linux",
56+
title: `${releaseVersion} for Linux`,
57+
os: "Linux",
58+
entries: linuxDownloads,
59+
},
60+
].filter((section) => section.entries.length > 0)
61+
: [];
62+
---
63+
64+
<BaseLayout
65+
title={pageTitle}
66+
description={pageDescription}
67+
showPromoBanner={false}
68+
>
69+
<main id="main" class="max-w-screen-xl mx-auto text-gray-700">
70+
<div class="grid grid-cols-12 pt-8 pb-32 gap-y-12">
71+
<section class="col-start-2 col-span-10 sm:col-start-2 sm:col-span-5">
72+
{
73+
activeRelease ? (
74+
<>
75+
<h1>{releaseVersion}</h1>
76+
{DetailsComponent && <DetailsComponent />}
77+
{isAlphaRelease && (
78+
<FeaturedVideo
79+
client:load
80+
placeholderImage="https://i.ytimg.com/vi/QYM3TWf_G38/maxresdefault.jpg"
81+
imageAltText="Video: How we made Audacity 4"
82+
videoURL="https://www.youtube-nocookie.com/embed/QYM3TWf_G38?autoplay=1"
83+
title="Video: How we made Audacity 4"
84+
label="Watch a behind-the-scenes video on the making of Audacity 4"
85+
class="mt-8"
86+
/>
87+
)}
88+
</>
89+
) : (
90+
<div class="border border-yellow-300 bg-yellow-50 text-yellow-900 rounded-md p-6">
91+
<h1 class="text-3xl font-semibold text-yellow-900">
92+
Pre-release downloads are currently unavailable.
93+
</h1>
94+
<p class="mt-4">
95+
Check back soon or download the latest stable version of Audacity.
96+
</p>
97+
<a
98+
class="hyperlink inline-flex items-center gap-1 mt-4"
99+
href="/download"
100+
>
101+
Browse stable downloads
102+
<span class="align-middle icon icon-share text-blue-600" />
103+
</a>
104+
</div>
105+
)
106+
}
107+
</section>
108+
<aside
109+
class="row-start-2 sm:row-start-1 col-start-2 col-span-10 sm:col-start-8 sm:col-span-4"
110+
>
111+
<h2 class="text-sm uppercase font-normal">Download links</h2>
112+
{
113+
activeRelease ? (
114+
downloadSections.length > 0 ? (
115+
<div class="flex flex-col gap-6 mt-2">
116+
{downloadSections.map((section) => (
117+
<div class="border border-bg-200 rounded-md p-6">
118+
<h3 class="additional-resource-heading">
119+
{section.title}
120+
</h3>
121+
<div class="mt-2">
122+
<SplitDownloadButton
123+
OS={section.os}
124+
releaseData={section.entries}
125+
client:load
126+
/>
127+
</div>
128+
</div>
129+
))}
130+
</div>
131+
) : (
132+
<div class="mt-4 p-4 border border-gray-200 rounded-md bg-gray-50">
133+
<p class="text-sm text-gray-700">
134+
Download packages for this pre-release are not available right now.
135+
</p>
136+
<a
137+
class="hyperlink text-sm inline-flex items-center gap-1 mt-3"
138+
href="/download"
139+
>
140+
Browse stable downloads
141+
<span class="align-middle icon icon-share text-blue-600" />
142+
</a>
143+
</div>
144+
)
145+
) : (
146+
<div class="mt-4 p-4 border border-gray-200 rounded-md bg-gray-50">
147+
<p class="text-sm text-gray-700">
148+
Pre-release downloads are currently unavailable.
149+
</p>
150+
<p class="text-sm text-gray-700 mt-1">
151+
You can still download the latest stable version of Audacity.
152+
</p>
153+
<a
154+
class="hyperlink text-sm inline-flex items-center gap-1 mt-3"
155+
href="/download"
156+
>
157+
Browse stable downloads
158+
<span class="align-middle icon icon-share text-blue-600" />
159+
</a>
160+
</div>
161+
)
162+
}
163+
</aside>
164+
</div>
165+
</main>
166+
</BaseLayout>

0 commit comments

Comments
 (0)