Skip to content

feat: remove dark blue theme #14890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- Nothing to restore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE users SET theme_preference = '' WHERE theme_preference = 'darkBlue';
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,12 @@ export const AppearanceForm: FC<AppearanceFormProps> = ({
themes={[themes.dark, themes.light]}
onSelect={() => onChangeTheme("auto")}
/>

<ThemePreviewButton
displayName="Dark"
active={currentTheme === "dark"}
theme={themes.dark}
onSelect={() => onChangeTheme("dark")}
/>
<ThemePreviewButton
displayName="Dark blue"
active={currentTheme === "darkBlue"}
theme={themes.darkBlue}
onSelect={() => onChangeTheme("darkBlue")}
/>
<ThemePreviewButton
displayName="Light"
active={currentTheme === "light"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ describe("appearance page", () => {
expect(API.updateAppearanceSettings).toBeCalledTimes(0);
});

it("changes theme to dark blue", async () => {
renderWithAuth(<AppearancePage />);

jest.spyOn(API, "updateAppearanceSettings").mockResolvedValueOnce({
...MockUser,
theme_preference: "darkBlue",
});

const darkBlue = await screen.findByText("Dark blue");
await userEvent.click(darkBlue);

// Check if the API was called correctly
expect(API.updateAppearanceSettings).toBeCalledTimes(1);
expect(API.updateAppearanceSettings).toHaveBeenCalledWith("me", {
theme_preference: "darkBlue",
});
});

it("changes theme to light", async () => {
renderWithAuth(<AppearancePage />);

Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/UsersPage/storybookData/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export const MockUsers: User[] = [
last_seen_at: "2024-09-05T12:27:22.098297Z",
status: "active",
login_type: "oidc",
theme_preference: "darkBlue",
theme_preference: "dark",
organization_ids: ["703f72a1-76f6-4f89-9de6-8a3989693fe5"],
roles: [
{
Expand Down Expand Up @@ -423,7 +423,7 @@ export const MockUsers: User[] = [
last_seen_at: "2024-09-05T07:24:39.324649Z",
status: "active",
login_type: "oidc",
theme_preference: "darkBlue",
theme_preference: "dark",
organization_ids: ["703f72a1-76f6-4f89-9de6-8a3989693fe5"],
roles: [
{
Expand Down
33 changes: 0 additions & 33 deletions site/src/theme/darkBlue/branding.ts

This file was deleted.

52 changes: 0 additions & 52 deletions site/src/theme/darkBlue/experimental.ts

This file was deleted.

15 changes: 0 additions & 15 deletions site/src/theme/darkBlue/index.ts

This file was deleted.

37 changes: 0 additions & 37 deletions site/src/theme/darkBlue/monaco.ts

This file was deleted.

79 changes: 0 additions & 79 deletions site/src/theme/darkBlue/mui.ts

This file was deleted.

Loading
Loading