Skip to content

Commit 0054d21

Browse files
committed
Final pass api-deprecation-sunset-headers-consumer-migration article
1 parent bd1c366 commit 0054d21

30 files changed

Lines changed: 638 additions & 340 deletions

‎_TODO.md‎

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ https://mermaid.js.org/config/directives.html
250250

251251
- Need to improve the "squish" animation where the header reduces in size on scroll down, and returns to full size on scroll up. Maybe reduce and expand the text and search / themepicker / hamburger menu sizes in place, and then slide them horizontally.
252252

253-
## Diagram
254-
255-
Can you add a detailed description to the Diagram on line xxxx for the mermaid diagram right above it? The intention is to provide a detailed description for users with visual impairments so they can understand the diagram.
256-
257253
## Content Issues
258254

259255
- "### Geographic/Currency Mismatches" in deep-dive/cdn-edge-caching-cache-keys-vary-headers has a table -> callout -> table back to back
@@ -270,56 +266,10 @@ Can you add a detailed description to the Diagram on line xxxx for the mermaid d
270266

271267
- We need to check for short form and deep article articles where the deep-dive index.pdf has a non-featured tag like "argo-cd" only in the pdf.mdx. In those cases, we should make sure the callout for the deep dive includes the name of that non-featured (technology) tag
272268

273-
## Table Refactor Instructions
274-
275-
Our current articles have markdown tables. I want to refactor these into using our Table component. I'd like you to take it and use it for the content prop in a Table component instance you add so that the table renders using the same layout as the markdown table. Use the string variant in the tbody -> tr -> th element. Use "vertical-column-delineation-table" for the "variant" prop of the Table component.
276-
277-
Each table will have the "figure" prop as a line below the table, prefixed with "Table: ". We should remove the "Table: " prefix from the figure string as this is used by our Markdown setup to identify figure captions. Do not leave multiple trailing empty lines after the table.
278-
279-
The first file to update is:
280-
281-
## List Refactor Instructions
282-
283-
numbered-with-background-list, check-icons-list
284-
285-
We have lists in our current articles that are of two variants: those that are plain text lists (either ordered or unordered), and those that are lists with both leads and plain texts. Our List component layouts handle both lists with leads and those without. We can identify leads because that text is emphasized with markdown in some fashion: "_", "__", "*", or "**". We need to refactor the markdown lists in a file into either an ordered (numbered-with-background-list) or unordered (check-icons-list) list, and extract lead text if present into the optional lead prop if any lead text is present. The "lead" prop should come first and before the "text" prop in the object. The "lead" prop is the emphasized text that comes first in the list items we are converting to the List component
286-
287-
An example is as follows:
288-
289-
- _Alerts per on-call shift_: Total alert volume during a rotation. Anything above 20 per 24-hour shift is a red flag.
290-
291-
<List
292-
variant="check-icons-list"
293-
items={[
294-
{
295-
lead: "Alerts per on-call shift:",
296-
text: "Total alert volume during a rotation. Anything above 20 per 24-hour shift is a red flag.",
297-
},
298-
]}
299-
/>
300-
301-
The first file to update is:
302-
303-
### Timelines
304-
305-
- Good generation:
306-
307-
api-gateway-metrics-traces-logs-debugging/trace-context-propagation-creating-connected-spans-across-gateway-boundary.jpg
308-
309-
- Needs done:
310-
311-
backpressure-load-shedding-admission-control-overload/backpressure-propagates-from-the-constrained-resource-back-to-the-client.png
312-
313-
argocd-sync-failures-gitops-debugging-troubleshooting/hook-execution-sequence-during-argoc-sync-lifecycle.png
314-
315-
- Not close enough in details:
316-
317-
argocd-sync-failures-gitops-debugging-troubleshooting/resource-dependency-graph-showing-potential-failure-points.png
318-
319-
### Figure captions are broken:
320-
321-
src/content/articles/structured-logging-correlation-ids-log-schema-design/pdf.mdx
322-
323269
### This file was badly mangled during refactoring, need to compare against original:
324270

325271
src/content/articles/internal-developer-portal-platform-self-service-actions/pdf.mdx
272+
273+
## Diagram
274+
275+
Can you add a detailed description to the Diagram on line xxxx for the mermaid diagram right above it? The intention is to provide a detailed description for users with visual impairments so they can understand the diagram.

‎src/components/Diagram/index.astro‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface Props {
1212
}
1313
1414
const { src, title, description } = Astro.props
15+
const hasDefaultSlot = Astro.slots.has('default')
1516
---
1617

1718
<figure class="my-6 mx-auto">
@@ -30,7 +31,11 @@ const { src, title, description } = Astro.props
3031
/>
3132
)}
3233

33-
<slot />
34+
{hasDefaultSlot && (
35+
<div class="flex justify-center">
36+
<slot />
37+
</div>
38+
)}
3439

3540
<figcaption class="mt-3 text-content">
3641
<details class="m-0 border-0 p-0 not-italic">

‎src/components/List/index.astro‎

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ export type Props = {
3838
}
3939
size?: number
4040
variant: string
41+
style?: Record<string, unknown>
4142
}
4243
43-
const { items, size, variant = 'default', classes } = Astro.props
44+
const { items, size, variant = 'default', classes, style } = Astro.props
4445
const classesProps = classes ? { classes } : {}
4546
const sizeProps = size !== undefined ? { size } : {}
47+
const styleProps = style ? { style } : {}
4648
const itemsWithColor = items as Array<{
4749
title?: string
4850
lead?: string
@@ -64,19 +66,19 @@ const plainIconItems = items.filter((item): item is Props['items'][number] & { i
6466
})
6567
---
6668

67-
<div class:list={[classes?.wrapper ? classes.wrapper : 'mb-8']}>
68-
{variant === 'accent-border-left-list' && <AccentBorderLeftList items={items} {...classesProps} />}
69-
{variant === 'badge-list' && <BadgeList items={items} {...classesProps} />}
70-
{variant === 'card-grid-list' && <CardGridList items={items} {...classesProps} />}
71-
{variant === 'check-icons-list' && <CheckIconsList items={items} {...classesProps} />}
72-
{variant === 'chevron-list' && <ChevronList items={items} {...classesProps} />}
73-
{variant === 'colored-marker-list' && <ColoredMarkerList items={itemsWithColor} {...classesProps} {...sizeProps} />}
74-
{variant === 'numbered-with-background-list' && <NumberedWithBackgroundList items={items} {...classesProps} />}
75-
{variant === 'plain-icon-list' && <PlainIconList items={plainIconItems} {...classesProps} {...sizeProps} />}
76-
{variant === 'side-by-side-list' && <SideBySideList items={items} {...classesProps} />}
77-
{variant === 'timeline-list' && <TimelineList items={items} {...classesProps} />}
78-
{variant === 'two-column-check-icons-list' && <TwoColumnCheckIconsList items={items} {...classesProps} {...sizeProps} />}
79-
{variant === 'two-column-icon-list' && <TwoColumnIconList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} />}
80-
{variant === 'three-column-icon-list' && <ThreeColumnIconList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} />}
81-
{variant === 'zebra-list' && <ZebraList items={items} {...classesProps} />}
69+
<div class:list={[classes?.wrapper ? classes.wrapper : 'mb-6']}>
70+
{variant === 'accent-border-left-list' && <AccentBorderLeftList items={items} {...classesProps} {...styleProps} />}
71+
{variant === 'badge-list' && <BadgeList items={items} {...classesProps} {...styleProps} />}
72+
{variant === 'card-grid-list' && <CardGridList items={items} {...classesProps} {...styleProps} />}
73+
{variant === 'check-icons-list' && <CheckIconsList items={items} {...classesProps} {...styleProps} />}
74+
{variant === 'chevron-list' && <ChevronList items={items} {...classesProps} {...styleProps} />}
75+
{variant === 'colored-marker-list' && <ColoredMarkerList items={itemsWithColor} {...classesProps} {...sizeProps} {...styleProps} />}
76+
{variant === 'numbered-with-background-list' && <NumberedWithBackgroundList items={items} {...classesProps} {...styleProps} />}
77+
{variant === 'plain-icon-list' && <PlainIconList items={plainIconItems} {...classesProps} {...sizeProps} {...styleProps} />}
78+
{variant === 'side-by-side-list' && <SideBySideList items={items} {...classesProps} {...styleProps} />}
79+
{variant === 'timeline-list' && <TimelineList items={items} {...classesProps} {...styleProps} />}
80+
{variant === 'two-column-check-icons-list' && <TwoColumnCheckIconsList items={items} {...classesProps} {...sizeProps} {...styleProps} />}
81+
{variant === 'two-column-icon-list' && <TwoColumnIconList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} {...styleProps} />}
82+
{variant === 'three-column-icon-list' && <ThreeColumnIconList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} {...styleProps} />}
83+
{variant === 'zebra-list' && <ZebraList items={items} {...classesProps} {...styleProps} />}
8284
</div>

‎src/components/List/layouts/AccentBorderLeftList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ const { items, classes }: Props = Astro.props
1616
1717
const ulClass = "space-y-4 list-none pl-0"
1818
const liClass = "border-l-4 pl-4"
19-
const headerClass = "text-content-active font-semibold mb-2"
19+
const headerClass = "text-page-inverse font-semibold mb-2"
2020
const textClass = "text-content-offset text-sm"
2121
---
2222

2323
<ul class:list={[ulClass, classes?.ul]}>
2424
{
2525
items.map((item) => (
2626
<li class:list={[liClass, classes?.li, item.color]}>
27-
<h4 class:list={[headerClass, classes?.em]}>{item.lead}</h4>
27+
{item.lead && <h4 class:list={[headerClass, classes?.em]} set:html={item.lead}></h4>}
2828
{Array.isArray(item.text) ? (
2929
<div class="space-y-3">
3030
{item.text.map((paragraph) => (

‎src/components/List/layouts/BadgeList.astro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ const emClass = ["text-content font-bold not-italic mr-2", classes?.em]
2525
{
2626
items.map((item) => (
2727
<li class:list={liClass}>
28-
<span class:list={titleClass}>{item.title}</span>
28+
{item.title && <span class:list={titleClass} set:html={item.title}></span>}
2929
<span>
30-
<em class:list={emClass}>{item.lead}</em>
31-
<span class="text-content-offset">{item.text}</span>
30+
{item.lead && <em class:list={emClass} set:html={item.lead}></em>}
31+
<span class="text-content-offset" set:html={item.text}></span>
3232
</span>
3333
</li>
3434
))

‎src/components/List/layouts/CardGridList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const emClass = ["block text-page-inverse font-semibold not-italic mb-2", classe
2929
{item.icon && (
3030
<Icon icon={item.icon} color="page-inverse" size={6} classes="mr-4 -mb-2" />
3131
)}
32-
<em class:list={emClass}>{item.lead}</em>
32+
{item.lead && <em class:list={emClass} set:html={item.lead}></em>}
3333
</div>
34-
<span class="text-content">{item.text}</span>
34+
<span class="text-content" set:html={item.text}></span>
3535
</li>
3636
))
3737
}

‎src/components/List/layouts/CheckIconsList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ const emClass = ["text-content font-semibold not-italic", classes?.em]
3434
<span>
3535
{item.lead && (
3636
<>
37-
<em class:list={emClass}>{item.lead}</em>
37+
<em class:list={emClass} set:html={item.lead}></em>
3838
<span class="text-content-offset/60 ml-1">—</span>
3939
</>
4040
)}
41-
<span class={`text-content-offset`}>{item.text}</span>
41+
<span class={`text-content-offset`} set:html={item.text}></span>
4242
</span>
4343
</li>
4444
))

‎src/components/List/layouts/ChevronList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const textClass = "block text-content-offset mt-0.5"
3636
/>
3737
</span>
3838
<div>
39-
<em class:list={emClass}>{item.lead}</em>
40-
<span class:list={textClass}>{item.text}</span>
39+
{item.lead && <em class:list={emClass} set:html={item.lead}></em>}
40+
<span class:list={textClass} set:html={item.text}></span>
4141
</div>
4242
</div>
4343
</li>

‎src/components/List/layouts/ColoredMarkerList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const textClass = classes?.text ? [classes.text] : []
3232
<li class:list={liClass}>
3333
<span class:list={[iconClass, item.color]} style={markerStyle} />
3434
<div class="flex flex-col sm:flex-row sm:items-start">
35-
{item.lead && <em class:list={emClass}>{item.lead}</em>}
36-
<span class:list={textClass}>{item.text}</span>
35+
{item.lead && <em class:list={emClass} set:html={item.lead}></em>}
36+
<span class:list={textClass} set:html={item.text}></span>
3737
</div>
3838
</li>
3939
))

‎src/components/List/layouts/NumberedWithBackgroundList.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const emClass = ["text-primary-offset font-semibold not-italic", classes?.em]
2424
<li class:list={liClass}>
2525
<span class="mt-2 shrink-0 w-8 h-8 bg-primary-offset text-content-inverse rounded-full flex items-center justify-center text-sm font-bold">{index + 1}</span>
2626
<div class="pt-1">
27-
<em class:list={emClass}>{item.lead}</em>
28-
<div>{item.text}</div>
27+
{item.lead && <em class:list={emClass} set:html={item.lead}></em>}
28+
<div set:html={item.text}></div>
2929
</div>
3030
</li>
3131
))

0 commit comments

Comments
 (0)