Skip to content

Refine tko.io landing page#317

Merged
brianmhunt merged 8 commits intomainfrom
docs/landing-redesign
Apr 16, 2026
Merged

Refine tko.io landing page#317
brianmhunt merged 8 commits intomainfrom
docs/landing-redesign

Conversation

@brianmhunt
Copy link
Copy Markdown
Member

@brianmhunt brianmhunt commented Apr 15, 2026

Summary

  • Version (v4.0.1) prominent in hero
  • Browser scripts in tabs: ES module (default) / Classic script
  • Package manager install in tabs: npm / bun / pnpm / yarn
  • ES module example using esm.run
  • Migration guide moved to bottom of sidebar, removed from hero CTA
  • Converted index.md to index.mdx for Starlight component support

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Consolidated Quick Start into a single "Browser" tab with ES module and classic script examples, updated install/usage snippets, adjusted compatibility guidance, reorganized build-selection cards, and updated first-binding CDN example.
  • Style
    • Refined landing hero/version typography and narrowed sidebar background rules for improved layout.
  • Examples
    • Improved example interaction responsiveness by coalescing rapid hover/click events.
  • Tests
    • Expanded automated test matrix to run across multiple browsers.
  • Chores
    • Added additional ignore patterns for build/test artifacts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 22:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Quick Start and landing content were reworked to promote @tko/build.reference (tabbed Browser examples, install commands, build-choice cards, Examples card, hero markup moved version into .landing-version), CSS adjusted for landing typography and sidebar backgrounds, workflow test matrix added for browsers, gitignore updated, and honeycomb example added requestAnimationFrame-based hover/click throttling.

Changes

Cohort / File(s) Summary
Docs: Quick Start & Landing
tko.io/src/content/docs/index.mdx
Consolidated Quick start into a Browser tab with ES module (import from @tko/build.reference) and classic script (loads @tko/build.reference/dist/browser.min.js, uses globalThis.tko); updated install commands to @tko/build.reference; adjusted first-binding snippet to const ko = globalThis.tko; reworked "Choose a build" cards (promote @tko/build.reference, add @tko/build.knockout card for 3.x migrations), added Examples card, and moved version into an h2.landing-version.
Styles: Landing & Panels
tko.io/src/styles/tko.css
Narrowed sidebar transparency selector to only .sidebar and .right-sidebar-panel (removed .content-panel, .sidebar-pane); introduced .landing-version rules to separate version typography from other h2 heading styles and adjusted landing-hero heading selectors.
Tests: GitHub Actions
.github/workflows/test-headless.yml
Added a matrix for chromium, firefox, webkit and set VITEST_BROWSERS to the matrix browser value to run headless tests per-browser.
Repo: Ignore Patterns
.gitignore
Added ignore entries: .dts-tmp/, .nx/, .vitest-attachments/.
Examples: Honeycomb Interaction
tko.io/public/examples/honeycomb.html
Added internal hover/click throttling state and RAF-based coalescing: _pendingHover, _hoverRaf, _clickRaf; hoverCell coalesces rapid hovers into a single requestAnimationFrame update; clickCell uses RAF bursts with cancellation to prevent overlapping processing.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰
A tab, a script, a tiny hop,
Import and global—bunny stop!
Cards are placed and rafs align,
Hover, click, the cells refine.
Cheers from the rabbit—code and thyme 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Refine tko.io landing page' accurately describes the primary changes in the pull request. The majority of the modifications affect the landing page (index.mdx, tko.css hero sections, and honeycomb example), with the title capturing the main focus area.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/landing-redesign

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Redesigns the tko.io docs landing page to present a more guided “Quick start” and align the hero/CTA structure with the v4 release messaging.

Changes:

  • Replaces separate browser “script tag” / “ES module” sections with a single tabbed “Browser” block.
  • Introduces tabbed package-manager install instructions (npm/bun/pnpm/yarn) using Starlight components.

Comment thread tko.io/src/content/docs/index.mdx Outdated
<TabItem label="ES module">
```html
<script type="module">
import ko from 'https://esm.run/@tko/build.knockout'
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ES module example imports a default export from @tko/build.knockout, but the package entry point doesn’t currently re-export the default (unlike @tko/build.reference). As a result, import ko from 'https://esm.run/@tko/build.knockout' will fail with “does not provide an export named 'default'”. Either update the docs to match the actual export shape (or point this tab at a build that does export a default), or change the build’s entry point to re-export the default so the example works.

Suggested change
import ko from 'https://esm.run/@tko/build.knockout'
import * as ko from 'https://esm.run/@tko/build.knockout'

Copilot uses AI. Check for mistakes.
- Fix transparent sidebar on mobile (unreadable over content)
- Add Examples card to What to Read Next section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brianmhunt brianmhunt changed the title Redesign tko.io landing page Refine tko.io landing page Apr 16, 2026
The transparent background rule was applied to .sidebar-pane,
overriding Starlight's built-in solid background on mobile.
Remove .sidebar-pane from the transparent rule so the mobile
overlay sidebar is readable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tko.io/src/content/docs/index.mdx`:
- Around line 124-128: The "Examples" landing-card copy in index.mdx is outdated
and mentions specific demos ("todo app", "animated transitions") that no longer
match the examples page; update the <a class="landing-card"> content (the
eyebrow span, h3, and paragraph text inside that anchor) to use neutral,
up-to-date wording (e.g., "Explore interactive demos and integrations" or
similar) so the card remains accurate without listing deprecated examples; edit
the paragraph under the <h3>Examples</h3> in the existing anchor to reflect a
general description that won't drift as specific examples change.
- Around line 20-39: Update the agent guide to match the new quick-start pattern
by replacing the legacy CDN string "https://tko.io/lib/tko.js" and the global
reference "globalThis.tko" with the new CDN endpoint
"https://cdn.jsdelivr.net/npm/@tko/build.knockout/dist/browser.min.js" and
"globalThis.ko" respectively in the guide content (look for occurrences of those
exact strings in the guide); ensure any example snippets and prose reflect the
ES module/classic script pattern used in the Starlight docs (importing
'@tko/build.knockout' for modules and referencing globalThis.ko for the browser
bundle).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e65a441-a2d2-43eb-9770-503bba37038f

📥 Commits

Reviewing files that changed from the base of the PR and between 51964be and 578deb2.

📒 Files selected for processing (2)
  • tko.io/src/content/docs/index.mdx
  • tko.io/src/styles/tko.css

Comment on lines +20 to +39
### Browser

<Tabs syncKey="script">
<TabItem label="ES module">
```html
<script type="module">
import ko from 'https://esm.run/@tko/build.knockout'
const name = ko.observable('TKO')
</script>
```
</TabItem>
<TabItem label="Classic script">
```html
<script src="https://cdn.jsdelivr.net/npm/@tko/build.knockout/dist/browser.min.js"></script>
<script>
const ko = globalThis.ko
</script>
```
</TabItem>
</Tabs>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find agent guide files in tko.io and check whether they mention the new quick-start patterns
fd -i 'agents\.md$' tko.io
fd -i 'agents\.md$' tko.io -x rg -n "esm\.run|globalThis\.ko|@tko/build\.knockout|Quick start|Browser"

Repository: knockout/tko

Length of output: 38


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for agent guide files in tko.io/public/ as indicated by learnings
echo "=== Finding agent guide files in tko.io/public/ ==="
fd '\.md$' tko.io/public/ 2>/dev/null | head -20

echo ""
echo "=== Checking tko.io structure ==="
ls -la tko.io/ 2>/dev/null | grep -E '^d' || echo "No directories found"

echo ""
echo "=== Searching for any guide/agent related files ==="
find tko.io -type f -name '*guide*' -o -name '*agent*' 2>/dev/null | head -20

Repository: knockout/tko

Length of output: 1676


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Checking tko.io/public/agents/guide.md for quick-start patterns ==="
rg -n "esm\.run|globalThis\.ko|@tko/build\.knockout|Quick start|Browser|import ko from|cdn.jsdelivr" tko.io/public/agents/guide.md 2>/dev/null || echo "No matches found"

echo ""
echo "=== Checking tko.io/public/agent-guide.md ==="
rg -n "esm\.run|globalThis\.ko|@tko/build\.knockout|Quick start|Browser|import ko from|cdn.jsdelivr" tko.io/public/agent-guide.md 2>/dev/null || echo "No matches found"

echo ""
echo "=== Full content of tko.io/public/agents/guide.md (first 100 lines) ==="
head -100 tko.io/public/agents/guide.md

echo ""
echo "=== Searching for setup/installation/import sections in guide.md ==="
rg -n -A 5 "setup|installation|import|browser|quick" tko.io/public/agents/guide.md -i | head -50

Repository: knockout/tko

Length of output: 6482


Update agent guide setup section to match new quick-start patterns.

The new Starlight docs (lines 20–39) introduce https://cdn.jsdelivr.net/npm/@tko/build.knockout and globalThis.ko, but tko.io/public/agents/guide.md (lines 10–12) still references the legacy https://tko.io/lib/tko.js and globalThis.tko. Update the agent guide to use the new CDN endpoint and globalThis.ko to keep automated guidance aligned with the canonical quick-start pattern.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tko.io/src/content/docs/index.mdx` around lines 20 - 39, Update the agent
guide to match the new quick-start pattern by replacing the legacy CDN string
"https://tko.io/lib/tko.js" and the global reference "globalThis.tko" with the
new CDN endpoint
"https://cdn.jsdelivr.net/npm/@tko/build.knockout/dist/browser.min.js" and
"globalThis.ko" respectively in the guide content (look for occurrences of those
exact strings in the guide); ensure any example snippets and prose reflect the
ES module/classic script pattern used in the Starlight docs (importing
'@tko/build.knockout' for modules and referencing globalThis.ko for the browser
bundle).

Comment thread tko.io/src/content/docs/index.mdx
Brian M Hunt and others added 3 commits April 16, 2026 08:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Quick start, browser examples, and package manager tabs now use
@tko/build.reference. Choose-a-build cards reordered: reference
first (recommended), knockout second (migrations).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tko.io/src/styles/tko.css (1)

260-266: Consider scoping .landing-version to the hero for tighter CSS isolation.

This avoids accidental styling collisions if landing-version is reused elsewhere later.

Suggested diff
-.landing-version {
+.landing-hero .landing-version {
   margin: 0 0 0.3rem;
   font-family: var(--tko-font-display);
   font-size: clamp(2rem, 5vw, 3.2rem);
   font-weight: 700;
   color: var(--sl-color-white);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tko.io/src/styles/tko.css` around lines 260 - 266, The .landing-version rule
should be scoped to the hero container to avoid global collisions: change the
selector from .landing-version to a more specific selector like .landing-hero
.landing-version (or .hero .landing-version) and move the existing declarations
under that selector so the styles only apply when .landing-version is inside the
hero component; update any corresponding HTML if needed to ensure the version
element is a child of the chosen hero class.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@tko.io/src/styles/tko.css`:
- Around line 260-266: The .landing-version rule should be scoped to the hero
container to avoid global collisions: change the selector from .landing-version
to a more specific selector like .landing-hero .landing-version (or .hero
.landing-version) and move the existing declarations under that selector so the
styles only apply when .landing-version is inside the hero component; update any
corresponding HTML if needed to ensure the version element is a child of the
chosen hero class.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87c5584a-ac55-46cd-a0f0-73a8eb9c4484

📥 Commits

Reviewing files that changed from the base of the PR and between 578deb2 and a022285.

📒 Files selected for processing (2)
  • tko.io/src/content/docs/index.mdx
  • tko.io/src/styles/tko.css
✅ Files skipped from review due to trivial changes (1)
  • tko.io/src/content/docs/index.mdx

Brian M Hunt and others added 2 commits April 16, 2026 09:58
- Gitignore .dts-tmp/, .nx/, .vitest-attachments/ build artifacts
- Use general wording for Examples card instead of naming specific demos
- Scope .landing-version CSS to .landing-hero for tighter isolation
- Throttle honeycomb hover to one update per animation frame
- Cancel in-progress click waterfall before starting a new one

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Run chromium, firefox, and webkit as separate concurrent jobs
instead of sequentially in one job. Should cut wall time ~3x.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brianmhunt brianmhunt force-pushed the docs/landing-redesign branch from 9704948 to 0e1e8de Compare April 16, 2026 14:26
@brianmhunt brianmhunt merged commit fd7ff85 into main Apr 16, 2026
12 of 13 checks passed
@brianmhunt brianmhunt deleted the docs/landing-redesign branch April 16, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants