Skip to content

Commit 4c6f520

Browse files
author
Tim Roes
authored
🪟 🎉 New theme for Airbyte UI (#18817)
* New Webapp theme * Remove debug banner * Remove GlobalStyles from storybook * Remove beige color palette * Fix storybook styling * Fix hover color in sidebar * Improve transitions
1 parent d35b350 commit 4c6f520

File tree

31 files changed

+81
-112
lines changed

31 files changed

+81
-112
lines changed

airbyte-webapp/.storybook/preview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { addDecorator } from "@storybook/react";
33
import { withProviders } from "./withProvider";
44

55
import "!style-loader!css-loader!sass-loader!../public/index.css";
6+
import "../src/scss/global.scss";
67

78
addDecorator(withProviders);
89

airbyte-webapp/.storybook/withProvider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { QueryClientProvider, QueryClient } from "react-query";
77

88
// TODO: theme was not working correctly so imported directly
99
import { theme } from "../src/theme";
10-
import GlobalStyle from "../src/global-styles";
1110
import messages from "../src/locales/en.json";
1211
import { FeatureService } from "../src/hooks/services/Feature";
1312
import { ConfigServiceProvider, defaultConfig } from "../src/config";
@@ -45,7 +44,6 @@ export const withProviders = (getStory) => (
4544
<ConfigServiceProvider defaultConfig={defaultConfig} providers={[]}>
4645
<DocumentationPanelProvider>
4746
<FeatureService features={[]}>
48-
<GlobalStyle />
4947
{getStory()}
5048
</FeatureService>
5149
</DocumentationPanelProvider>

airbyte-webapp/public/simpleLogo.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

airbyte-webapp/src/App.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@ import {
2525
ValueProvider,
2626
windowConfigProvider,
2727
} from "./config";
28-
import GlobalStyle from "./global-styles";
2928
import en from "./locales/en.json";
3029
import { Routing } from "./pages/routes";
3130
import { WorkspaceServiceProvider } from "./services/workspaces/WorkspacesService";
3231
import { theme } from "./theme";
3332

3433
const StyleProvider: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (
35-
<ThemeProvider theme={theme}>
36-
<GlobalStyle />
37-
{children}
38-
</ThemeProvider>
34+
<ThemeProvider theme={theme}>{children}</ThemeProvider>
3935
);
4036

4137
const configProviders: ValueProvider<Config> = [envConfigProvider, windowConfigProvider];

airbyte-webapp/src/components/icons/CreditsIcon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export const CreditsIcon = ({ color = theme.greyColor20 }: Props) => (
88
<svg width="30" height="24" viewBox="0 0 30 24" fill={color}>
99
<path
1010
d="M17 2C18.83 1.99913 20.6049 2.62567 22.0289 3.77513C23.4528 4.92458 24.4396 6.52748 24.8247 8.31647C25.2098 10.1055 24.9699 11.9724 24.1451 13.6059C23.3202 15.2395 21.9603 16.5408 20.292 17.293C19.7588 18.4719 18.9475 19.5039 17.9279 20.3004C16.9082 21.097 15.7106 21.6343 14.4376 21.8663C13.1647 22.0984 11.8545 22.0182 10.6194 21.6327C9.38423 21.2472 8.26104 20.5678 7.34611 19.6529C6.43119 18.738 5.75184 17.6148 5.36632 16.3796C4.9808 15.1445 4.90062 13.8343 5.13266 12.5614C5.3647 11.2884 5.90203 10.0908 6.69857 9.07114C7.49511 8.05148 8.52709 7.24024 9.706 6.707C10.3401 5.30389 11.3656 4.1135 12.6593 3.27861C13.9531 2.44371 15.4602 1.99976 17 2ZM13 8C12.2121 8 11.4319 8.1552 10.7039 8.45672C9.97595 8.75825 9.31451 9.20021 8.75736 9.75736C8.20021 10.3145 7.75825 10.9759 7.45673 11.7039C7.1552 12.4319 7 13.2121 7 14C7 14.7879 7.1552 15.5681 7.45673 16.2961C7.75825 17.0241 8.20021 17.6855 8.75736 18.2426C9.31451 18.7998 9.97595 19.2417 10.7039 19.5433C11.4319 19.8448 12.2121 20 13 20C14.5913 20 16.1174 19.3679 17.2426 18.2426C18.3679 17.1174 19 15.5913 19 14C19 12.4087 18.3679 10.8826 17.2426 9.75736C16.1174 8.63214 14.5913 8 13 8ZM17 4C16.1527 3.99901 15.3148 4.17794 14.5418 4.52496C13.7688 4.87198 13.0783 5.37918 12.516 6.013C13.6463 5.94439 14.7782 6.1165 15.837 6.51795C16.8958 6.9194 17.8573 7.54105 18.6579 8.34178C19.4586 9.14252 20.0801 10.1041 20.4814 11.1629C20.8828 12.2218 21.0547 13.3537 20.986 14.484C21.8952 13.6756 22.5372 12.6099 22.8268 11.4283C23.1164 10.2467 23.04 9.00491 22.6076 7.86772C22.1753 6.73053 21.4074 5.75164 20.4059 5.06088C19.4044 4.37013 18.2166 4.00014 17 4Z"
11-
fill="white"
11+
fill="currentColor"
1212
/>
1313
<path
1414
fillRule="evenodd"
1515
clipRule="evenodd"
1616
d="M10.9338 10.8869C11.8855 9.81015 13.4616 9.49428 14.7573 10.1158C16.4788 10.9417 17.1068 13.0455 16.1696 14.6684L14.0611 18.3151C13.9433 18.5189 13.7494 18.6675 13.522 18.7285C13.2946 18.7894 13.0524 18.7576 12.8484 18.6401L15.4011 14.2243C16.0811 13.0464 15.6263 11.5197 14.3782 10.9186C13.4417 10.4676 12.2969 10.6929 11.6051 11.4685C11.2235 11.8943 11.0092 12.4441 11.0021 13.0158C10.9949 13.5875 11.1954 14.1425 11.5662 14.5777C11.6329 14.6558 11.7046 14.7294 11.7809 14.7981L10.2907 17.3806C10.2324 17.4816 10.1548 17.5701 10.0623 17.641C9.96985 17.712 9.8643 17.7641 9.7517 17.7942C9.6391 17.8244 9.52166 17.8321 9.40609 17.8169C9.29051 17.8017 9.17906 17.7639 9.0781 17.7056L10.6959 14.9019C10.4635 14.5669 10.2967 14.1909 10.2041 13.7938L9.2127 15.5153C9.09485 15.7191 8.90096 15.8678 8.67359 15.9287C8.44622 15.9897 8.20396 15.9579 8 15.8404L10.5637 11.3997C10.6704 11.2174 10.7944 11.0456 10.9338 10.8869ZM13.8928 12.3004C14.5103 12.657 14.7235 13.45 14.3662 14.0671L11.9078 18.3145C11.79 18.5183 11.5961 18.667 11.3687 18.7279C11.1413 18.7889 10.8991 18.7571 10.6951 18.6396L12.9778 14.6852C12.7947 14.6466 12.6221 14.5688 12.4719 14.457C12.3218 14.3453 12.1977 14.2023 12.1082 14.0379C12.0187 13.8735 11.966 13.6916 11.9536 13.5049C11.9413 13.3181 11.9696 13.1309 12.0366 12.9561C12.1037 12.7814 12.2078 12.6233 12.342 12.4927C12.4761 12.3621 12.6369 12.2622 12.8134 12.1999C12.9899 12.1375 13.1778 12.1142 13.3641 12.1316C13.5505 12.1489 13.7309 12.2065 13.8928 12.3004ZM12.9986 13.0986C12.9564 13.131 12.9209 13.1715 12.8943 13.2176H12.8942C12.8541 13.2871 12.8355 13.3669 12.8407 13.447C12.846 13.527 12.8748 13.6037 12.9237 13.6674C12.9725 13.731 13.0392 13.7787 13.1151 13.8045C13.1911 13.8303 13.273 13.833 13.3505 13.8122C13.428 13.7915 13.4976 13.7482 13.5505 13.6879C13.6034 13.6275 13.6372 13.5529 13.6477 13.4733C13.6581 13.3938 13.6448 13.3129 13.6093 13.241C13.5738 13.169 13.5178 13.1092 13.4483 13.0691C13.4022 13.0425 13.3513 13.0252 13.2985 13.0182C13.2457 13.0113 13.192 13.0148 13.1405 13.0286C13.0891 13.0424 13.0409 13.0662 12.9986 13.0986Z"
17-
fill="white"
17+
fill="currentColor"
1818
/>
1919
</svg>
2020
);

airbyte-webapp/src/components/ui/Banner/AlertBanner.module.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616
}
1717
}
1818

19-
.beige {
20-
background-color: colors.$beige-100;
19+
.default {
20+
background-color: colors.$blue;
21+
color: colors.$white;
2122
}
2223

2324
.red {

airbyte-webapp/src/components/ui/Banner/AlertBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface AlertBannerProps {
1010

1111
export const AlertBanner: React.FC<AlertBannerProps> = ({ color, message }) => {
1212
const bannerStyle = classnames(styles.alertBannerContainer, {
13-
[styles.beige]: color === "default" || !color,
13+
[styles.default]: color === "default" || !color,
1414
[styles.red]: color === "warning",
1515
});
1616

airbyte-webapp/src/components/ui/InfoBox/InfoBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Props {
88
}
99

1010
const Box = styled.div`
11-
background: ${({ theme }) => theme.darkBeigeColor};
11+
background: ${({ theme }) => theme.yellow100};
1212
border-radius: 8px;
1313
padding: 18px 25px 22px;
1414
font-size: 14px;

airbyte-webapp/src/components/ui/StepsMenu/Step.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const StepView = styled.div<{
2020
min-width: ${({ lightMode }) => (lightMode ? "100px" : "auto")};
2121
min-height: 28px;
2222
padding: 6px 14px;
23-
border-radius: 4px;
23+
border-radius: 28px;
2424
pointer-events: ${({ isActive, nonClickable }) => (isActive || nonClickable ? "none" : "all")};
2525
cursor: ${({ nonClickable }) => (nonClickable ? "default" : "pointer")};
2626
text-align: center;

airbyte-webapp/src/components/ui/Table/Table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const Th = styled.th<TableHeaderProps>`
8484
font-size: ${({ light }) => (light ? 11 : 10)}px;
8585
line-height: 12px;
8686
color: ${({ theme, highlighted }) => (highlighted ? theme.whiteColor : theme.lightTextColor)};
87-
border-bottom: ${({ theme, light }) => (light ? "none" : ` 1px solid ${theme.backgroundColor}`)};
87+
border-bottom: none;
8888
width: ${({ collapse, customWidth }) => (customWidth ? `${customWidth}%` : collapse ? "0.0000000001%" : "auto")};
8989
font-weight: ${({ light }) => (light ? 400 : 600)};
9090
text-transform: ${({ light }) => (light ? "capitalize" : "uppercase")};

airbyte-webapp/src/global-styles.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

airbyte-webapp/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { loadOsano } from "utils/dataPrivacy";
88
import { loadSentry } from "utils/sentry";
99

1010
import "./globals";
11+
import "./scss/global.scss";
1112

1213
// We do not follow default config approach since we want to init sentry/datadog asap
1314
loadSentry();

airbyte-webapp/src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"notifications.error.somethingWentWrong": "Something went wrong",
55
"notifications.error.noMessage": "No error message",
66

7+
"sidebar.homepage": "Homepage",
78
"sidebar.sources": "Sources",
89
"sidebar.destinations": "Destinations",
910
"sidebar.admin": "Admin",

airbyte-webapp/src/packages/cloud/App.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import GlobalStyle from "global-styles";
21
import React, { Suspense } from "react";
32
import { HelmetProvider } from "react-helmet-async";
43
import { BrowserRouter as Router } from "react-router-dom";
@@ -28,10 +27,7 @@ import { IntercomProvider } from "./services/thirdParty/intercom/IntercomProvide
2827
const messages = { ...en, ...cloudLocales };
2928

3029
const StyleProvider: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (
31-
<ThemeProvider theme={theme}>
32-
<GlobalStyle />
33-
{children}
34-
</ThemeProvider>
30+
<ThemeProvider theme={theme}>{children}</ThemeProvider>
3531
);
3632

3733
const Services: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (

airbyte-webapp/src/packages/cloud/components/experiments/SpeedyConnection/SpeedyConnectionBanner/SpeedyConnectionBanner.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
z-index: 3;
1010
font-size: 12px;
1111
line-height: 15px;
12-
color: colors.$black;
1312
padding: 8px;
1413
display: flex;
1514
align-items: center;
16-
background-color: colors.$beige-100;
15+
background-color: colors.$blue;
16+
color: colors.$white;
1717

1818
@media (min-width: 1280px) {
1919
height: 50px;

airbyte-webapp/src/packages/cloud/views/credits/CreditsPage/components/RemainingCredits.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Props {
2424
}
2525

2626
const Block = styled.div`
27-
background: ${({ theme }) => theme.darkBeigeColor};
27+
background: ${({ theme }) => theme.blue50};
2828
border-radius: 8px;
2929
padding: 18px 25px 22px;
3030
font-size: 13px;

airbyte-webapp/src/packages/cloud/views/layout/SideBar/SideBar.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ $sidebar-workspace-font-weight: 400;
1111
display: block;
1212
height: 21px;
1313
width: 100%;
14-
border: 0;
14+
border: variables.$border-thin solid colors.$grey-100;
1515
border-radius: variables.$border-radius-md;
1616
background-color: rgba(255, 255, 255, 20%);
1717
margin-top: variables.$spacing-md;
1818
padding: 0 variables.$spacing-md;
1919
font-size: $sidebar-workspace-font-size;
2020
font-weight: $sidebar-workspace-font-weight;
21-
color: colors.$white;
2221
white-space: nowrap;
2322
text-overflow: ellipsis;
2423
text-align: center;

airbyte-webapp/src/packages/cloud/views/layout/SideBar/SideBar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
33
import { faDesktop, faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
44
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
55
import React from "react";
6-
import { FormattedMessage, FormattedNumber } from "react-intl";
6+
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
77
import { NavLink } from "react-router-dom";
88

99
import { Link } from "components";
@@ -19,6 +19,7 @@ import { useIntercom } from "packages/cloud/services/thirdParty/intercom";
1919
import { useGetCloudWorkspace } from "packages/cloud/services/workspaces/CloudWorkspacesService";
2020
import { WorkspacePopout } from "packages/cloud/views/workspaces/WorkspacePopout";
2121
import { links } from "utils/links";
22+
import { ReactComponent as AirbyteLogo } from "views/layout/SideBar/airbyteLogo.svg";
2223
import ChatIcon from "views/layout/SideBar/components/ChatIcon";
2324
import ConnectionsIcon from "views/layout/SideBar/components/ConnectionsIcon";
2425
import DestinationIcon from "views/layout/SideBar/components/DestinationIcon";
@@ -40,6 +41,7 @@ const SideBar: React.FC = () => {
4041
const { show } = useIntercom();
4142
const handleChatUs = () => show();
4243
const hideOnboardingExperiment = useExperiment("onboarding.hideOnboarding", false);
44+
const { formatMessage } = useIntl();
4345

4446
return (
4547
<nav className={styles.nav}>
@@ -48,8 +50,9 @@ const SideBar: React.FC = () => {
4850
to={
4951
workspace.displaySetupWizard && !hideOnboardingExperiment ? RoutePaths.Onboarding : RoutePaths.Connections
5052
}
53+
aria-label={formatMessage({ id: "sidebar.homepage" })}
5154
>
52-
<img src="/simpleLogo.svg" alt="logo" height={33} width={33} />
55+
<AirbyteLogo height={33} width={33} />
5356
</Link>
5457
<WorkspacePopout>
5558
{({ onOpen, value }) => (

airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
.nameContainer {
3030
composes: textContainer;
31-
background-color: colors.$beige-100;
32-
border: variables.$border-thin solid colors.$beige-100;
31+
background-color: colors.$grey-100;
32+
border: variables.$border-thin solid colors.$grey-100;
3333
border-radius: variables.$border-radius-sm;
3434
padding: 0 variables.$spacing-xl;
3535

airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionPageTitle.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.connectionTitle {
10-
color: colors.$orange;
10+
color: colors.$blue-500;
1111
}
1212

1313
.connectionDeleted {

airbyte-webapp/src/pages/OnboardingPage/components/ProgressBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const run = keyframes`
2727
const Bar = styled.div`
2828
width: 100%;
2929
height: 49px;
30-
background: ${({ theme }) => theme.darkBeigeColor} url("/rectangle.svg");
30+
background: #ffebd7 url("/rectangle.svg");
3131
color: ${({ theme }) => theme.redColor};
3232
border-radius: 15px;
3333
font-weight: 500;
Lines changed: 1 addition & 1 deletion
Loading

airbyte-webapp/src/scss/_colors.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* stylelint-disable color-no-hex, color-hex-length */
2+
$blue-30: #f4f4ff;
3+
$blue-40: #f0efff;
24
$blue-50: #eae9ff;
35
$blue-100: #cbc8ff;
46
$blue-200: #a6a4ff;
@@ -74,10 +76,6 @@ $red-800: #bc0042;
7476
$red-900: #99003f;
7577
$red: $red-300;
7678

77-
$beige-50: #fef9f4;
78-
$beige-100: #ffebd7;
79-
$beige: $beige-50;
80-
8179
$black: #000000;
8280
$white: #ffffff;
8381

airbyte-webapp/src/scss/export.module.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@
8484
red900: colors.$red-900;
8585
red: colors.$red;
8686

87-
beige50: colors.$beige-50;
88-
beige100: colors.$beige-100;
89-
beige: colors.$beige;
90-
9187
black: colors.$black;
9288
white: colors.$white;
9389

airbyte-webapp/src/scss/global.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@use "./colors";
2+
@use "./fonts";
3+
4+
html,
5+
body,
6+
#root {
7+
height: 100%;
8+
width: 100%;
9+
padding: 0;
10+
margin: 0;
11+
font-weight: normal;
12+
-webkit-font-smoothing: antialiased;
13+
color: colors.$dark-blue;
14+
font-family: fonts.$primary;
15+
background: colors.$grey-50;
16+
font-size: 14px;
17+
}
18+
19+
button, input, textarea {
20+
font-family: fonts.$primary;
21+
}
22+
23+
* {
24+
box-sizing: border-box;
25+
}

airbyte-webapp/src/theme.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ export const theme = {
7676
red900: scss.red900,
7777
red: scss.red,
7878

79-
beige50: scss.beige50,
80-
beige100: scss.beige100,
81-
beige: scss.beige,
82-
8379
black: scss.black,
8480
white: scss.white,
8581

@@ -115,7 +111,6 @@ export const theme = {
115111
dangerTransparentColor: scss.red50,
116112
successColor: scss.green,
117113
successColor20: scss.green50,
118-
backgroundColor: scss.beige,
119114
shadowColor: scss.shadowColor,
120115
cardShadowColor: scss.cardShadowColor,
121116

@@ -134,8 +129,6 @@ export const theme = {
134129

135130
whiteColor: scss.white,
136131
blackColor: scss.black,
137-
beigeColor: scss.beige,
138-
darkBeigeColor: scss.beige100,
139132
borderTableColor: scss.grey100,
140133
lightTableColor: scss.grey50,
141134
darkGreyColor: scss.grey400,

airbyte-webapp/src/views/common/ErrorOccurredView/ErrorOccurredView.module.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
margin-bottom: 24px;
1717
}
1818

19-
background: radial-gradient(35.57% 35.57% at 50% 50%, colors.$white 0%, colors.$white 55.87%, colors.$beige 100%);
20-
2119
.content {
2220
max-width: 600px;
2321
text-align: center;

0 commit comments

Comments
 (0)