The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Dark mode Day 2 patches (#64549)
Nick Fitzpatricked772da268f8
diff --git a/e2e/test/scenarios/onboarding/setup/user_settings.cy.spec.js b/e2e/test/scenarios/onboarding/setup/user_settings.cy.spec.jsindex 1ec53fd6d96..c9505e36454 100644--- a/e2e/test/scenarios/onboarding/setup/user_settings.cy.spec.js+++ b/e2e/test/scenarios/onboarding/setup/user_settings.cy.spec.js@@ -276,7 +276,7 @@ const assertLightMode = () =>cy.get("body").should("have.css", "background-color", "rgb(249, 249, 250)");const assertDarkMode = () =>- cy.get("body").should("have.css", "background-color", "rgb(0, 0, 0)");+ cy.get("body").should("have.css", "background-color", "rgb(5, 14, 21)");/*** Stub the current user authentication methoddiff --git a/enterprise/frontend/src/metabase-enterprise/database_routing/DestinationDatabaseConnectionModal/DestinationDatabaseConnectionModal.tsx b/enterprise/frontend/src/metabase-enterprise/database_routing/DestinationDatabaseConnectionModal/DestinationDatabaseConnectionModal.tsxindex 9d30be164c3..3f3f06515f1 100644--- a/enterprise/frontend/src/metabase-enterprise/database_routing/DestinationDatabaseConnectionModal/DestinationDatabaseConnectionModal.tsx+++ b/enterprise/frontend/src/metabase-enterprise/database_routing/DestinationDatabaseConnectionModal/DestinationDatabaseConnectionModal.tsx@@ -115,7 +115,8 @@ export const DestinationDatabaseConnectionModalInner = ({<Flexpy="sm"px="md"- mb="md"+ mx="xl"+ my="md"bg="accent-gray-light"align="center"justify="space-between"diff --git a/enterprise/frontend/src/metabase-enterprise/user_provisioning/components/ScimInputs.tsx b/enterprise/frontend/src/metabase-enterprise/user_provisioning/components/ScimInputs.tsxindex 75e60f2e722..60ed2aa6c83 100644--- a/enterprise/frontend/src/metabase-enterprise/user_provisioning/components/ScimInputs.tsx+++ b/enterprise/frontend/src/metabase-enterprise/user_provisioning/components/ScimInputs.tsx@@ -17,9 +17,8 @@ export const getTextInputStyles = (params: {},input: {color: match(params)- .with({ masked: true }, () => `var(--mb-color-text-light) !important`).with({ disabled: false }, () => `var(--mb-color-text-dark) !important`)- .otherwise(() => `black !important`),+ .otherwise(() => `var(--mb-color-text-primary) !important`),fontFamily: fontFamilyMonospace,},});diff --git a/frontend/src/metabase/admin/permissions/components/FilterableTree/FilterableTree.styled.tsx b/frontend/src/metabase/admin/permissions/components/FilterableTree/FilterableTree.styled.tsxindex 9f4d0cc48c7..18d10765292 100644--- a/frontend/src/metabase/admin/permissions/components/FilterableTree/FilterableTree.styled.tsx+++ b/frontend/src/metabase/admin/permissions/components/FilterableTree/FilterableTree.styled.tsx@@ -2,7 +2,6 @@import styled from "@emotion/styled";import { Tree } from "metabase/common/components/tree";-import { lighten } from "metabase/lib/colors";import { color } from "metabase/ui/utils/colors";export const FilterableTreeRoot = styled.div`@@ -31,12 +30,14 @@ export const EmptyStateContainer = styled.div`export const AdminTreeNode = styled(Tree.Node)`color: ${(props) =>- props.isSelected ? color("text-white") : color("text-medium")};+ props.isSelected ? color("text-selected") : color("text-secondary")};background-color: ${(props) =>- props.isSelected ? color("filter") : "unset"};+ props.isSelected ? color("admin-navbar") : "unset"};&:hover {background-color: ${(props) =>- props.isSelected ? color("filter") : lighten("filter", 0.6)};+ props.isSelected+ ? color("admin-navbar")+ : color("admin-navbar-secondary")};}`;diff --git a/frontend/src/metabase/admin/permissions/components/PermissionsTable/PermissionsTable.styled.tsx b/frontend/src/metabase/admin/permissions/components/PermissionsTable/PermissionsTable.styled.tsxindex e12c5310618..e3d3d22b458 100644--- a/frontend/src/metabase/admin/permissions/components/PermissionsTable/PermissionsTable.styled.tsx+++ b/frontend/src/metabase/admin/permissions/components/PermissionsTable/PermissionsTable.styled.tsx@@ -44,7 +44,7 @@ export const PermissionsTableCell = styled.td`left: 0;top: 0;position: sticky;- padding-left: 0;+ padding-left: 1.5rem;padding-right: 1.5rem;&:after {@@ -89,7 +89,7 @@ export const EntityNameLink = styled(Link)`display: inline;font-weight: 700;text-decoration: underline;- color: ${() => color("admin-navbar")};+ color: ${() => color("admin-navbar-inverse")};`;export const HintIcon = styled(diff --git a/frontend/src/metabase/admin/settings/components/ApiKeys/SecretKeyModal.tsx b/frontend/src/metabase/admin/settings/components/ApiKeys/SecretKeyModal.tsxindex 1d7a78866ba..fd1b3511c34 100644--- a/frontend/src/metabase/admin/settings/components/ApiKeys/SecretKeyModal.tsx+++ b/frontend/src/metabase/admin/settings/components/ApiKeys/SecretKeyModal.tsx@@ -4,6 +4,7 @@ import { CopyTextInput } from "metabase/common/components/CopyTextInput";import CS from "metabase/css/core/index.css";import { Button, Flex, Group, Icon, Modal, Stack, Text } from "metabase/ui";import { getThemeOverrides } from "metabase/ui/theme";+import { color } from "metabase/ui/utils/colors";const { fontFamilyMonospace } = getThemeOverrides();export const SecretKeyModal = ({@@ -29,7 +30,8 @@ export const SecretKeyModal = ({disabledstyles={{input: {- color: `black`,+ // This color prop is needed to override disabled input color styles+ color: color("text-primary"),fontFamily: fontFamilyMonospace as string,},}}diff --git a/frontend/src/metabase/lib/colors/colors.ts b/frontend/src/metabase/lib/colors/colors.tsindex eee5da108a4..c9e473b31aa 100644--- a/frontend/src/metabase/lib/colors/colors.ts+++ b/frontend/src/metabase/lib/colors/colors.ts@@ -79,6 +79,7 @@ const baseColors = {// Orionorion: {+ 110: "hsla(205, 63%, 5%, 1)",100: "hsla(204, 66%, 8%, 1)",90: "hsla(204, 34%, 14%, 1)",80: "hsla(205, 19%, 23%, 1)",@@ -251,6 +252,14 @@ export const colorConfig = {light: baseColors.octopus[60],dark: baseColors.octopus[80],},+ "admin-navbar-secondary": {+ light: baseColors.octopus[40],+ dark: baseColors.octopus[60],+ },+ "admin-navbar-inverse": {+ light: baseColors.octopus[80],+ dark: baseColors.octopus[60],+ },"background-brand": {light: baseColors.brand[20],dark: baseColors.brand[70],@@ -272,7 +281,11 @@ export const colorConfig = {light: baseColors.orion[80],dark: baseColors.orion[20],},- "background-light": { light: baseColors.orion[5], dark: baseColors.black }, //should be background-secondary+ "background-light": {+ //should be background-secondary+ light: baseColors.orion[5],+ dark: baseColors.orion[110],+ },"background-selected": {light: baseColors.brand[50],dark: baseColors.brand[40],@@ -291,7 +304,7 @@ export const colorConfig = {light: baseColors.lobster[10],dark: baseColors.lobster[90],},- "bg-light": { light: baseColors.orion[5], dark: baseColors.black }, //should be background-secondary+ "bg-light": { light: baseColors.orion[5], dark: baseColors.orion[110] }, //should be background-secondary"bg-medium": { light: baseColors.orion[10], dark: baseColors.orion[80] }, //should be background-tertiary"bg-night": { light: baseColors.orion[70], dark: baseColors.orion[30] }, //merge with background-secondary-inverse?"bg-white-alpha-15": {@@ -446,7 +459,7 @@ export const colorConfig = {dark: baseColors.brand[40],},"text-dark": {- /* @deprecated, use text-primary */ light: baseColors.orionAlpha[80],+ light: baseColors.orionAlpha[80] /* @deprecated, use text-primary */,dark: baseColors.orionAlphaInverse[80],},"text-disabled": {@@ -471,14 +484,18 @@ export const colorConfig = {light: baseColors.orionAlpha[80],dark: baseColors.orionAlphaInverse[80],},- "text-secondary-inverse": {- light: baseColors.orionAlphaInverse[60],- dark: baseColors.orionAlpha[60],+ "text-primary-inverse": {+ light: baseColors.orionAlphaInverse[80],+ dark: baseColors.orionAlpha[80],},"text-secondary": {light: baseColors.orionAlpha[60],dark: baseColors.orionAlphaInverse[60],},+ "text-secondary-inverse": {+ light: baseColors.orionAlphaInverse[60],+ dark: baseColors.orionAlpha[60],+ },"text-selected": {light: baseColors.white,dark: baseColors.white,diff --git a/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/CustomMappingModal/CustomMappingModal.tsx b/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/CustomMappingModal/CustomMappingModal.tsxindex 630a83b179c..2e5c5704217 100644--- a/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/CustomMappingModal/CustomMappingModal.tsx+++ b/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/CustomMappingModal/CustomMappingModal.tsx@@ -131,7 +131,7 @@ export const CustomMappingModal = ({</Box><Group- bg="white"+ bg="background"bottom={0}className={S.footer}gap="md"diff --git a/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/DisplayValuesPicker/DisplayValuesPicker.module.css b/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/DisplayValuesPicker/DisplayValuesPicker.module.cssindex dc812e0cd9c..f2386a21b84 100644--- a/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/DisplayValuesPicker/DisplayValuesPicker.module.css+++ b/frontend/src/metabase/metadata/pages/DataModel/components/FieldSection/BehaviorSection/RemappingPicker/DisplayValuesPicker/DisplayValuesPicker.module.css@@ -5,8 +5,9 @@* When it's disabled is uses pointer-events: none to prevent the colors being applied.* Putting an info icon with a tooltip requires it to be pointer-evens-enabled, which causes* its parent (i.e. SelectItem) to apply the hover styles. We override this here.+ * This will effectively cover the element with a background*/- background-color: white !important;+ background-color: var(--mb-color-background) !important;color: var(--mb-color-text-primary) !important;/*** There's also margin-top: 1px involved, which causes 1px of the background color to be shown.diff --git a/frontend/src/metabase/metadata/pages/DataModel/components/PreviewSection/PreviewSection.tsx b/frontend/src/metabase/metadata/pages/DataModel/components/PreviewSection/PreviewSection.tsxindex 8924c83fc85..243412ea2ff 100644--- a/frontend/src/metabase/metadata/pages/DataModel/components/PreviewSection/PreviewSection.tsx+++ b/frontend/src/metabase/metadata/pages/DataModel/components/PreviewSection/PreviewSection.tsx@@ -55,7 +55,6 @@ const PreviewSectionBase = ({return (<Card- bg="white"className={className}data-testid="preview-section"h="100%"diff --git a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.cssindex 953700fe21f..998023b4fb2 100644--- a/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css+++ b/frontend/src/metabase/query_builder/components/NativeQueryEditor/CodeMirrorEditor/CodeMirrorEditor.module.css@@ -8,6 +8,10 @@background-color: var(--mb-color-bg-light);:global {+ .cm-cursor {+ border-left-color: var(--mb-color-text-secondary);+ }+.cm-tooltip-autocomplete {box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);border-radius: 4px;diff --git a/frontend/src/metabase/querying/segments/components/SegmentEditor/ClauseStep/ClauseStep.module.css b/frontend/src/metabase/querying/segments/components/SegmentEditor/ClauseStep/ClauseStep.module.cssindex 9297a9323e6..a7a6a3cc3cd 100644--- a/frontend/src/metabase/querying/segments/components/SegmentEditor/ClauseStep/ClauseStep.module.css+++ b/frontend/src/metabase/querying/segments/components/SegmentEditor/ClauseStep/ClauseStep.module.css@@ -38,6 +38,6 @@padding: 0 0.5rem;transform: translateY(-50%);color: var(--mb-color-text-medium);- background-color: white;+ background-color: var(--mb-color-bg-white);text-transform: uppercase;}diff --git a/frontend/src/metabase/ui/components/overlays/HoverCard/HoverCard.module.css b/frontend/src/metabase/ui/components/overlays/HoverCard/HoverCard.module.cssindex 5ca0754ffff..c410ec3d23a 100644--- a/frontend/src/metabase/ui/components/overlays/HoverCard/HoverCard.module.css+++ b/frontend/src/metabase/ui/components/overlays/HoverCard/HoverCard.module.css@@ -1,5 +1,5 @@.dropdown {padding: 0;overflow: auto;- background-color: var(--mb-color-bg-white);+ background-color: var(--mb-color-bg-medium);}