Skip to content

Commit 5a27df9

Browse files
Tim Roesdrewrasm
authored andcommitted
Add links to demo page (airbytehq#18828)
1 parent c648057 commit 5a27df9

File tree

6 files changed

+39
-6
lines changed

6 files changed

+39
-6
lines changed

airbyte-webapp/src/components/common/EmptyResourceListView/EmptyResourceListView.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "scss/colors";
2+
@use "scss/variables";
23

34
.container {
45
display: flex;
@@ -42,3 +43,7 @@
4243
left: 0;
4344
}
4445
}
46+
47+
.footer {
48+
margin-top: variables.$spacing-xl;
49+
}

airbyte-webapp/src/components/common/EmptyResourceListView/EmptyResourceListView.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ interface EmptyResourceListViewProps {
1212
buttonLabel: string;
1313
resourceType: "connections" | "destinations" | "sources";
1414
onCreateClick: () => void;
15+
footer?: React.ReactNode;
1516
}
1617

1718
export const EmptyResourceListView: React.FC<EmptyResourceListViewProps> = ({
1819
resourceType,
1920
onCreateClick,
2021
buttonLabel,
22+
footer,
2123
}) => {
2224
const { headingMessageId, singularResourceType } = useMemo(() => {
2325
const singularResourceType = resourceType.substring(0, resourceType.length - 1);
@@ -50,6 +52,7 @@ export const EmptyResourceListView: React.FC<EmptyResourceListViewProps> = ({
5052
<Button onClick={onCreateClick} size="lg" data-id={`new-${singularResourceType}`}>
5153
{buttonLabel}
5254
</Button>
55+
{footer && <div className={styles.footer}>{footer}</div>}
5356
</div>
5457
);
5558
};

airbyte-webapp/src/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
"sidebar.resources": "Resources",
1818
"sidebar.documentation": "Documentation",
1919
"sidebar.joinSlack": "Join our Slack",
20-
"sidebar.status": "Airbyte status",
20+
"sidebar.status": "Airbyte Status",
2121
"sidebar.chat": "Chat with us",
2222
"sidebar.support": "Support",
2323
"sidebar.supportTicket": "Submit a Ticket",
2424
"sidebar.recipes": "Tutorials - Use cases",
25+
"sidebar.demo": "Explore our demo",
2526

2627
"form.continue": "Continue",
2728
"form.error": "Error: {message}",
@@ -334,6 +335,7 @@
334335
"syncMode.full_refresh": "Full refresh",
335336
"syncMode.incremental": "Incremental",
336337

338+
"connection.emptyStateFooter": "or play around in our <demoLnk>demo instance</demoLnk>.",
337339
"connection.resetModalTitle": "Stream configuration changed",
338340
"connection.streamResetHint": "Due to changes in the stream configuration, we recommend a data reset. A reset will delete data in the destination of the affected streams and then re-sync that data. Skipping the reset is discouraged and might lead to unexpected behavior.",
339341
"connection.streamFullResetHint": "Due to changes in the stream configuration, we recommend a data reset. A reset will delete data in the destination of the affected streams and then re-sync that data. Skipping the reset is discouraged and might lead to unexpected behavior.",

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { faSlack } from "@fortawesome/free-brands-svg-icons";
22
import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
3-
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
3+
import { faDesktop, faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
44
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
55
import React from "react";
66
import { FormattedMessage, FormattedNumber } from "react-intl";
@@ -23,7 +23,6 @@ import ChatIcon from "views/layout/SideBar/components/ChatIcon";
2323
import ConnectionsIcon from "views/layout/SideBar/components/ConnectionsIcon";
2424
import DestinationIcon from "views/layout/SideBar/components/DestinationIcon";
2525
import OnboardingIcon from "views/layout/SideBar/components/OnboardingIcon";
26-
import RecipesIcon from "views/layout/SideBar/components/RecipesIcon";
2726
import SettingsIcon from "views/layout/SideBar/components/SettingsIcon";
2827
import { SidebarDropdownMenu, SidebarDropdownMenuItemType } from "views/layout/SideBar/components/SidebarDropdownMenu";
2928
import SourceIcon from "views/layout/SideBar/components/SourceIcon";
@@ -129,9 +128,9 @@ const SideBar: React.FC = () => {
129128
},
130129
{
131130
type: SidebarDropdownMenuItemType.LINK,
132-
href: links.tutorialLink,
133-
icon: <RecipesIcon />,
134-
displayName: <FormattedMessage id="sidebar.recipes" />,
131+
href: links.demoLink,
132+
icon: <FontAwesomeIcon icon={faDesktop} />,
133+
displayName: <FormattedMessage id="sidebar.demo" />,
135134
},
136135
]}
137136
/>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@use "scss/colors";
2+
3+
.link {
4+
color: colors.$dark-blue;
5+
6+
&:hover,
7+
&:focus {
8+
color: colors.$blue-400;
9+
}
10+
}

airbyte-webapp/src/pages/ConnectionPage/pages/AllConnectionsPage/AllConnectionsPage.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ import { PageHeader } from "components/ui/PageHeader";
1212

1313
import { useTrackPage, PageTrackingCodes } from "hooks/services/Analytics";
1414
import { useConnectionList } from "hooks/services/useConnectionHook";
15+
import { links } from "utils/links";
1516

1617
import { RoutePaths } from "../../../routePaths";
18+
import styles from "./AllConnectionsPage.module.scss";
1719
import ConnectionsTable from "./components/ConnectionsTable";
1820

1921
const AllConnectionsPage: React.FC = () => {
@@ -48,6 +50,18 @@ const AllConnectionsPage: React.FC = () => {
4850
resourceType="connections"
4951
onCreateClick={onCreateClick}
5052
buttonLabel={formatMessage({ id: "connection.createFirst" })}
53+
footer={
54+
<FormattedMessage
55+
id="connection.emptyStateFooter"
56+
values={{
57+
demoLnk: (children: React.ReactNode) => (
58+
<a href={links.demoLink} target="_blank" rel="noreferrer noopener" className={styles.link}>
59+
{children}
60+
</a>
61+
),
62+
}}
63+
/>
64+
}
5165
/>
5266
)}
5367
</Suspense>

0 commit comments

Comments
 (0)