Commit 1a64caa
Refine Getting Started docs: typography, preview styling, content polish (#6340)
* Refine Getting Started docs: typography, preview styling, content polish
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>
* Restore original Backend tab copy in introduction
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>
* Add H1 headings, neutral info alerts, dashboard preview up top
- 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>
* Polish getting-started tutorials
- 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>
* Add Copy page dropdown button to docpage breadcrumb
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>
* Add GitHub button to the docs navbar
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>
* Add Open in ChatGPT / Claude items to copy-page dropdown
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>
* Add Build this with AI item to copy-page dropdown
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>
* Open Build / ChatGPT / Claude items via anchor tags
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>
* Drop as_=h3 from demo headings, fix definition box at the source
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>
* Add missing Returns docstring to _plain_code_block
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Guard code_block against Var input during import introspection
`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>
* Sync Full app styled source with rendered preview
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>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8430f30 commit 1a64caa
16 files changed
Lines changed: 1056 additions & 785 deletions
File tree
- docs
- app
- assets
- reflex_docs
- templates/docpage
- sidebar/sidebar_items
- views
- getting_started
- packages
- reflex-components-code/src/reflex_components_code
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
1702 | 1710 | | |
1703 | 1711 | | |
1704 | 1712 | | |
| |||
1803 | 1811 | | |
1804 | 1812 | | |
1805 | 1813 | | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
1806 | 1852 | | |
1807 | 1853 | | |
1808 | 1854 | | |
| |||
1814 | 1860 | | |
1815 | 1861 | | |
1816 | 1862 | | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1817 | 1946 | | |
1818 | 1947 | | |
1819 | 1948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
525 | 531 | | |
526 | 532 | | |
527 | 533 | | |
| |||
560 | 566 | | |
561 | 567 | | |
562 | 568 | | |
563 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
564 | 577 | | |
565 | 578 | | |
566 | 579 | | |
| |||
588 | 601 | | |
589 | 602 | | |
590 | 603 | | |
591 | | - | |
592 | | - | |
| 604 | + | |
| 605 | + | |
593 | 606 | | |
594 | 607 | | |
595 | 608 | | |
| |||
666 | 679 | | |
667 | 680 | | |
668 | 681 | | |
669 | | - | |
| 682 | + | |
670 | 683 | | |
671 | 684 | | |
672 | 685 | | |
673 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
674 | 691 | | |
675 | 692 | | |
676 | 693 | | |
677 | | - | |
| 694 | + | |
678 | 695 | | |
679 | 696 | | |
680 | 697 | | |
| |||
702 | 719 | | |
703 | 720 | | |
704 | 721 | | |
705 | | - | |
706 | | - | |
707 | 722 | | |
708 | | - | |
709 | | - | |
| 723 | + | |
| 724 | + | |
710 | 725 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
715 | 739 | | |
716 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
717 | 746 | | |
718 | 747 | | |
719 | 748 | | |
720 | | - | |
721 | | - | |
722 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
723 | 757 | | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
| 758 | + | |
728 | 759 | | |
729 | 760 | | |
730 | 761 | | |
| |||
0 commit comments