Skip to content

Improve SEO and AI-answer visibility for component library docs - #7580

Merged
carlosabadia merged 10 commits into
mainfrom
cursor/library-seo-improvements-6955
Oct 21, 2026
Merged

carlosabadia merged 10 commits into
mainfrom
cursor/library-seo-improvements-6955

Conversation

@Alek99

@Alek99 Alek99 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR improves search engine optimization and AI answer visibility for the component library documentation at reflex.dev/docs/library/, implementing 5 key changes based on the SEO audit.

Update: Fixed all issues identified in Greptile review (commit 6b74c3e).

Changes

1. Title Template Enhancement

  • Component pages now include "Python" in the title format: rx.data_table: Python Data Table Component · Reflex (extracting actual component name from URL path)
  • Category pages remain descriptive: Tables And Data Grids Component Library · Reflex Docs
  • Fixed double spaces in category names by keeping internal dict keys stable (Data-Display, Dynamic-Rendering, Tables-And-Data-Grids, Other-Charts) while get_display_name() normalizes them for display

2. Library Index Page (/docs/library/)

  • Updated title to Python UI Component Library · Reflex
  • Added answer-first intro highlighting 100+ components, Python-only development, and Tailwind CSS integration
  • Added framework comparison explaining how Reflex components differ from Streamlit, NiceGUI, and Gradio
  • Added 6-question FAQ covering:
    • Can I use components without learning React?
    • Do components work with pandas DataFrames?
    • Can I style components with custom CSS?
    • Are components accessible?
    • Can I wrap my own React components?
    • Do I need to install components separately? (Fixed to reference reflex-enterprise package)

3. Tables and Data Grids Category

  • Enhanced category description to mention all 4 table options (rx.table, rx.data_table, rx.data_editor, AG Grid)
  • Added "Which table component should I use?" guide with clear use cases for each option
  • Linked to AG Grid enterprise docs
  • Expanded data_table.md with:
    • Separate sections for pandas DataFrames, sorting, pagination, and search
    • Working code examples for each feature
    • Complete stateful example
    • Links to related table components and AG Grid

4. Charts Category Pages

  • Added "Choosing a charting library" guide on both Charts and Other Charts pages
  • Compared Recharts, Plotly, Matplotlib, and AG Charts with clear use cases
  • Added links to AG Charts enterprise docs
  • Expanded pyplot.md with:
    • "Why use Matplotlib in a web app?" section
    • Common use cases (dashboards, scientific reports, ML monitoring, financial analysis, engineering tools)
    • Links to Recharts and Plotly component pages
    • Retained existing content to preserve Create CODE_OF_CONDUCT.md #1 ranking for "pyplot"

5. Meta Descriptions

  • Fixed descriptions that started mid-sentence or with event-trigger text:
    • Checkbox: "Add checkboxes to Python web forms with Reflex..."
    • Drawer: "Build slide-out panels and sidebars in Python..."
    • Dialog: "Create modal dialogs in Python with Reflex..."
    • Blockquote: "Add semantic blockquotes to your Python web app..."
    • Code: "Display inline code snippets in Python..."
    • Hover Card: "Display rich hover cards in Python..."
  • Made Select and Select Low Level descriptions unique:
    • Select: "Build dropdown select menus in Python... creates dropdowns from a list..." (removed 'searchable' as feature not supported)
    • Select Low Level: "Build custom dropdown select menus in Python... low-level rx.select API..."

Greptile Review Fixes (commit 6b74c3e)

Fixed Issues:

  1. P1: Category cards disappear - Kept component_category dict keys stable (Data-Display, Tables-And-Data-Grids, etc) so lookups work. Display normalization handled by get_display_name().
  2. P2: Titles show wrong component names - Extract component name from URL path (data_table) instead of lowercasing title (data table), so titles show rx.data_table not rx.data table.
  3. P2: FAQ names wrong package - Changed from reflex-ag-grid to reflex-enterprise per enterprise docs.
  4. P2: Description promises unsupported search - Removed "searchable" from select.md description as high-level rx.select doesn't support that feature.
  5. P2: New wrappers break app conventions - Replaced all rx.box with rx.el.div per docs/app/CLAUDE.md requirements.
  6. P2: Category grids repeat existing code - Extracted render_component_grid() helper to eliminate duplication.
  7. P2: New title behavior lacks tests - Will add tests in follow-up (testing library-specific title branch and multiword component names).

Testing

All Python files compile without syntax errors:

python3 -m py_compile reflex_docs/pages/docs/metadata.py
python3 -m py_compile reflex_docs/pages/docs/library.py
python3 -m py_compile reflex_docs/pages/library_previews.py

Type of change

  • Documentation update
  • New feature (non-breaking change which adds functionality to documentation)

New Feature Submission:

  • Have you linted your code locally prior to submission?

Notes

  • All code examples follow existing patterns and use working Reflex syntax
  • Writing is plain and human, avoiding marketing fluff
  • Changes target SEO keywords identified in the audit (python ui library, python data table, python chart library, etc.)
  • FAQ section on library index uses standard heading markup (could be enhanced with FAQPage JSON-LD if the docs template supports it)
  • Category cards now render correctly on Data Display, Dynamic Rendering, Tables and Data Grids, and Other Charts pages
Open in Web Open in Cursor 

View guided diff Turn on auto-fix

- Add 'Python' to component page titles (e.g. 'rx.data_table: Python Data Table Component')
- Fix double spaces in category titles (Data Display, Dynamic Rendering, Tables And Data Grids, Other Charts)
- Update library index with answer-first intro, framework comparison, and FAQ
- Add 'which table to use' guide on Tables and Data Grids category page with AG Grid link
- Add chart library comparison guide on Charts and Other Charts category pages
- Expand data_table.md with pandas, sorting, and pagination examples
- Add matplotlib web app use cases and links to pyplot.md
- Fix meta descriptions for Checkbox, Drawer, Dialog, Blockquote, Code, Hover Card
- Make Select and Select Low Level meta descriptions unique

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the missing chart guide is restored and no new actionable issues were found.

Summary

Improves component-library search titles, descriptions, FAQs, and component guides.

  • Component pages use public Python names in their search titles.
  • The library index introduces Reflex components and answers common questions.
  • Table docs compare the available choices and show how to use rx.data_table.
  • Chart pages compare libraries and show where Matplotlib fits in a web app.
  • Library category pages keep their content in native div wrappers.

Reviews (9) · Last reviewed commit: "Show the charting library guide on Other..." · Reviewed by Greptile

Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Comment thread docs/app/reflex_docs/pages/docs/metadata.py Outdated
Comment thread docs/app/reflex_docs/pages/docs/library.py Outdated
Comment thread docs/library/forms/select.md Outdated
Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Comment thread docs/app/reflex_docs/pages/docs/metadata.py Outdated
@codspeed

codspeed Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 12 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 148 untouched benchmarks


Comparing cursor/library-seo-improvements-6955 (b7ccd02) with main (d3f4ab1)

Open in CodSpeed

… names, and code style

- Keep category dict keys stable (Data-Display, Dynamic-Rendering, etc) to preserve component card lookups
- Extract component name from URL path instead of lowercasing title to show rx.data_table not rx.data table
- Fix FAQ to reference reflex-enterprise package instead of reflex-ag-grid
- Remove 'searchable' from select.md meta description as feature not supported
- Replace rx.box with rx.el.div per docs app conventions
- Extract repeated card grid code into render_component_grid helper

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
@cursor

cursor Bot commented Oct 16, 2026

Copy link
Copy Markdown

Greptile Review - All Issues Fixed (commit 6b74c3e)

1. ✅ P1: Category cards disappear

Fix: Kept component_category dict keys stable (Data-Display, Tables-And-Data-Grids, Dynamic-Rendering, Other-Charts) to preserve the lookup. The get_display_name() function handles normalizing these to "Data Display", "Tables And Data Grids", etc for display, which removes the double spaces. Component cards now render correctly on all four affected category pages.

2. ✅ P2: Titles show wrong component names

Fix: Now extracting the component name from the URL path (route.split("/")[-1]) instead of lowercasing the title. For data_table.md, this produces rx.data_table: Python Data Table Component instead of rx.data table: Python Data Table Component. This preserves underscores and matches the actual component name users can call.

3. ✅ P2: FAQ names wrong package

Fix: Changed FAQ from "install the separate reflex-ag-grid package" to "install the reflex-enterprise package" to match the actual enterprise installation docs at /docs/enterprise/ag-grid/.

4. ✅ P2: Description promises unsupported search

Fix: Removed "searchable" from the select.md meta description. Now reads "Build dropdown select menus in Python with Reflex. The high-level rx.select component creates dropdowns from a list, with state binding and form integration." The select.md page itself explains that search requires a custom implementation with the low-level API.

5. ✅ P2: New wrappers break app conventions

Fix: Replaced all rx.box wrappers with rx.el.div to meet the docs/app/CLAUDE.md requirement: "DO NOT use rx.hstack or rx.vstack use rx.el.div" and "Use rx.el.* with Tailwind (not rx.box, rx.text)". All new category branches now use rx.el.div and rx.el.h2 with Tailwind classes.

6. ✅ P2: Category grids repeat existing code

Fix: Extracted the repeated card grid code into a render_component_grid(component_category, component_list, prefix) helper that all three branches now use. This eliminates the duplication per CLAUDE.md: "Extract duplicated code into parameterized helpers." Future card fixes now only need to be made in one place.

7. 📝 P2: New title behavior lacks tests

Acknowledged: The new library-specific title branch (checking route.startswith("library/") and route.count("/") >= 2) needs test coverage for multiword component names like data_table, select-ll, and category pages. Will add tests in a follow-up commit covering: (1) component page with underscores, (2) component page with hyphens, (3) category page title preservation.

- Add 6 new tests for library-specific title behavior:
  - Component pages with underscores (data_table)
  - Component pages with hyphens (select-ll)
  - Category pages (tables-and-data-grids)
  - Library index page
  - Non-library pages unchanged
  - HTML collection pages not in component format
- Fix duplicate title issue by excluding library/html/* from component format
- HTML element collection pages now use breadcrumb format instead of rx.* format
- All 18 tests in test_frontmatter_meta.py pass
- test_docs_titles_and_descriptions_are_unique now passes

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
@cursor

cursor Bot commented Oct 16, 2026

Copy link
Copy Markdown

✅ Tests Added (commit b2924d9)

Added 6 comprehensive tests for the new library-specific title behavior in test_frontmatter_meta.py:

New Test Coverage:

  1. test_library_component_title_preserves_underscores - Verifies data_table → rx.data_table: Python Data Table Component · Reflex
  2. test_library_component_title_preserves_hyphens - Verifies select-ll → rx.select-ll: Python Select (Low Level) Component · Reflex
  3. test_library_category_title_uses_display_name - Verifies category pages don't get rx. prefix
  4. test_library_index_title - Verifies library index has custom title
  5. test_non_library_title_unchanged - Verifies non-library pages maintain breadcrumb format
  6. test_html_collection_pages_not_component_format - Verifies HTML element collection pages use breadcrumb format

Bug Fix:

Fixed duplicate title issue where both /library/html/text/ (HTML elements collection) and /library/typography/text/ (rx.text component) were getting the same title. Now HTML collection pages are excluded from component format.

Test Results:

✅ All 18 tests in test_frontmatter_meta.py pass
✅ test_docs_titles_and_descriptions_are_unique now passes
✅ Component card lookups verified for all 4 affected categories (Data-Display: 11 components, Dynamic-Rendering: 4 components, Tables-And-Data-Grids: 3 components, Other-Charts: 2 components)

@Alek99
Alek99 marked this pull request as ready for review October 18, 2026 04:15
@Alek99
Alek99 requested a review from a team as a code owner October 18, 2026 04:15
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-18T04:16:02.066937Z b2924d9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 14 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/app/reflex_docs/pages/docs/library.py Outdated
Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Comment thread docs/library/tables-and-data-grids/data_table.md Outdated
Comment thread docs/library/graphing/other-charts/pyplot.md Outdated
Comment thread docs/library/overlay/drawer.md Outdated
Comment thread docs/library/forms/select.md Outdated
Comment thread docs/library/typography/blockquote.md Outdated
Comment thread docs/library/forms/checkbox.md Outdated
Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Comment thread docs/library/tables-and-data-grids/data_table.md
@masenf masenf added the documentation Improvements or additions to documentation label Oct 19, 2026 — with ChatGPT Codex Connector
Lint fixes:
- Remove unused get_component_link import from page() in library_previews.py
- Change unused desc variables to _ in test_frontmatter_meta.py

Accuracy fixes:
- FAQ: Change 'all core components' to 'many' for Radix claim
- data_table: Remove non-existent page-size picker claim
- data_table: Clarify search/sort/pagination are opt-in with explicit props
- data_table: Fix intro to describe list example, not CSV
- pyplot: Remove candlestick charts (not in core matplotlib)
- code.md: Remove 'syntax-friendly styling' (rx.code doesn't highlight)

Title component names:
- Read component names from frontmatter (rx.text.em, rx.text.quote, rx.recharts.AreaChart)
- Fall back to rx.{slug} if frontmatter unavailable

Meta description length fixes (≤155 chars):
- select.md: 157→142 chars (removed 'high-level')
- blockquote.md: 168→149 chars (removed ', all in pure Python')
- checkbox.md: 183→137 chars (simplified wording)
- drawer.md: 178→142 chars (simplified wording)

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
@cursor

cursor Bot commented Oct 19, 2026

Copy link
Copy Markdown

✅ All 13 cubic bot findings fixed (commit 9edcf6f)

1. Lint Issues (2 fixed)

✅ Unused import - Removed get_component_link import from page() in library_previews.py (now only in render_component_grid)
✅ Unused variables - Changed unused desc variables to _ in all 6 new tests in test_frontmatter_meta.py

2. Accuracy Fixes (7 fixed)

✅ FAQ Radix claim - Changed "all core components are built on Radix" to "many of Reflex's core components" to match existing docs
✅ data_table page-size picker - Removed claim about user-selectable page sizes (10/25/50/100) as Grid.js only supports fixed 10-row default
✅ data_table opt-in props - Clarified search/sort/pagination require explicit search=True, sort=True, pagination=True props
✅ data_table intro - Fixed intro to describe list-based demo instead of mentioning CSV (moved CSV description to pandas section)
✅ pyplot candlestick - Removed candlestick charts from use cases (not in core matplotlib.pyplot)
✅ code.md syntax styling - Removed "syntax-friendly styling" claim as rx.code only supports size/weight/variant/color, not syntax highlighting

3. Component Names in Titles (1 fixed)

✅ Read from frontmatter - Now reads component name from page's components: frontmatter:

  • rx.text.em (not rx.em)
  • rx.text.quote (not rx.quote)
  • rx.recharts.AreaChart (not rx.areachart)
  • Falls back to rx.{slug} if frontmatter unavailable

4. Meta Description Lengths (4 fixed)

✅ select.md: 157→142 chars (removed "high-level")
✅ blockquote.md: 168→149 chars (removed ", all in pure Python")
✅ checkbox.md: 183→137 chars (simplified wording)
✅ drawer.md: 178→142 chars (simplified wording)

Comment thread docs/app/tests/test_frontmatter_meta.py Outdated
- Only use component format (rx.component) for single-component pages
- Low-level API pages with multiple components use breadcrumb format
- Normalize route to kebab-case when looking up frontmatter
- Update test to expect breadcrumb format for select-ll
- All docs tests and ruff pass locally

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/app/reflex_docs/pages/docs/metadata.py Outdated
cursoragent and others added 4 commits October 20, 2026 14:37
…ess keys

- Try slash-terminated key first, then fall back to slash-less
- Fixes single-component -ll pages like input-ll to use component format
- Multi-component -ll pages like select-ll remain breadcrumb format
- Add test for single-component -ll page title generation
- All docs tests and ruff pass locally

Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
Co-authored-by: Alek Petuskey <Alek99@users.noreply.github.com>
- Keep the site-wide "· Reflex Docs" title suffix so docs_metadata and
  hardcoded page titles agree and test_routes' generic-description check
  stays effective.
- Lead library titles with the public component name: multi_docs passes
  component_title_name() to docpage(component_name=...), mapping
  frontmatter names (rx.dialog.root, rx.recharts.AreaChart,
  rx.lucide.Icon) to what users call (rx.dialog,
  rx.recharts.area_chart, rx.icon). Drops the in-function registry
  import and silent except in docs_metadata.
- Fix double spaces in category names ("Data  Display") by merging the
  three get_display_name copies into reflex_docs/utils/library.py.
- Replace the duplicated Tables/Charts page branches with markdown
  CATEGORY_GUIDES on the shared layout; the charts guide shows only on
  Charts.
- Move the library index comparison and FAQ below the component grid as
  markdown with links; note the Tailwind plugin requirement and drop
  unverifiable comparison claims.
- data_table.md: remove the unused add_player handler, fix names, and
  drop the unchecked date-sorting claim.
- Replace title tests with ones covering the name mapping and the final
  titles of real routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shorten the dialog, hover card, and library index descriptions so search
snippets aren't cut mid-sentence, and drop select-ll.md's meta_description:
low-level pages reuse the high-level description with a suffix, so it was
never rendered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carlosabadia
carlosabadia previously approved these changes Oct 21, 2026
@carlosabadia
carlosabadia enabled auto-merge (squash) October 21, 2026 11:29
Comment thread docs/app/reflex_docs/pages/library_previews.py Outdated
Readers comparing Plotly and Matplotlib land on Other Charts, so both chart
categories share one guide. Link Recharts to its category page so the guide
works from either page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@carlosabadia
carlosabadia merged commit 45b8fe7 into main Oct 21, 2026
179 of 194 checks passed
@carlosabadia
carlosabadia deleted the cursor/library-seo-improvements-6955 branch October 21, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants