Move enterprise docs from reflex-enterprise to reflex-web with proper dictionary escaping#1447
Move enterprise docs from reflex-enterprise to reflex-web with proper dictionary escaping#1447devin-ai-integration[bot] wants to merge 9 commits intomainfrom
Conversation
- Moved all docs from reflex-dev/reflex-enterprise/docs to docs/enterprise/ - Includes ag_chart, ag_grid, mantine, map, drag-and-drop, and other enterprise features - Replaced existing overview.md with comprehensive enterprise documentation - Preserves all file structure and content from source repository Co-Authored-By: Alek <alek@pynecone.io>
- Replace 'from flexd.flexd import docs' with 'from pcweb.pages import docs' - Fixes ModuleNotFoundError when building reflex-web with enterprise docs - Updated 12 files across enterprise documentation Co-Authored-By: Alek <alek@pynecone.io>
- Convert plain 'python' code blocks to 'python demo box' format
- Prevents flexdown parser from evaluating dictionary literals as templates
- Resolves SyntaxError: invalid syntax for {'field': 'direction'} expressions
Co-Authored-By: Alek <alek@pynecone.io>
- Replace {'field': i} with dict(field=i) to avoid template evaluation
- Prevents SyntaxError: invalid syntax in flexdown parser
Co-Authored-By: Alek <alek@pynecone.io>
Co-Authored-By: Alek <alek@pynecone.io>
- Move all enterprise documentation from reflex-dev/reflex-enterprise to reflex-web/docs/enterprise - Fix import statements from 'from flexd.flexd import docs' to 'from pcweb.pages import docs' - Properly escape dictionary literals in display-only code blocks to prevent flexdown parser evaluation - Update sidebar navigation to include enterprise documentation sections - All 28 enterprise documentation files successfully migrated and compilation reaches 100% Co-Authored-By: Alek <alek@pynecone.io>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
PR Summary
Major migration of enterprise documentation from reflex-enterprise to reflex-web, including comprehensive docs for AG Grid, Mantine components, maps, and enterprise features.
- Added complete AG Grid documentation suite in
docs/enterprise/ag_grid/covering advanced features like model wrappers, pivot mode, and aligned grids - Added 14 new Mantine component docs in
docs/enterprise/mantine/including MultiSelect, JsonInput, and RingProgress - Added enterprise map documentation in
docs/enterprise/map/index.mdwith interactive features and location tracking - Modified
pcweb/components/docpage/sidebar/sidebar.pyto accommodate new enterprise documentation structure - Fixed dictionary escaping in markdown code blocks using backslashes ({) for Python dictionaries
31 files reviewed, 28 comments
Edit PR Review Bot Settings | Greptile
| rxe.mantine.ring_progress( | ||
| size=100, | ||
| sections=[ | ||
| \{"value": RingProgressState.value, "color": "blue"}, |
There was a problem hiding this comment.
syntax: Escape character \ before the dictionary brace is unnecessary and could cause syntax errors
| \{"value": RingProgressState.value, "color": "blue"}, | |
| {"value": RingProgressState.value, "color": "blue"}, |
docs/enterprise/single-port-proxy.md
Outdated
|
|
||
| > Available starting from Team tier. | ||
|
|
||
| By using the config option `use_single_port` you can configure your backend to proxy any request it received and cannot handle to the frontend. This results in a single port deployment, where the frontend and backend are both served on the same port. |
There was a problem hiding this comment.
syntax: Grammar issue: 'request it received' should be 'requests it receives'
| By using the config option `use_single_port` you can configure your backend to proxy any request it received and cannot handle to the frontend. This results in a single port deployment, where the frontend and backend are both served on the same port. | |
| By using the config option `use_single_port` you can configure your backend to proxy any requests it receives and cannot handle to the frontend. This results in a single port deployment, where the frontend and backend are both served on the same port. |
docs/enterprise/drag-and-drop.md
Outdated
|
|
||
| ## Provider | ||
|
|
||
| For drag and drop to work, your app need to be wrapped with the `rxe.dnd.provider` component. By default, `draggable` and `drop_target` will add the `rxe.dnd.provider` automatically to the app wrapping components tree. |
There was a problem hiding this comment.
syntax: needs 's' in 'your app needs to be wrapped'
| For drag and drop to work, your app need to be wrapped with the `rxe.dnd.provider` component. By default, `draggable` and `drop_target` will add the `rxe.dnd.provider` automatically to the app wrapping components tree. | |
| For drag and drop to work, your app needs to be wrapped with the `rxe.dnd.provider` component. By default, `draggable` and `drop_target` will add the `rxe.dnd.provider` automatically to the app wrapping components tree. |
docs/enterprise/mantine/collapse.md
Outdated
| ), | ||
| rx.button( | ||
| "Toggle Collapse", | ||
| on_click=lambda: CollapseState.toggle_collapse, |
There was a problem hiding this comment.
logic: Event handler reference incorrect. The lambda function makes a reference to the function instead of calling it. Remove the lambda.
| on_click=lambda: CollapseState.toggle_collapse, | |
| on_click=CollapseState.toggle_collapse, |
docs/enterprise/built-with-reflex.md
Outdated
| from pcweb.pages import docs | ||
| ``` | ||
|
|
||
| # Build with Reflex Badge |
There was a problem hiding this comment.
syntax: Title should be 'Built with Reflex Badge' instead of 'Build with Reflex Badge'
| # Build with Reflex Badge | |
| # Built with Reflex Badge |
|
|
||
| # Value Transformers | ||
|
|
||
| AgGrid allow you to apply transformers based on the column of your grid. This allow you to perform operations on the data before displaying it on the grid, without having to pre-process the data on the backend, reducing the load on your application. |
There was a problem hiding this comment.
syntax: Grammar issues in introduction. Should be 'allows' instead of 'allow' (twice).
| AgGrid allow you to apply transformers based on the column of your grid. This allow you to perform operations on the data before displaying it on the grid, without having to pre-process the data on the backend, reducing the load on your application. | |
| AgGrid allows you to apply transformers based on the column of your grid. This allows you to perform operations on the data before displaying it on the grid, without having to pre-process the data on the backend, reducing the load on your application. |
| # Handle sidebar categories for docs/cloud first | ||
| # If the path doesn't start with /docs/cloud, check for general docs | ||
| rx.cond( # pyright: ignore [reportCallIssue] |
There was a problem hiding this comment.
style: Comment mentions 'docs/cloud' but condition checks for '/docs/' - update comment for accuracy
| # Handle sidebar categories for docs/cloud first | |
| # If the path doesn't start with /docs/cloud, check for general docs | |
| rx.cond( # pyright: ignore [reportCallIssue] | |
| # Handle sidebar categories for docs first | |
| # If the path doesn't start with /docs/, check for general docs | |
| rx.cond( # pyright: ignore [reportCallIssue] |
| column_defs = [ | ||
| \{"field": "product_name", "header_name": "Product Name"}, | ||
| \{"field": "price", "header_name": "Price ($)", "value_formatter": "'$' + params.value"}, | ||
| rxe.ag_grid.column_def(col_id="price_eur", header_name="Price (€)", value_formatter="params.data.price + ' €'"), |
There was a problem hiding this comment.
style: col_id used instead of field property, making code inconsistent with earlier examples and potentially confusing readers.
|
|
||
| def dynamic_markers(): | ||
| return rxe.map( | ||
| rxe.map.tile_layer(url="..."), |
There was a problem hiding this comment.
logic: Incomplete URL in example. Add full OpenStreetMap URL like other examples for consistency
| rxe.map.tile_layer(url="..."), | |
| rxe.map.tile_layer( | |
| url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", | |
| attribution='© OpenStreetMap contributors' | |
| ), |
| chart_options: dict = \{ | ||
| "data": [ | ||
| \{"month": "Jan", "avgTemp": 2.3, "iceCreamSales": 162000}, | ||
| \{"month": "Feb", "avgTemp": 3.1, "iceCreamSales": 200000}, | ||
| \{"month": "Mar", "avgTemp": 6.3, "iceCreamSales": 302000}, | ||
| \{"month": "May", "avgTemp": 16.2, "iceCreamSales": 800000}, | ||
| \{"month": "Jul", "avgTemp": 22.8, "iceCreamSales": 1254000}, | ||
| \{"month": "Aug", "avgTemp": 24.1, "iceCreamSales": 1500000}, | ||
| \{"month": "Sep", "avgTemp": 14.5, "iceCreamSales": 950000}, | ||
| \{"month": "Oct", "avgTemp": 12.4, "iceCreamSales": 500000}, | ||
| \{"month": "Nov", "avgTemp": 7.2, "iceCreamSales": 300000}, | ||
| \{"month": "Dec", "avgTemp": 3.5, "iceCreamSales": 200000}, | ||
| ], |
There was a problem hiding this comment.
logic: missing April and June months in the sample data which could confuse users
…lers - Remove unnecessary backslash escaping from executable code blocks in ring-progress.md and pill.md - Fix grammar issues in single-port-proxy.md and drag-and-drop.md - Correct event handler reference in collapse.md (remove lambda wrapper) - Update title from 'Build' to 'Built' in built-with-reflex.md - All changes address specific feedback from greptile-apps bot comments Co-Authored-By: Alek <alek@pynecone.io>
- Re-add backslash escaping to dictionary literal in display-only code block
- Prevents flexdown parser from evaluating {value: RingProgressState.value, color: blue} as template expression
- Fixes ValueError: Failed to evaluate expression error
Co-Authored-By: Alek <alek@pynecone.io>
- Create enterprise sidebar items following existing patterns - Enable enterprise section in sidebar navigation - Replace external enterprise link with internal navigation - Organize enterprise docs into logical sections: Overview, Configuration, AG Grid, AG Chart, Interactive Components, Mantine Co-Authored-By: Alek <alek@pynecone.io>
Move enterprise docs from reflex-enterprise to reflex-web with proper dictionary escaping
Summary
This PR migrates all enterprise documentation from the
reflex-dev/reflex-enterpriserepository toreflex-dev/reflex-web/docs/enterprise/. The migration includes 28 documentation files covering AG Grid, AG Charts, Maps, Mantine components, drag-and-drop, and enterprise configuration features.Key technical changes:
{"key": "value"}→\{"key": "value"}) to prevent the flexdown parser from evaluating them as template expressionsfrom flexd.flexd import docstofrom pcweb.pages import docsto match reflex-web structurepython demo exec) blocks to display-only (python) blocks where enterprise components can't run in reflex-web environmentReview & Testing Checklist for Human
🔴 Critical - Must Test:
http://localhost:3000/docs/enterprise/and verify all enterprise documentation pages load and render correctly{"key": "value"}not error messages)from pcweb.pages import docsimports work without runtime errorsRecommended test plan:
reflex run) and navigate to enterprise docsDiagram
graph TB subgraph "reflex-enterprise (source)" RE[docs/] --> REFiles[28 enterprise docs] end subgraph "reflex-web (destination)" RW[docs/enterprise/] --> RWFiles[28 migrated docs]:::major-edit Sidebar[pcweb/components/docpage/sidebar/sidebar.py]:::major-edit end subgraph "Key Changes" Dict[Dictionary escaping<br/>{"key":"value"} → \{"key":"value"}]:::major-edit Import[Import updates<br/>flexd.flexd → pcweb.pages]:::major-edit CodeBlock[Code block type changes<br/>exec → display-only]:::minor-edit end REFiles -.->|migrate| RWFiles RWFiles --> Dict RWFiles --> Import RWFiles --> CodeBlock subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
Technical Context: The main challenge was that reflex-web's flexdown parser treats dictionary literals like
{"key": "value"}as template expressions and tries to evaluate them, causing SyntaxError. The solution was to escape the braces with backslashes:\{"key": "value"}which prevents parser evaluation while preserving the visual appearance in rendered docs.Files Changed: 29 files total - 28 new enterprise documentation files + 1 sidebar navigation update. All changes maintain the original documentation content while adapting it for the reflex-web environment.
Link to Devin run: https://app.devin.ai/sessions/37382e16e29044f896be52de63fb5e2b
Requested by: @Alek99