Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions apps/frontend/solidcraft-landing/src/components/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ export default function Actions({
{label}
</a>
{direct && (
<a className="small other-downloads" href="/download/">
Other downloads
</a>
<div className="download-links">
<a className="small other-downloads" href="/download/">
Other downloads
</a>
<a className="small pre-release-download" href={site.rcDownloads}>
Pre-release
</a>
</div>
)}
</div>
<a className="button secondary" href={site.app}>
Expand All @@ -65,10 +70,6 @@ export default function Actions({
Other versions:{" "}
<a className="text-link" href={site.appRc}>
try the release candidate
</a>{" "}
or{" "}
<a className="text-link" href={site.rcDownloads}>
download it
</a>
. It can break, and designs saved in it may not open in the stable
version. Designs you saved in the browser before November 3 are still
Expand Down
24 changes: 24 additions & 0 deletions apps/frontend/solidcraft-landing/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,30 @@ code {
.other-downloads:hover {
text-decoration: underline;
}
.download-links {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 6px 10px;
}
.download-links .other-downloads {
align-self: auto;
}
.pre-release-download {
display: inline-flex;
align-items: center;
min-height: 28px;
padding: 2px 10px;
border: 1px solid var(--link);
border-radius: 6px;
color: var(--link);
text-decoration: none;
white-space: nowrap;
}
.pre-release-download:hover {
text-decoration: underline;
}
.button {
min-height: 50px;
display: inline-flex;
Expand Down
7 changes: 7 additions & 0 deletions apps/frontend/solidcraft-landing/tests/browser/site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ test("hero actions stay visible and layouts reflow at representative widths", as
await expect(
actions.getByRole("link", { name: "Try in your browser" }),
).toHaveAttribute("href", site.app);
const preRelease = actions.getByRole("link", { name: "Pre-release" });
await expect(preRelease).toHaveAttribute("href", site.rcDownloads);
await expect(preRelease).toBeVisible();
expect(
await preRelease.evaluate((el) => el.scrollWidth <= el.clientWidth),
`Pre-release label fits at ${width}`,
).toBe(true);
await expect(
actions.getByRole("link", { name: "try the release candidate" }),
).toHaveAttribute("href", site.appRc);
Expand Down
Loading