Refine Getting Started docs: typography, preview styling, content polish#6340
Refine Getting Started docs: typography, preview styling, content polish#6340
Conversation
Greptile SummaryThis PR refines all four Getting Started docs with tighter typography (smaller semibold headings, lighter body weight), a wider content column, pill-style tabs, slate-tinted inline code, and a hover-reveal copy button. Content is polished across Introduction, Installation, Basics, and Dashboard Tutorial with time estimates, consolidated setup steps, fixed typos (
Confidence Score: 4/5Safe to merge after fixing the broken internal link on the installation page CTA. One P1 broken link will 404 for any user clicking the 'Next: Build your first app' CTA on the Installation page. All other changes are well-scoped documentation and styling updates with no logic regressions. docs/getting_started/installation.md — broken link on the final CTA line. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User visits /docs/getting-started] --> B[Sidebar: Getting Started]
B --> C[Installation\n/docs/getting_started/installation]
B --> D[Introduction\n/docs/getting_started/introduction]
B --> E[Basics\n/docs/getting_started/basics]
B --> F[Dashboard Tutorial\n/docs/getting_started/dashboard_tutorial]
C -->|CTA link broken hyphen| X["/docs/getting-started/introduction\n404"]
C -->|should link to| D
style X fill:#ffcccc,stroke:#cc0000
Reviews (1): Last reviewed commit: "Refine Getting Started docs: typography,..." | Re-trigger Greptile |
Port reflex-web PR #1818 plus content polish across all Getting Started pages. Typography & preview styling (docs/app + packages/reflex-ui-shared): - Tighter headings (smaller, semibold) and lighter body weight - Wider content column (42rem→52rem / 56rem→64rem); right sidebar moved from xl: to 2xl: so mid-width screens have more room - Navbar tabs visible from md: (was xl:) so they don't collapse to a burger at medium widths - Pill-style tabs (pill-tab / pill-tab-list); slate-tinted inline rt-Code; hover-reveal copy button with "Copy" label; softer borders - docgen_pipeline: cleaner rx.el.div section/tabs renderers with consistent gap and padding Getting Started content: - Introduction: new tagline, pill tabs, slate highlight (was violet), tightened walkthrough, added "Keep learning" / "Ship faster with AI" CTA cards - Installation: added ~3 min estimate, removed embedded video, rewrote as a single uv-based flow with <your-app> placeholder, promoted Rosetta + bun.exe notes to md alert blocks, added "Next" CTA - Basics: added ~10 min estimate, flattened Prerequisites wrapper, consolidated four single-line setup steps, fixed `rx.app` typo, fixed three broken [`code`](link) markdown links (rx.el / rx.cond / rx.foreach were rendering empty), added two CTA cards - Dashboard tutorial: added ~20 min estimate, trimmed ~180-line finished-app dump at top down to a one-sentence roadmap + link to #full-app, numbered Setup steps, promoted "What are you building?" from H3 to H2, renamed Conclusion → Full app + Recap, dropped Advanced Section stub, unified all 10 preview boxes (slate border, 12px radius, 2em padding, spacing="4", rx.box wrap) Sidebar order: - Getting Started now lists Installation before Introduction Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The tightened version lost nuance; the original phrasing about State being uncompiled server code with no special caveats reads better. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d8a34d2 to
0a4910e
Compare
- Add H1 headings to introduction and installation pages. - Info alerts now use the neutral --c-slate-* scale to match codeblock styling (border + background) instead of the blue-tinted default. - Promote the Rosetta 2 macOS note from info to warning. - Show the finished dashboard app preview at the top of the tutorial (no code) so readers see the end result before walking through it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Dashboard tutorial: collapse list-of-lists → dataclass churn, introduce `@dataclass User` up front, reduce from 4 to 2 table previews. - Dashboard tutorial: restyle the hero + full-app previews with a header row (title + subtitle + Add User button), compact table, polished bar chart (rounded bars, clean axes, dashed gridlines, slate-1 frame bg). - Dashboard tutorial: rename "Cleanup" → "Customize", "Full app" → "Full app styled", shorten titles to ≤4 words, fix framing bugs around the graph-empty messaging and "last part" claim. - Chat tutorial: shorten H1 to "AI Chat App", add meta line, add a live hero preview styled like the finished app, drop the hardcoded-API-key section, switch setup to uv-first, convert Note blockquote to alert. - Chat tutorial style: modernize bubbles — 18px rounded with tail corners, slate-3 questions with border, accent-9 answers with white text, drop heavy shadows. - Introduction / Basics: add `as_="h3"` to demo `rx.heading` calls so they don't render as additional `<h1>` on the page. - Code blocks: add expand/collapse toggle on code blocks over 20 lines, using native `<details>` + `has-[details[open]]:` CSS so no Reflex state is needed. - Shiki copy button: halve the animation timings so the copy feedback feels snappier. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A segmented button on the right side of the breadcrumb:
- Clicking the copy icon fetches the current page's `.md` URL and copies
the markdown to the clipboard, with a clipboard-API fallback to
`document.execCommand('copy')` for permission-blocked contexts.
- Clicking the chevron opens a popover with two items: "Copy page" and
a link to "llms-full.txt" for full-site markdown.
- Icon pops to a green checkmark for ~1.5s as click feedback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the marketing site's GitHub button — icon plus star count, linking to the reflex repo. Placed before the search bar. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two new menu items below the existing copy/llms-full options open the page in ChatGPT or Claude with a prefilled prompt referencing the page's `.md` URL: "Read from <url> so I can ask questions about its contents". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Highlighted item at the top of the dropdown opens build.reflex.dev with the page's `.md` URL prefilled into the prompt. Visual treatment uses a violet gradient icon tile and gradient hover background to stand out from the other items. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switching from `run_script` + `window.open` (which got blocked as a popup since it ran after a server roundtrip) to real `<a target="_blank">` elements. Hrefs are constructed server-side using a hardcoded prod docs origin so the prefilled prompt references a fetchable URL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Revert the as_="h3" additions on demo `rx.heading` calls in basics.md and introduction.md — clutter in example code. The single-H1 guarantee is now enforced at the source: the `md definition` block's title `rx.heading` defaults to `as_="h3"` so directives no longer emit extra `<h1>` elements. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`add_imports` calls `code_block_markdown(_MOCK_ARG)` to walk the
component tree for imports, which passed a `Var[str]` rather than a
real string. The expand-threshold check `code.count('\n')` raised
`VarAttributeError`. Fall back to the plain block when `code` isn't a
real `str`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The python source block in the dashboard tutorial's Full app styled section was the old layout (plain index, basic bar chart). Update it to match the rendered eval block: nested rx.box + rx.vstack with the header row, compact table, and polished bar chart. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Ports reflex-web PR #1818 into
docs/appand follows up with a content pass across all four Getting Started markdown pages.Typography & preview styling
xl:→2xl:so mid-width screens have room to readmd:(wasxl:) instead of collapsing to a burgerpill-tab/pill-tab-list), slate-tinted inlinert-Code, hover-reveal copy button with "Copy" label, softer bordersdocgen_pipeline._render_tabs/_render_sectionrewritten with cleanerrx.el.div+ tailwind classesGetting Started content
md alert infoCTA cards~3 minestimate, removed embedded video, rewrote as single uv-based flow with<your-app>placeholder, Rosetta + bun.exe notes promoted to alert blocks~10 minestimate, consolidated single-line setup steps, fixedrx.apptypo, fixed three broken[`code`](link)links (rx.el,rx.cond,rx.foreachwere rendering empty), added CTA cards~20 min hands-onestimate, trimmed the ~180-line finished-app dump at the top down to a one-sentence roadmap + link to#full-app, numbered Setup steps, promoted "What are you building?" H3 → H2, renamed Conclusion → Full app + Recap, dropped Advanced Section stub, unified all 10 preview boxes (slate border, 12px radius, 2em padding,spacing="4",rx.boxwrap)Sidebar order
Known caveats
[`code`](url)markdown inreflex_ui_shared.components.blocks.typography.doclink2takestext: strand drops nested<code>children — this PR works around it by using plain-text link labels. A proper fix (accept*childrenand render insiderx.link) would benefit all pages.padding="2em"on preview containers may not fully render because[&>div]:!p-0indocpage.pyemitspadding: 0 !importanton every direct<div>child; an extrarx.boxwrap, swap torx.el.section, or removing the rule would fix it.Test plan
/docs/getting-started/introduction,/installation,/basics,/dashboard-tutorialmd:, right sidebar hides below2xl:, hamburger only at<md:`code`renders slate, not purpleuv run reflex compilesucceeds🤖 Generated with Claude Code