Skip to content

Commit ffbd0e7

Browse files
authored
ds-updates (#2728)
1 parent f2f83d1 commit ffbd0e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3123
-438
lines changed
76.2 KB
Loading

src/components/ClickToZoom.astro

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,58 @@ export type Props = {
33
src: string
44
alt?: string
55
style?: string
6+
caption?: string
67
}
7-
const { src, alt, style } = Astro.props as Props
8+
const { src, alt, style, caption } = Astro.props as Props
89
910
/**
1011
* This component adds the classNames required by the scripts/click-to-zoom.ts script.
1112
*/
1213
---
1314

14-
<img src={src} alt={alt} style={style} class="click-to-zoom" />
15+
<div class="click-to-zoom-container">
16+
<img src={src} alt={alt} style={style} class="click-to-zoom" data-caption={caption} />
17+
{caption && <p class="click-to-zoom-caption">{caption}</p>}
18+
</div>
1519

1620
<style>
21+
.click-to-zoom-container {
22+
display: flex;
23+
flex-direction: column;
24+
align-items: center;
25+
margin-bottom: 2rem;
26+
}
1727
.click-to-zoom {
1828
margin-top: 1em;
19-
max-height: 50vh; /* Use viewport units for better adaptability */
29+
max-height: 50vh;
2030
cursor: zoom-in;
31+
display: block;
32+
margin-left: auto;
33+
margin-right: auto;
34+
}
35+
.click-to-zoom-caption {
36+
font-size: 0.8rem;
37+
text-align: center;
38+
margin-top: 0.5rem;
39+
color: var(--color-text-secondary);
2140
}
2241
</style>
2342
<style is:global>
2443
#expanded-image-preview {
25-
max-height: 90vh; /* Increased for more visibility on larger screens */
26-
max-width: 95vw; /* Increased for a better experience */
44+
max-height: 90vh;
45+
max-width: 95vw;
2746
}
2847
#expanded-image-wrapper {
2948
width: 100vw;
3049
height: 100vh;
3150
position: fixed;
3251
top: 0;
3352
left: 0;
34-
background: rgba(0, 0, 0, 0.214);
53+
background: rgba(0, 0, 0, 0.6);
54+
backdrop-filter: blur(5px);
55+
-webkit-backdrop-filter: blur(5px);
3556
z-index: 100;
57+
flex-direction: column;
3658
justify-content: center;
3759
align-content: center;
3860
align-items: center;
@@ -45,4 +67,16 @@ const { src, alt, style } = Astro.props as Props
4567
display: flex;
4668
}
4769
}
70+
71+
.expanded-image-caption {
72+
background-color: rgba(0, 0, 0, 0.7);
73+
color: white;
74+
padding: 8px 15px;
75+
border-radius: 5px;
76+
font-size: 0.9rem;
77+
text-align: center;
78+
max-width: 80%;
79+
z-index: 101;
80+
margin-top: 1rem;
81+
}
4882
</style>

src/components/CopyText.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const CopyContainer = ({ text, code, format, formatType, eventName, additionalIn
6060
text-overflow: ellipsis;
6161
word-break: break-all;
6262
margin-top: 0;
63+
margin-bottom: 0 !important;
6364
}
6465
6566
.copyBtn {

src/config/sidebar.ts

Lines changed: 64 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -342,56 +342,38 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
342342
],
343343
},
344344
{
345-
section: "Streams Trade",
346-
contents: [
347-
{
348-
title: "Overview",
349-
url: "data-streams/streams-trade",
350-
},
351-
{
352-
title: "Getting Started",
353-
url: "data-streams/getting-started",
354-
highlightAsCurrent: ["data-streams/getting-started-hardhat"],
355-
},
356-
{
357-
title: "Handle StreamsLookup errors",
358-
url: "data-streams/tutorials/streams-trade/streams-trade-lookup-error-handler",
359-
},
360-
],
361-
},
362-
{
363-
section: "Streams Direct",
345+
section: "Tutorials",
364346
contents: [
365347
{
366348
title: "Overview",
367-
url: "data-streams/streams-direct",
349+
url: "data-streams/tutorials/overview",
368350
},
369351
{
370352
title: "Fetch and decode reports",
371-
url: "data-streams/tutorials/streams-direct/streams-direct-api-go",
353+
url: "data-streams/tutorials/api-go",
372354
highlightAsCurrent: [
373-
"data-streams/tutorials/streams-direct/streams-direct-api-rust",
374-
"data-streams/tutorials/streams-direct/streams-direct-api-rwa-go",
375-
"data-streams/tutorials/streams-direct/streams-direct-api-rwa-rust",
355+
"data-streams/tutorials/api-rust",
356+
"data-streams/tutorials/api-rwa-go",
357+
"data-streams/tutorials/api-rwa-rust",
376358
],
377359
},
378360
{
379361
title: "Stream and decode reports (WebSocket)",
380-
url: "data-streams/tutorials/streams-direct/streams-direct-ws-go",
362+
url: "data-streams/tutorials/ws-go",
381363
highlightAsCurrent: [
382-
"data-streams/tutorials/streams-direct/streams-direct-ws-rust",
383-
"data-streams/tutorials/streams-direct/streams-direct-ws-rwa-go",
384-
"data-streams/tutorials/streams-direct/streams-direct-ws-rwa-rust",
364+
"data-streams/tutorials/ws-rust",
365+
"data-streams/tutorials/ws-rwa-go",
366+
"data-streams/tutorials/ws-rwa-rust",
385367
],
386368
},
387369
{
388370
title: "Verify report data (EVM)",
389-
url: "data-streams/tutorials/streams-direct/evm-onchain-report-verification",
371+
url: "data-streams/tutorials/evm-onchain-report-verification",
390372
},
391373
{
392374
title: "Verify report data (Solana)",
393-
url: "data-streams/tutorials/streams-direct/solana-onchain-report-verification",
394-
highlightAsCurrent: ["data-streams/tutorials/streams-direct/solana-offchain-report-verification"],
375+
url: "data-streams/tutorials/solana-onchain-report-verification",
376+
highlightAsCurrent: ["data-streams/tutorials/solana-offchain-report-verification"],
395377
},
396378
],
397379
},
@@ -412,32 +394,70 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
412394
section: "Reference",
413395
contents: [
414396
{
415-
title: "Streams Trade",
416-
url: "data-streams/reference/streams-trade-interface",
397+
title: "Overview",
398+
url: "data-streams/reference/overview",
399+
},
400+
{
401+
title: "REST API",
402+
url: "data-streams/reference/interface-api",
403+
},
404+
{
405+
title: "WebSocket",
406+
url: "data-streams/reference/interface-ws",
417407
},
418408
{
419-
title: "Streams Direct",
420-
url: "data-streams/reference/streams-direct",
409+
title: "Authentication",
410+
url: "data-streams/reference/authentication",
421411
children: [
422412
{
423-
title: "REST API",
424-
url: "data-streams/reference/streams-direct/streams-direct-interface-api",
413+
title: "JavaScript examples",
414+
url: "data-streams/reference/authentication/javascript-examples",
425415
},
426416
{
427-
title: "WebSocket",
428-
url: "data-streams/reference/streams-direct/streams-direct-interface-ws",
417+
title: "TypeScript examples",
418+
url: "data-streams/reference/authentication/typescript-examples",
429419
},
430420
{
431-
title: "SDK References",
432-
url: "data-streams/reference/streams-direct/streams-direct-go-sdk",
433-
highlightAsCurrent: ["data-streams/reference/streams-direct/streams-direct-rust-sdk"],
421+
title: "Go examples",
422+
url: "data-streams/reference/authentication/go-examples",
434423
},
435424
{
436-
title: "Onchain report verification (EVM chains)",
437-
url: "data-streams/reference/streams-direct/streams-direct-onchain-verification",
425+
title: "Rust examples",
426+
url: "data-streams/reference/authentication/rust-examples",
438427
},
439428
],
440429
},
430+
{
431+
title: "SDK References",
432+
url: "data-streams/reference/go-sdk",
433+
highlightAsCurrent: ["data-streams/reference/rust-sdk"],
434+
},
435+
{
436+
title: "Onchain report verification (EVM chains)",
437+
url: "data-streams/reference/onchain-verification",
438+
},
439+
],
440+
},
441+
{
442+
section: "Streams Trade",
443+
contents: [
444+
{
445+
title: "Overview",
446+
url: "data-streams/streams-trade",
447+
},
448+
{
449+
title: "Getting Started",
450+
url: "data-streams/tutorials/streams-trade/getting-started",
451+
highlightAsCurrent: ["data-streams/tutorials/streams-trade/getting-started-hardhat"],
452+
},
453+
{
454+
title: "Handle StreamsLookup errors",
455+
url: "data-streams/tutorials/streams-trade/streams-trade-lookup-error-handler",
456+
},
457+
{
458+
title: "Reference (Interfaces)",
459+
url: "data-streams/streams-trade/interfaces",
460+
},
441461
],
442462
},
443463
{

src/content/chainlink-automation/concepts/best-practice.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If your upkeep performs **sensitive** functions in your protocol, consider using
3636

3737
### Verify Data Streams reports fetched with StreamsLookup
3838

39-
If your upkeep uses [StreamsLookup](/chainlink-automation/reference/automation-interfaces#streamslookupcompatibleinterface), ensure you use the [verification interface](/data-streams/reference/interfaces) to verify your reports onchain.
39+
If your upkeep uses [StreamsLookup](/chainlink-automation/reference/automation-interfaces#streamslookupcompatibleinterface), ensure you use the [verification interface](/data-streams/streams-trade/interfaces) to verify your reports onchain.
4040

4141
### Avoid "flickering" custom logic upkeeps
4242

0 commit comments

Comments
 (0)