Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ jobs:
else
echo "has_tests=false" >> $GITHUB_OUTPUT
fi
MATRIX=$(echo "$TESTS" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[].test] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}')
MATRIX=$(echo "$TESTS" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[] | "\(.test) (\(.file | split("/")[2:4] | join("/")))"] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}')
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
echo "Discovered $COUNT functional/live test case(s)"

Expand All @@ -343,7 +343,7 @@ jobs:
else
echo "has_credentialed_tests=false" >> $GITHUB_OUTPUT
fi
MATRIX_CREDENTIALED=$(echo "$TESTS_CREDENTIALED" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[].test] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}')
MATRIX_CREDENTIALED=$(echo "$TESTS_CREDENTIALED" | jq -c '(length | [., 40] | min) as $shards | . as $tests | {include: [range($shards) | . as $i | ([$tests | to_entries[] | select(.key % $shards == $i) | .value] as $shard | {shard_index: $i, test_count: ($shard | length), tests: ($shard | tojson), shard_name: ($shard | [.[] | "\(.test) (\(.file | split("/")[2:4] | join("/")))"] | join(", ") | if length > 80 then .[:77] + "..." else . end)})]}')
echo "matrix_credentialed=${MATRIX_CREDENTIALED}" >> $GITHUB_OUTPUT
echo "Discovered $COUNT_CREDENTIALED credentialed test case(s)"

Expand Down Expand Up @@ -874,6 +874,10 @@ jobs:
# shortfall. schema-check needs no equivalent guard: it is a single job that
# reports every case it discovers, and it fails the workflow on its own if
# it does not run.
#
# A scenario skipped because its test markup no longer attaches is listed
# under skipped_needs_update, not tests. The shard already reported it and
# the summary flags it as a warning, so it counts as accounted for here.
EXPECTED_TESTS: ${{ needs.discover.outputs.test_count }}
run: |
python3 -c "
Expand All @@ -883,15 +887,16 @@ jobs:
tests = report.get('tests', {})
failed = [k for k, v in tests.items() if v.get('status') != 'passed']
sharded = {k: v for k, v in tests.items() if v.get('type') != 'schema'}
needs_update = report.get('skipped_needs_update') or {}
expected = int(os.environ.get('EXPECTED_TESTS') or 0)
missing = expected - len(sharded)
missing = expected - len(sharded) - len(needs_update)
if failed:
print(f'{len(failed)} test(s) failed:', file=sys.stderr)
for name in failed:
print(f' - {name}', file=sys.stderr)
if missing > 0:
print(f'{missing} discovered functional/live test(s) produced no result:', file=sys.stderr)
print(f' discovered {expected}, reported {len(sharded)}', file=sys.stderr)
print(f' discovered {expected}, reported {len(sharded)}, skipped (needs update) {len(needs_update)}', file=sys.stderr)
if failed or missing > 0:
sys.exit(1)
print(f'All {len(tests)} test(s) passed')
Expand Down
145 changes: 0 additions & 145 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,151 +91,6 @@ h6 {
}


/* Test Status Badge - Modern gradient style */
.test-status-badge {
position: relative;
/* Block-level, not inline-flex. As an inline box the badge sat in an
anonymous line box whose height was floored by the parent's line-height
strut, so a negative margin-top could only ever move it a few pixels —
-20px moved it 7. All three call sites already put the badge on its own
line between the <h1> and the description, so nothing needs it inline. */
display: flex;
width: fit-content;
align-items: center;
gap: 0.4rem;
padding: 0.3rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 0.7rem;
font-weight: 600;
line-height: 1;
/* No margin-bottom. The badge is the last thing in the heading column, and
the whitespace before the page description belongs to the title row as a
whole — see the `:has()` rule below. Putting it here instead would open a
gap between the badge and the "Copy as Markdown" button on a narrow
viewport, where the two stack. */
margin-top: 0.5rem;
margin-bottom: 0;
letter-spacing: 0.03em;
text-transform: none;
transition: all 0.2s ease;
cursor: default;
}

/* Spacing is plain margins, with no breakpoint rule and no negative value,
because the badge renders from the `docs/under-heading.html` slot — inside
the heading's own flex column, directly below the <h1>.

An earlier version of this rendered from `docs/after-title.html`, below the
title flex row, and needed `margin-top: -1.25rem` scoped to >=640px to drag
the badge back up under the heading. That number was calibrated against the
height of the "Copy as Markdown" control, so it would have drifted the moment
that control changed size, and it had to be breakpoint-scoped because below
640px the row stacks and the pull-up would have landed the badge on top of
the buttons. Moving slots deleted the whole problem.

The gap before the page description is put on the TITLE ROW, not on the
badge, so it always falls after the LAST thing in the title area. On a wide
viewport that is the badge; on a narrow one the row is `flex-col` and the
last thing is the "Copy as Markdown" button, so the whitespace lands after
the button rather than stranding it below the gap.

`:has()` scopes this to pages that actually show a badge — an untested page
keeps Hextra's stock `hx:mb-4` and is untouched. Specificity is (0,2,1)
against Tailwind's (0,1,0) `.hx\:mb-4`, so it wins without `!important`. */
.content > div:has(.test-status-badge) {
margin-bottom: 1.75rem;
}

.test-status-passed {
background: none;
color: #111827;
box-shadow: none;
}

.test-status-passed:hover {
transform: translateY(-1px);
}

.test-status-passed .test-status-icon {
fill: #059669;
}

.dark .test-status-passed {
background: none;
color: #f9fafb;
box-shadow: none;
border-color: #9ca3af;
}

.dark .test-status-passed:hover {
box-shadow: none;
}

.dark .test-status-passed .test-status-icon {
fill: #34d399;
}

.test-status-icon {
width: 0.7rem;
height: 0.7rem;
fill: currentColor;
flex-shrink: 0;
}

.test-status-text {
white-space: nowrap;
}

/* Modern tooltip */
.test-status-tooltip {
position: absolute;
left: 50%;
top: 100%;
transform: translateX(-50%) translateY(8px);
padding: 0.5rem 0.75rem;
background: #1f2937;
color: #ffffff;
font-size: 0.8rem;
font-weight: 500;
line-height: 1.4;
letter-spacing: normal;
text-transform: none;
white-space: nowrap;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
z-index: 50;
pointer-events: none;
}

.test-status-tooltip::before {
content: '';
position: absolute;
left: 50%;
bottom: 100%;
transform: translateX(-50%);
border: 6px solid transparent;
border-bottom-color: #1f2937;
}

.test-status-badge:hover .test-status-tooltip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(6px);
}

.dark .test-status-tooltip {
background: #374151;
color: #f3f4f6;
}

.dark .test-status-tooltip::before {
border-bottom-color: #374151;
}

/* Theme-toggle dropdown — fix checkmark/text overlap.
Hextra's hx:ltr:pl-3, hx:ltr:pr-9, hx:py-1.5, and hx:ltr:right-3 live inside
@layer utilities in main.css. Tailwind v3's unlayered button { padding:0 }
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/agentgateway/website

go 1.21

require github.com/solo-io/docs-theme-extras v0.3.17 // indirect
require github.com/solo-io/docs-theme-extras v0.3.18 // indirect
16 changes: 2 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,2 @@
github.com/solo-io/docs-theme-extras v0.3.9 h1:1LjnFCWa0ULmtbU94IWD16CTE6Um2d59jWu8M9zKddc=
github.com/solo-io/docs-theme-extras v0.3.9/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.10 h1:t2BkRKkD24hDKvatZGLxXZVspnNQGRfVm9kf7RdvnY0=
github.com/solo-io/docs-theme-extras v0.3.10/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.11 h1:b8FqyAdKi3U0JjeBsMehTsJMUztKuEfv2iM66Ypkf50=
github.com/solo-io/docs-theme-extras v0.3.11/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.15 h1:Wx44OmemNz4Ptoxc7dFuGkf86fTJ30mcAo6rdCivaEU=
github.com/solo-io/docs-theme-extras v0.3.15/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.16 h1:lPSS9awzzgeD39h32v3gEISlerOr0rEwi+QW3yy7b3A=
github.com/solo-io/docs-theme-extras v0.3.16/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.17-beta.1 h1:d4uoaQqdvx2IZOSjKV9TgtFjIUPwivVDGyqsO4Y34Ko=
github.com/solo-io/docs-theme-extras v0.3.17-beta.1/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.17 h1:SSfI0zexM1ac3XMKkj4em22lRZkjF+8C/0uXkSjaXp0=
github.com/solo-io/docs-theme-extras v0.3.17/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
github.com/solo-io/docs-theme-extras v0.3.18 h1:C2T1qPTVD7suFI5SjaC6QzYS/qWZIYpDB6ZgtWB68P8=
github.com/solo-io/docs-theme-extras v0.3.18/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg=
2 changes: 1 addition & 1 deletion layouts/docs/api-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ partial "docs-llms-directive.html" . }}
{{ partial "copy-markdown.html" . }}
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ partial "test-status-badge.html" . }}
{{ partial "components/test-status-badge.html" . }}
{{- with .Description }}<p class="page-description">{{ . | markdownify }}</p>{{ end }}
{{- /*
Split .Content on the widget slot sentinel so the kubespec HTML can
Expand Down
2 changes: 1 addition & 1 deletion layouts/docs/kubernetes/api-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ partial "docs-llms-directive.html" . }}
{{ partial "copy-markdown.html" . }}
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ partial "test-status-badge.html" . }}
{{ partial "components/test-status-badge.html" . }}
{{- with .Description }}<p class="page-description">{{ . | markdownify }}</p>{{ end }}
{{- /*
Split .Content on the widget slot sentinel so the kubespec HTML can
Expand Down
25 changes: 0 additions & 25 deletions layouts/partials/docs/under-heading.html

This file was deleted.

11 changes: 0 additions & 11 deletions layouts/partials/test-status-badge.html

This file was deleted.

Loading