From 3d85575979bd41a4747a2c28c4c7b2e6e437a121 Mon Sep 17 00:00:00 2001 From: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Date: Mon, 6 Sep 2021 14:37:52 +0530 Subject: [PATCH] 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 --- .../UnitTest/LoginFromUIApp_spec.js | 17 +---------------- .../pages/AppViewer/viewer/AppViewerHeader.tsx | 1 - app/client/src/pages/Editor/EditorHeader.tsx | 1 - app/client/src/pages/common/ProfileDropdown.tsx | 8 -------- .../src/reducers/uiReducers/themeReducer.ts | 4 ++-- 5 files changed, 3 insertions(+), 28 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/UnitTest/LoginFromUIApp_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/UnitTest/LoginFromUIApp_spec.js index 54d3485a4f..4da61ecc5d 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/UnitTest/LoginFromUIApp_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ServerSideTests/UnitTest/LoginFromUIApp_spec.js @@ -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", diff --git a/app/client/src/pages/AppViewer/viewer/AppViewerHeader.tsx b/app/client/src/pages/AppViewer/viewer/AppViewerHeader.tsx index 3a2d7242af..20a3eb12db 100644 --- a/app/client/src/pages/AppViewer/viewer/AppViewerHeader.tsx +++ b/app/client/src/pages/AppViewer/viewer/AppViewerHeader.tsx @@ -212,7 +212,6 @@ export function AppViewerHeader(props: AppViewerHeaderProps) { {currentUser && currentUser.username !== ANONYMOUS_USERNAME && ( diff --git a/app/client/src/pages/common/ProfileDropdown.tsx b/app/client/src/pages/common/ProfileDropdown.tsx index a9d4c34d29..7d9b8bf5fa 100644 --- a/app/client/src/pages/common/ProfileDropdown.tsx +++ b/app/client/src/pages/common/ProfileDropdown.tsx @@ -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) { - {!props.hideThemeSwitch && ( - <> - - - - )}