Skip to content

Commit fda0522

Browse files
committed
Styling fixes to table and list components in strangler-fig-migration-complete-guide article
1 parent 2a265d3 commit fda0522

3 files changed

Lines changed: 184 additions & 71 deletions

File tree

‎src/components/Troubleshooter/index.astro‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { randomUUID } from 'node:crypto'
3+
24
import Icon from '@components/Icon/index.astro'
35
46
type TroubleshooterItem = {
@@ -28,6 +30,8 @@ const sectionMeta = {
2830
fixes: { icon: 'wrench', color: 'success', label: 'Fix' },
2931
} satisfies Record<keyof Props['items'], { icon: string; color: string; label: string }>
3032
33+
const sectionIdBase = `troubleshooter-${randomUUID()}`
34+
3135
function getSectionClassNames(color: string) {
3236
return {
3337
headerBg: `bg-${color}-inverse`,
@@ -49,7 +53,7 @@ function getSectionClassNames(color: string) {
4953
<div class="flex flex-col gap-3">
5054
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
5155
<p class="m-0 text-xs font-bold uppercase tracking-[0.14em] text-content-offset">Troubleshooting</p>
52-
<div class="hidden flex-wrap gap-2 text-xs sm:flex">
56+
<div class="hidden flex-wrap gap-2 text-xs sm:flex" aria-hidden="true">
5357
<span class="rounded-full bg-danger-inverse px-3 py-1 font-semibold text-danger">Build Integrity</span>
5458
<span class="rounded-full bg-warning-inverse px-3 py-1 font-semibold text-warning">Root Cause</span>
5559
<span class="rounded-full bg-info-inverse px-3 py-1 font-semibold text-info">Verification</span>
@@ -65,6 +69,7 @@ function getSectionClassNames(color: string) {
6569
<div class="flex flex-col">
6670
{([['symptoms', 'causes'], ['diagnosis', 'fixes']] as const).map((pair, rowIndex) => {
6771
const cards = pair.map((key) => ({
72+
key,
6873
meta: sectionMeta[key],
6974
items: items[key],
7075
}))
@@ -76,23 +81,29 @@ function getSectionClassNames(color: string) {
7681
]}>
7782
{cards.map((card, colIndex) => {
7883
const colorClasses = getSectionClassNames(card.meta.color)
84+
const sectionHeadingId = `${sectionIdBase}-${card.key}`
7985

8086
return (
81-
<article class:list={[
87+
<section
88+
aria-labelledby={sectionHeadingId}
89+
class:list={[
8290
'flex flex-1 flex-col',
8391
colIndex === 0 ? 'md:border-r border-trim' : '',
8492
colIndex === 0 ? 'bg-content-inverse' : 'bg-page-base',
85-
]}>
93+
]}>
8694
<div class:list={[
8795
'flex items-center gap-3 border-b border-t-4 border-trim-offset px-6 py-3',
8896
colorClasses.headerBg,
8997
colorClasses.headerTopBorder,
9098
]}>
9199
<Icon icon={card.meta.icon} size={5} color={card.meta.color} />
92-
<h5 class:list={[
100+
<h4
101+
class:list={[
93102
'm-0 text-sm font-bold uppercase tracking-[0.12em]',
94103
colorClasses.headerText,
95-
]}>{card.meta.label}</h5>
104+
]}
105+
id={sectionHeadingId}
106+
>{card.meta.label}</h4>
96107
</div>
97108
<div class="grow px-6 py-5 text-base text-content">
98109
{!card.items.lead && card.items.items.length === 0 ? (
@@ -117,14 +128,14 @@ function getSectionClassNames(color: string) {
117128
<span class:list={[
118129
'mt-1.5 flex h-2 w-2 shrink-0 rounded-full',
119130
colorClasses.markerBg,
120-
]} />
131+
]} aria-hidden="true" />
121132
<span set:html={item.text} />
122133
</li>
123134
))}
124135
</ul>
125136
)}
126137
</div>
127-
</article>
138+
</section>
128139
)
129140
})}
130141
</div>

‎src/content/articles/strangler-fig-migration-complete-guide/index.mdx‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import shadowTrafficDiagram from "./diagrams/shadow-traffic-architecture-for-par
1313

1414
Big-bang migrations fail at alarming rates. Large IT transformation projects routinely exceed budgets and timelines - McKinsey research found that large projects run 45% over budget and 7% over time while delivering 56% less value than predicted. The fundamental problem isn't the new technology or the team's capabilities - it's the validation gap. Teams build entire replacement systems in isolation, then discover on cutover day that their assumptions about the legacy system's behavior were wrong.
1515

16-
The strangler fig pattern offers a different approach: incremental replacement with continuous validation. But the pattern alone isn't enough. The real power comes from treating migration as an observability problem first and a development problem second. When you can prove that your new service behaves identically to the legacy system __before__ any traffic shifts, migration becomes a series of low-risk deployments rather than a high-stakes gamble.
16+
The strangler fig pattern offers a different approach: incremental replacement with continuous validation. But the pattern alone isn't enough. <Highlighter>The real power comes from treating migration as an observability problem first and a development problem second.</Highlighter> When you can prove that your new service behaves identically to the legacy system _before_ any traffic shifts, migration becomes a series of low-risk deployments rather than a high-stakes gamble.
1717

1818
## Why the Strangler Fig Pattern Works
1919

@@ -22,8 +22,13 @@ The strangler fig pattern, named after tropical fig trees that gradually envelop
2222
This approach succeeds where big-bang rewrites fail because it maintains continuous validation against production reality. You're not guessing whether your new authentication service handles edge cases correctly - you're proving it with real requests.
2323

2424
<Table
25-
variant="vertical-column-delineation-table"
25+
variant="grid-and-accent-header-table"
26+
fullWidth={false}
27+
classes={{
28+
tbody: '!text-content',
29+
}}
2630
content={{
31+
figure: 'Migration approach comparison',
2732
thead: {
2833
th: ['Aspect', 'Big-Bang Rewrite', 'Strangler Fig Migration'],
2934
},
@@ -51,7 +56,6 @@ This approach succeeds where big-bang rewrites fail because it maintains continu
5156
},
5257
],
5358
},
54-
figure: 'Migration approach comparison',
5559
}}
5660
/>
5761

@@ -123,7 +127,12 @@ Once shadow testing proves your new service matches legacy behavior, you're read
123127
A progressive traffic shift schedule balances validation time against migration velocity. Moving too fast risks missing problems that only appear under sustained load. Moving too slowly extends the period where you're maintaining two systems.
124128

125129
<Table
126-
variant="vertical-column-delineation-table"
130+
variant="criteria-highlight-table"
131+
fullWidth={false}
132+
classes={{
133+
tbody:
134+
'[&_td:nth-child(2)]:text-center',
135+
}}
127136
content={{
128137
thead: {
129138
th: ['Phase', 'New Service Traffic', 'Duration', 'Success Criteria'],
@@ -161,7 +170,8 @@ The automation layer monitors these criteria continuously and triggers rollback
161170
Effective rollback triggers balance sensitivity against false positives:
162171

163172
<Table
164-
variant="vertical-column-delineation-table"
173+
variant="numbered-review-table"
174+
fullWidth={false}
165175
content={{
166176
thead: {
167177
th: ['Trigger', 'Threshold', 'Rationale'],

0 commit comments

Comments
 (0)