fix(ui): drop the beta marker from the dark mode toggle (#46305)

This commit is contained in:
yuneng-jiang 2026-10-13 15:53:44 -07:00 • committed by GitHub
parent 365c4885de
commit 22000e1818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 11 deletions

View file

@ -45,7 +45,7 @@ describe("ThemeToggle", () => {
it("names the mode the click will switch to, so the button says what it does", async () => {
renderToggle();
expect(screen.getByRole("button", { name: "Switch to dark mode (beta)" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Switch to dark mode" })).toBeInTheDocument();
await userEvent.click(toggle());
@ -59,13 +59,4 @@ describe("ThemeToggle", () => {
expect(localStorage.getItem("theme")).toBe("system");
});
it("keeps the beta marker out of the toolbar label once dark is on", async () => {
renderToggle();
await userEvent.click(toggle());
expect(toggle()).not.toHaveTextContent("Beta");
expect(toggle()).toHaveAccessibleName("Switch to light mode");
});
});

View file

@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button";
const ThemeToggle: React.FC = () => {
const { setTheme, resolvedTheme } = useTheme();
const isDark = resolvedTheme === "dark";
const label = isDark ? "Switch to light mode" : "Switch to dark mode (beta)";
const label = isDark ? "Switch to light mode" : "Switch to dark mode";
return (
<Button