Skip to content

Commit e50086e

Browse files
merge main to pagefind-implementation
2 parents 107a444 + 23f4a57 commit e50086e

File tree

12 files changed

+116
-78
lines changed

12 files changed

+116
-78
lines changed

components/ConnectorDetailsHeader/ConnectorDetailsHeader.module.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
margin: 32px 0px;
33
display:flex;
44
flex-direction: column;
5-
gap: 12px
5+
gap: 6px
66
}
77

88
.Heading{
@@ -39,7 +39,18 @@
3939
border-radius: 28px;
4040
}
4141

42+
.FeaturesHeading{
43+
font-size: 14px;
44+
color: var(--gray-text-color);
45+
}
46+
4247
.SubHeading{
48+
display: flex;
49+
flex-direction: column;
50+
gap: 8px;
51+
}
52+
53+
.FeaturesList{
4354
display: flex;
4455
flex-wrap: wrap;
4556
gap: 12px;
@@ -50,6 +61,9 @@
5061
font-size: 12px;
5162
border-radius: 14px;
5263
width: fit-content;
64+
display: flex;
65+
align-items: center;
66+
gap: 4px
5367
}
5468

5569
.AvailableFeature{

components/ConnectorDetailsHeader/ConnectorDetailsHeader.tsx

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import classNames from "classnames";
2+
import { isEmpty } from "lodash";
3+
import { useMemo } from "react";
4+
import { ReactComponent as CheckIcon } from "../../images/icons/check.svg";
5+
import { ReactComponent as CrossIcon } from "../../images/icons/cross.svg";
26
import {
37
getConnectorImage,
48
getConnectorPlatformIcon,
@@ -14,6 +18,11 @@ function ConnectorDetailsHeader({
1418
availableFeatures,
1519
unavailableFeatures,
1620
}: Readonly<ConnectorDetailsHeaderProps>) {
21+
const showSubHeading = useMemo(
22+
() => !isEmpty(availableFeatures) || !isEmpty(unavailableFeatures),
23+
[availableFeatures, unavailableFeatures]
24+
);
25+
1726
return (
1827
<div className={styles.Container}>
1928
<div className={styles.Heading}>
@@ -29,24 +38,37 @@ function ConnectorDetailsHeader({
2938
</div>
3039
</div>
3140
</div>
32-
<div className={styles.SubHeading}>
33-
{availableFeatures.map((feature) => (
34-
<div
35-
className={classNames(styles.FeatureTag, styles.AvailableFeature)}
36-
key={feature}
37-
>
38-
{feature}
39-
</div>
40-
))}
41-
{unavailableFeatures.map((feature) => (
42-
<div
43-
className={classNames(styles.FeatureTag, styles.UnavailableFeature)}
44-
key={feature}
45-
>
46-
{feature}
41+
{showSubHeading && (
42+
<div className={styles.SubHeading}>
43+
<div className={styles.FeaturesHeading}>Feature List</div>
44+
<div className={styles.FeaturesList}>
45+
{availableFeatures.map((feature) => (
46+
<div
47+
className={classNames(
48+
styles.FeatureTag,
49+
styles.AvailableFeature
50+
)}
51+
key={feature}
52+
>
53+
{feature}
54+
<CheckIcon height={12} />
55+
</div>
56+
))}
57+
{unavailableFeatures.map((feature) => (
58+
<div
59+
className={classNames(
60+
styles.FeatureTag,
61+
styles.UnavailableFeature
62+
)}
63+
key={feature}
64+
>
65+
{feature}
66+
<CrossIcon height={14} />
67+
</div>
68+
))}
4769
</div>
48-
))}
49-
</div>
70+
</div>
71+
)}
5072
</div>
5173
);
5274
}

components/ConnectorsInfo/ConnectorsInfo.constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export const CONNECTORS: Array<ConnectorCategory> = [
2424
icon: "./images/connectors/bigquery.png",
2525
name: "BigQuery",
2626
},
27+
{
28+
url: "/connectors/database/bigtable",
29+
icon: "./images/connectors/big-table.png",
30+
name: "BigTable",
31+
supportedVersion: "v1.3.x",
32+
},
2733
{
2834
url: "/connectors/database/clickhouse",
2935
icon: "./images/connectors/clickhouse.png",

components/ConnectorsListContainer/ConnectorsListContainer.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.Container{
2-
margin-top: 24px;
2+
margin: 24px 0px;
33
display: grid;
44
gap: 24px
55
}

components/common/Icon/Icon.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import React from "react";
21
import { ReactComponent as CheckIcon } from "../../../images/icons/check.svg";
32
import { ReactComponent as CrossIcon } from "../../../images/icons/cross.svg";
43

54
function Icon({ iconName }: { iconName: string }) {
65
let IconComponent: SvgComponent;
6+
let iconColor = "currentColor";
77

88
switch (iconName) {
99
case "check":
1010
IconComponent = CheckIcon;
1111
break;
1212
case "cross":
1313
IconComponent = CrossIcon;
14+
iconColor = "#CB2431";
1415
break;
1516
default:
1617
return <></>;
1718
}
1819

19-
return <IconComponent />;
20+
return <IconComponent height={16} color={iconColor} />;
2021
}
2122

2223
export default Icon;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface YouTubeProps {
2+
className?: string;
3+
videoId: string;
4+
start?: string;
5+
end?: string;
6+
height?: string;
7+
width?: string;
8+
}

components/common/Youtube/Youtube.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
.IframeContainer {
2-
position: relative;
3-
margin-top: 16px;
1+
.Container{
2+
display: flex;
3+
justify-content: center;
4+
margin: 32px 0px;
45
}
56

67
.Iframe {
Lines changed: 16 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,28 @@
1+
import classNames from "classnames";
2+
import { YouTubeProps } from "./Youtube.interface";
13
import styles from "./Youtube.module.css";
24

3-
interface YouTubeProps {
4-
videoId: string;
5-
start?: string;
6-
end?: string;
7-
caption?: string;
8-
height?: string;
9-
width?: string;
10-
}
11-
125
const YouTube = ({
13-
caption = "",
6+
className = "",
147
videoId,
158
start = "",
169
end = "",
1710
height,
1811
width,
1912
}: YouTubeProps) => {
20-
let YouTubeBlock;
21-
22-
if (caption) {
23-
YouTubeBlock = (
24-
<section className={styles.Container}>
25-
<section className={styles.IframeContainer}>
26-
<iframe
27-
allowFullScreen
28-
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
29-
className={styles.Iframe}
30-
title="YouTube video player"
31-
frameBorder="0"
32-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
33-
style={{ height, width }}
34-
></iframe>
35-
</section>
36-
<section className={styles.CaptionContainer}>
37-
<p className={styles.Caption}>{caption}</p>
38-
</section>
39-
</section>
40-
);
41-
} else {
42-
YouTubeBlock = (
43-
<section className={styles.IframeContainer} style={{ height, width }}>
44-
<iframe
45-
allowFullScreen
46-
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
47-
className={styles.Iframe}
48-
title="YouTube video player"
49-
frameBorder="0"
50-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
51-
style={{ height, width }}
52-
></iframe>
53-
</section>
54-
);
55-
}
56-
return YouTubeBlock;
13+
return (
14+
<div className={classNames(styles.Container, className)}>
15+
<iframe
16+
allowFullScreen
17+
src={`https://www.youtube-nocookie.com/embed/${videoId}?rel=0&start=${start}&end=${end}&rel=0`}
18+
className={styles.Iframe}
19+
title="YouTube video player"
20+
frameBorder="0"
21+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
22+
style={{ height, width }}
23+
></iframe>
24+
</div>
25+
);
5726
};
5827

5928
export default YouTube;

images/icons/check.svg

Lines changed: 1 addition & 1 deletion
Loading

images/icons/cross.svg

Lines changed: 9 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)