Skip to content

Commit eb92560

Browse files
authored
docs: add debounce hook, update multi-provider links (#1286)
- updates multi-provider links - adds debounce hook - fixes bug with category pills being jammed together. Signed-off-by: Todd Baert <[email protected]>
1 parent 9be6404 commit eb92560

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

src/datasets/hooks/debounce.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import StopWatch from '@site/static/img/stopwatch-no-fill.svg';
2+
import { Hook } from '.';
3+
4+
export const Debounce: Hook = {
5+
name: 'Debounce',
6+
logo: StopWatch,
7+
description: 'Rate-limits or "debounces" flag evaluations',
8+
technologies: [
9+
{
10+
technology: 'JavaScript',
11+
vendorOfficial: false,
12+
href: 'https://github.com/open-feature/js-sdk-contrib/tree/main/libs/hooks/debounce',
13+
category: ['Server', 'Client'],
14+
},
15+
],
16+
};

src/datasets/hooks/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type { ComponentType, SVGProps } from 'react';
22
import { OpenTelemetry } from './opentelemetry';
33
import { Validation } from './validation';
4+
import { Debounce } from './debounce';
45
import { Datadog } from './datadog';
56
import { Sentry } from './sentry';
67
import { Category, EcosystemElement, Technology } from '../types';
78

8-
export const ECOSYSTEM_HOOKS: EcosystemElement[] = [OpenTelemetry, Validation, Datadog, Sentry]
9+
export const ECOSYSTEM_HOOKS: EcosystemElement[] = [OpenTelemetry, Validation, Datadog, Sentry, Debounce]
910
.map((hook) => {
1011
return hook.technologies.map(({ vendorOfficial, technology, href, category }): EcosystemElement => {
1112
return {

src/datasets/providers/multi-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ export const MultiProvider: Provider = {
99
{
1010
technology: 'JavaScript',
1111
vendorOfficial: false,
12-
href: 'https://github.com/open-feature/js-sdk-contrib/tree/main/libs/providers/multi-provider',
12+
href: 'https://github.com/open-feature/js-sdk/tree/main/packages/server#multi-provider',
1313
category: ['Server'],
1414
},
1515
{
1616
technology: 'JavaScript',
1717
vendorOfficial: false,
18-
href: 'https://github.com/open-feature/js-sdk-contrib/tree/main/libs/providers/multi-provider-web',
18+
href: 'https://github.com/open-feature/js-sdk/tree/main/packages/web#multi-provider',
1919
category: ['Client'],
2020
},
2121
{

src/partials/ecosystem/hit.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ export default function Hit({ hit }: { hit: EcosystemElement | OFREPElement }) {
3232
{hit.parentTechnology && (
3333
<Pill color={TECHNOLOGY_COLOR_MAP[hit.parentTechnology]}>{hit.parentTechnology}</Pill>
3434
)}
35-
<Pill>{hit.category}</Pill>
35+
{hit.category.map((cat) => (
36+
<Pill key={cat}>
37+
{cat}
38+
</Pill>
39+
))}
3640
</>
3741
)}
3842
<Pill color={TYPE_COLOR_MAP[hit.type]}>{hit.type}</Pill>

static/img/stopwatch-no-fill.svg

Lines changed: 8 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)