style: Removed dark/light. theme switcher and made light theme default (#6979)

* Removed Theme switcher

* Changed default theme to light

* Auth screen dark theme changes

* auth screen ui ix

* Theme change Ui test removed

* bug fix
This commit is contained in:
albinAppsmith 2021-09-06 14:37:52 +05:30 committed by GitHub
parent b1a399b64a
commit 3d85575979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 28 deletions

View File

@ -34,23 +34,8 @@ describe("Login from UI and check the functionality", function() {
cy.url().should("include", "user/login");
});
it("Theme change test and validation", function() {
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
cy.get(homePage.profileMenu).click();
cy.get(homePage.themeText).should("have.attr", "value", "true");
cy.get("span")
.contains("Light")
.click({ force: true });
cy.get(homePage.profileMenu).click();
cy.get(homePage.themeText).should("have.attr", "value", "false");
cy.get("span")
.contains("Dark")
.click({ force: true });
cy.get(homePage.profileMenu).click();
cy.get(homePage.themeText).should("have.attr", "value", "true");
});
it("Icon of fab button of help modal should change on open and close", function() {
cy.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
cy.get(HelpLocators.HelpButton).click();
cy.get(`${HelpLocators.HelpButton} .bp3-icon-cross`).should(
"have.length",

View File

@ -212,7 +212,6 @@ export function AppViewerHeader(props: AppViewerHeaderProps) {
{currentUser && currentUser.username !== ANONYMOUS_USERNAME && (
<HeaderRightItemContainer>
<ProfileDropdown
hideThemeSwitch
modifiers={{
offset: {
enabled: true,

View File

@ -336,7 +336,6 @@ export function EditorHeader(props: EditorHeaderProps) {
{user && user.username !== ANONYMOUS_USERNAME && (
<ProfileDropdownContainer>
<ProfileDropdown
hideThemeSwitch
name={user.name}
userName={user?.username || ""}
/>

View File

@ -4,7 +4,6 @@ import Text, { TextType } from "components/ads/Text";
import styled, { createGlobalStyle } from "styled-components";
import { Position, Classes as BlueprintClasses } from "@blueprintjs/core";
import Menu from "components/ads/Menu";
import ThemeSwitcher from "./ThemeSwitcher";
import MenuDivider from "components/ads/MenuDivider";
import MenuItem from "components/ads/MenuItem";
import {
@ -21,7 +20,6 @@ type TagProps = CommonComponentProps & {
onClick?: (text: string) => void;
userName?: string;
name: string;
hideThemeSwitch?: boolean;
modifiers?: PopperModifiers;
};
@ -110,12 +108,6 @@ export default function ProfileDropdown(props: TagProps) {
</UserNameWrapper>
</UserInformation>
<MenuDivider />
{!props.hideThemeSwitch && (
<>
<ThemeSwitcher />
<MenuDivider />
</>
)}
<MenuItem
className={`t--edit-profile ${BlueprintClasses.POPOVER_DISMISS}`}
icon="edit"

View File

@ -4,12 +4,12 @@ import { dark, light, theme } from "constants/DefaultTheme";
import { ThemeMode } from "../../selectors/themeSelectors";
const initialState: ThemeState = {
mode: ThemeMode.DARK,
mode: ThemeMode.LIGHT,
theme: {
...theme,
colors: {
...theme.colors,
...dark,
...light,
},
},
};