docs: redesign homepage with clean layout and type system#453
Conversation
…ogo bar Replace the gradient SVG hero with a clean white layout featuring a live code editor showing PyRetailScience usage. Add scrolling logo marquee, dark "Get started in seconds" CTA section, and white header styling. Fix broken HTML semantics (nested DOCTYPE, mismatched h1/h2 tags), consolidate home.css into extra.css, and switch to colored logo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reorder feature sections to match original (Tailored → Trust → Charts → Automate) - Replace unit_tests.png with inline code window showing pytest example - Add dual radial gradients to hero background, remove code-block-specific glow - Update get-started CTA to "See What's Included" linking to Analysis Modules - Use Jinja loop for logo bar, add .fn and .str .expr syntax highlighting tokens - Delete 16 unused image assets (logos, features, SVGs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @murray-ds's task in 2m 12s —— View job PR Review: docs/homepage-touch-up
Overall AssessmentThis is a solid, well-executed homepage redesign. The code is clean and well-structured with good accessibility considerations. A few minor issues worth noting for future maintenance. Issues Found1. Inconsistent use of CSS custom properties (
|
| Location | Hardcoded value | Suggested variable |
|---|---|---|
.get-started background (line 362) |
#0d0d0d |
--color-dark-bg or similar |
.code-titlebar background (line 168) |
#181825 |
--color-code-titlebar |
.code-window background (line 153) |
#1e1e2e |
--color-code-bg |
.logo-bar-label color (line 247) |
#7a8578 |
--neutral-500 or similar |
.logo-scroll span color (line 267) |
#a8b5a5 |
--neutral-400 or similar |
The Catppuccin Mocha palette colors used in the code windows are consistently applied, but should be defined as variables at the top alongside the rest of the system. Fix this →
2. Potential active tab indicator issue (extra.css, lines 458–461)
.md-tabs__link--active,
.md-tabs__item--active .md-tabs__link {
border-bottom-color: var(--green-500);
}This only sets border-bottom-color without ensuring border-bottom-width and border-bottom-style are set. If the Material theme doesn't establish a border-bottom on active tab links, this rule won't render a visible indicator. Worth verifying at 768px+ widths and across Material theme versions — a theme update could silently break this.
3. Missing will-change hint for scroll animation (extra.css, line 256)
The logo scroll animation would benefit from will-change: transform to hint to the browser to promote the element to a compositor layer:
.logo-scroll {
will-change: transform;
/* existing rules */
}Note: this is already performance-safe since the element is always animating, not intermittently.
4. !important on header title margin (extra.css, line 428)
.md-header__title {
margin-left: 0 !important; /* needed to override Material's inline JS margin */
}The comment explains why this is necessary, which is good. However, this is brittle — a Material theme upgrade that changes how it injects that inline style could require re-investigation. Consider leaving a reference to the Material issue/version where this was needed to help future maintainers.
5. Fractional flex value on .hero-text (extra.css, line 113)
.hero-text {
flex: 0.8;
}Using flex: 0.8 (fractional flex-grow/shrink) is valid CSS but unusual and can produce unexpected layouts across browsers. The pairing with flex: 1.4 on .hero-code achieves roughly a 1:1.75 ratio — consider expressing this as flex: 4 / flex: 7 (integer ratios) for clarity and predictability.
Positives Worth Noting
- Accessibility:
aria-hidden="true"on duplicated logo scroll items andprefers-reduced-motionsupport is excellent. The motion fallback correctly hides duplicated items (line 284–286). - Type scale system: The Tailwind-aligned CSS custom property type scale (
--text-xsthrough--text-4xl) is well-structured and consistently applied. - Responsive design: Both the hero (
flex-direction: columnat48em) and features section handle mobile correctly, including overriding thenth-child(even)reverse layout. - Image cleanup: Deleting 12 unused logo images and 2 feature images reduces repo weight and build noise.
- Scoped homepage overrides: Using an inline
<style>block inhome.htmlto override sidebar/content visibility keeps homepage-specific layout changes from leaking into the global stylesheet. - Vendor prefix:
-webkit-mask-imagealongsidemask-image(lines 252–253) is correct for cross-browser support. loading="lazy"on images: Good performance practice on the feature section images.
🚀 Cloudflare Pages Deployment✅ Preview deployed successfully! Preview URL: https://caa7ed1e.pyretailscience-docs.pages.dev This preview will be updated automatically when you push new changes to this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
- Override mobile drawer header to white background with inline logo - Constrain code windows and feature images to max-width: 100% on mobile - Prevent code block clipping on small viewports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add aria-hidden to duplicate logo loop for screen readers - Hide duplicate logos and wrap layout when prefers-reduced-motion - Scope heading size overrides to homepage inline styles only - Extract border color to --border-color CSS variable - Add explanatory comment for !important override on header title Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace fabricated TransactionChurn attributes (churned_count, retention_rate) with real API (purchase_dist_df, n_unique_customers). Convert px-based media query breakpoints to em for accessibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Scope inline heading size overrides to homepage sections (.hero, .features, .get-started) instead of bare tag selectors - Add loading="lazy" to below-the-fold feature images - Convert hardcoded 40px margin to 2.5rem for unit consistency - Remove redundant font-family on .logo-scroll span (inherited from body) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace vague `> 0` assertion with exact `== 1250` in the "Trust Your Results" code window to better demonstrate meaningful testing practices. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Test plan
mkdocs serveand verify homepage renders correctly🤖 Generated with Claude Code