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
12 changes: 12 additions & 0 deletions web-demo/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
<a href="/MiniExcel/">.NET</a>
<a href="/MiniExcel-Rust/" aria-current="page">Rust</a>
</nav>
<a
class="github-link"
href="https://github.com/mini-software/MiniExcel-Rust"
target="_blank"
rel="noopener noreferrer"
aria-label="View MiniExcel Rust on GitHub"
title="View MiniExcel Rust on GitHub"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M12 .5a12 12 0 0 0-3.79 23.39c.6.11.82-.26.82-.58v-2.04c-3.34.73-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.09-.75.08-.74.08-.74 1.2.08 1.84 1.23 1.84 1.23 1.07 1.84 2.8 1.31 3.48 1 .11-.78.42-1.31.76-1.61-2.67-.3-5.47-1.34-5.47-5.95 0-1.31.47-2.38 1.23-3.22-.12-.3-.53-1.52.12-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.3-1.55 3.3-1.23 3.3-1.23.65 1.66.24 2.88.12 3.18.77.84 1.23 1.91 1.23 3.22 0 4.62-2.8 5.64-5.48 5.94.43.37.81 1.1.81 2.22v3.29c0 .32.22.69.83.57A12 12 0 0 0 12 .5" />
</svg>
</a>
</div>
</header>

Expand Down
25 changes: 25 additions & 0 deletions web-demo/public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,31 @@ input:disabled {
background: var(--ink);
}

.github-link {
width: 34px;
height: 34px;
display: inline-grid;
place-items: center;
flex: 0 0 auto;
color: var(--ink);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 6px;
transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.github-link:hover {
color: var(--green);
background: var(--green-soft);
border-color: var(--green);
}

.github-link svg {
width: 18px;
height: 18px;
fill: currentColor;
}

.workspace {
min-height: 0;
display: grid;
Expand Down
9 changes: 8 additions & 1 deletion web-demo/tests/browser.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ for (const project of ["desktop", "mobile"]) {
await expect(implementation.getByRole("link", { name: ".NET" })).toHaveAttribute("href", "/MiniExcel/");
await expect(implementation.getByRole("link", { name: "Rust" })).toHaveAttribute("href", "/MiniExcel-Rust/");
await expect(implementation.getByRole("link", { name: "Rust" })).toHaveAttribute("aria-current", "page");
const githubLink = page.getByRole("link", { name: "View MiniExcel Rust on GitHub" });
await expect(githubLink).toHaveAttribute(
"href",
"https://github.com/mini-software/MiniExcel-Rust",
);
await expect(githubLink).toHaveAttribute("target", "_blank");
await expect(githubLink).toHaveAttribute("rel", "noopener noreferrer");
await expect(page.getByTestId("file-name")).toHaveText("miniexcel-browser-demo.xlsx");
await expect(page.getByRole("cell", { name: "MiniExcel", exact: true })).toBeVisible();
await expect(page.getByRole("cell", { name: "Browser WASM", exact: true })).toBeVisible();
Expand Down Expand Up @@ -193,4 +200,4 @@ test("uploaded workbook shows metadata and requires hidden-sheet RAG opt-in", as
await expect(page.locator("#previewTitle")).toContainText(visibleSheet);
await expect(page.locator("#resultEyebrow")).toHaveText("Markdown conversion");
await expect(page.locator("#downloadMarkdownButton")).toBeEnabled();
});
});
Loading