Skip to content

Commit 2390be4

Browse files
devin-ai-integration[bot]Alek99carlosabadia
authored
Remove toggle format from enterprise docs - show code below examples (#1514)
- Changed all instances of ```python demo exec toggle to ```python demo exec - Affects 20 enterprise documentation files across AG Grid, Mantine components, drag-and-drop, and maps - Code examples now appear below rendered components instead of in toggle tabs - Improves documentation UX by showing code and UI together Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Alek <[email protected]> Co-authored-by: Carlos <[email protected]>
1 parent ee147f7 commit 2390be4

20 files changed

+59
-59
lines changed

docs/enterprise/ag_chart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
AG Chart is a powerful charting library that provides interactive charts and data visualization components for enterprise applications.
44

5-
```python demo exec toggle
5+
```python demo exec
66
import reflex as rx
77
import reflex_enterprise as rxe
88

@@ -27,4 +27,4 @@ def basic_chart():
2727
)
2828
```
2929

30-
For more detailed documentation, see the [AG Chart Documentation](https://charts.ag-grid.com/).
30+
For more detailed documentation, see the [AG Chart Documentation](https://charts.ag-grid.com/).

docs/enterprise/ag_grid/aligned-grids.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AgGrid provides a way to align multiple grids together. This is useful when you
66

77
You can do so through the `aligned_grids` prop. This prop takes a list of grid IDs that you want to align.
88

9-
```python demo exec toggle
9+
```python demo exec
1010
import pandas as pd
1111

1212
import reflex_enterprise as rxe
@@ -58,4 +58,4 @@ def aligned_grids_page():
5858

5959
```md alert warning
6060
# The pivot functionality does not work with aligned grids. This is because pivoting data changes the columns, which would make the aligned grids incompatible, as they are no longer sharing the same set of columns.
61-
```
61+
```

docs/enterprise/ag_grid/index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A basic Reflex AG Grid contains column definitions `column_defs`, which define t
2121

2222
Each grid also requires a unique `id`, which is needed to uniquely identify the Ag-Grid instance on the page. If you have multiple grids on the same page, each grid must have a unique `id` so that it can be correctly rendered and managed.
2323

24-
```python demo exec toggle
24+
```python demo exec
2525
import reflex as rx
2626
import reflex_enterprise as rxe
2727
import pandas as pd
@@ -56,7 +56,7 @@ The format of the data passed to the `row_data` prop is a list of dictionaries.
5656

5757
The previous example showed the `column_defs` written out in full. You can also extract the required information from the dataframe's column names:
5858

59-
```python demo exec toggle
59+
```python demo exec
6060
import reflex as rx
6161
import reflex_enterprise as rxe
6262
import pandas as pd
@@ -78,7 +78,7 @@ def ag_grid_simple_2():
7878

7979
In the above example, the first letter of the field names provided are capitalized when displaying the header name. You can customize the header names by providing a `header_name` key in the column definition. In this example, the `header_name` is customized for the second and third columns.
8080

81-
```python demo exec toggle
81+
```python demo exec
8282
import reflex as rx
8383
import reflex_enterprise as rxe
8484
import pandas as pd
@@ -106,7 +106,7 @@ def ag_grid_simple_headers():
106106

107107
Allow a user to filter a column by setting the `filter` key to `True` in the column definition. In this example we enable filtering for the first and last columns.
108108

109-
```python demo exec toggle
109+
```python demo exec
110110
import reflex as rx
111111
import reflex_enterprise as rxe
112112
import pandas as pd
@@ -138,7 +138,7 @@ You can also set the filter type using the `filter` key. The following filter ty
138138

139139
(`ag_grid.filters.set` and `ag_grid.filters.multi` are available with AG Grid Enterprise)
140140

141-
```python demo exec toggle
141+
```python demo exec
142142
import reflex as rx
143143
import reflex_enterprise as rxe
144144
import pandas as pd
@@ -169,7 +169,7 @@ By default, the rows can be sorted by any column by clicking on the column heade
169169

170170
In this example, we disable sorting for the first column.
171171

172-
```python demo exec toggle
172+
```python demo exec
173173
import reflex as rx
174174
import reflex_enterprise as rxe
175175
import pandas as pd
@@ -197,7 +197,7 @@ def ag_grid_simple_row_sorting():
197197

198198
Row Selection is enabled using the `row_selection` attribute. Setting it to `multiple` allows users to select multiple rows at a time. You can use the `checkbox_selection` column definition attribute to render checkboxes for selection.
199199

200-
```python demo exec toggle
200+
```python demo exec
201201
import reflex as rx
202202
import reflex_enterprise as rxe
203203
import pandas as pd
@@ -283,7 +283,7 @@ def ag_grid_simple_editing():
283283

284284
By default, the grid uses a vertical scroll. You can reduce the amount of scrolling required by adding pagination. To add pagination, set `pagination=True`. You can set the `pagination_page_size` to the number of rows per page and `pagination_page_size_selector` to a list of options for the user to select from.
285285

286-
```python demo exec toggle
286+
```python demo exec
287287
import reflex as rx
288288
import reflex_enterprise as rxe
289289
import pandas as pd
@@ -529,7 +529,7 @@ The example below uses the `select_all()` and `deselect_all()` methods of the AG
529529
# Ensure that the docs are set to React tab in AG Grid
530530
```
531531

532-
```python demo exec toggle
532+
```python demo exec
533533
import reflex as rx
534534
import reflex_enterprise as rxe
535535
import pandas as pd
@@ -581,7 +581,7 @@ rx.button("Select all", on_click=rxe.ag_grid.api(id="ag_grid_basic_row_selection
581581
The following example lets a user [export the data as a csv](https://www.ag-grid.com/javascript-data-grid/grid-api/#reference-export-exportDataAsCsv) and [adjust the size of columns to fit the available horizontal space](https://www.ag-grid.com/javascript-data-grid/grid-api/#reference-columnSizing-sizeColumnsToFit). (Try resizing the screen and then clicking the resize columns button)
582582

583583

584-
```python demo exec toggle
584+
```python demo exec
585585
import reflex as rx
586586
import reflex_enterprise as rxe
587587
import pandas as pd
@@ -661,6 +661,6 @@ def ag_grid_api_argument():
661661

662662
The react code for the `get_data_as_csv` method of the AG Grid API is `getDataAsCsv = (params?: CsvExportParams) => string | undefined;`. Here the function returns a `string` (or undefined).
663663

664-
In Reflex to handle this returned value it is necessary to pass a `callback` as an argument to the `get_data_as_csv` method that will get the returned value. In this example the `handle_get_data` event handler is passed as the callback. This event handler will be called with the returned value from the `get_data_as_csv` method.
664+
In Reflex to handle this returned value it is necessary to pass a `callback` as an argument to the `get_data_as_csv` method that will get the returned value. In this example the `handle_get_data` event handler is passed as the callback. This event handler will be called with the returned value from the `get_data_as_csv` method.
665665

666666

docs/enterprise/ag_grid/pivot-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can also define how rows are aggregated by passing the `agg_func` property i
1414

1515
You can find a live example here: [Pivot Mode Example](https://aggrid.reflex.run/pivot).
1616

17-
```python demo exec toggle
17+
```python demo exec
1818
import pandas as pd
1919
import reflex as rx
2020

@@ -54,7 +54,7 @@ def pivot_page():
5454

5555
# Pivot using State
5656

57-
```python demo exec toggle
57+
```python demo exec
5858
import pandas as pd
5959
import reflex as rx
6060

docs/enterprise/ag_grid/value-transformers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ TOC:
2222

2323
If you have two columns `col_a` and `col_b` and you want to display the sum of these two columns in a third column `sum`, you can define the `value_getter` of `sum` as follows:
2424

25-
```python demo exec toggle
25+
```python demo exec
2626
import reflex as rx
2727
import reflex_enterprise as rxe
2828
import pandas as pd
@@ -52,7 +52,7 @@ def ag_grid_value_getter():
5252

5353
If you have a column `price` and you want to display the price with a currency symbol, you can define the `value_formatter` of `price` as follows:
5454

55-
```python demo exec toggle
55+
```python demo exec
5656
import reflex as rx
5757
import reflex_enterprise as rxe
5858
import pandas as pd

docs/enterprise/drag-and-drop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Reflex Enterprise provides comprehensive drag and drop functionality for creatin
2222

2323
Here's a basic example showing how to create a draggable item and drop target:
2424

25-
```python demo exec toggle
25+
```python demo exec
2626
import reflex as rx
2727
import reflex_enterprise as rxe
2828

@@ -77,7 +77,7 @@ def basic_drag_drop():
7777

7878
Create a draggable item that can be moved between multiple drop targets:
7979

80-
```python demo exec toggle
80+
```python demo exec
8181
import reflex as rx
8282
import reflex_enterprise as rxe
8383

@@ -145,7 +145,7 @@ def multi_position_example():
145145

146146
Access drag and drop state information using collected parameters:
147147

148-
```python demo exec toggle
148+
```python demo exec
149149
import reflex as rx
150150
import reflex_enterprise as rxe
151151

@@ -204,7 +204,7 @@ def state_tracking_example():
204204

205205
Create dynamic draggable lists using `rx.foreach`:
206206

207-
```python demo exec toggle
207+
```python demo exec
208208
import reflex as rx
209209
import reflex_enterprise as rxe
210210

docs/enterprise/mantine/autocomplete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Autocomplete
66

77
`rxe.mantine.autocomplete` is a component for providing suggestions as the user types. It is useful for enhancing user experience by offering relevant options based on input.
88

9-
```python demo exec toggle
9+
```python demo exec
1010
import reflex as rx
1111
import reflex_enterprise as rxe
1212

@@ -19,4 +19,4 @@ def autocomplete_example():
1919
description="Select a fruit from the list",
2020
),
2121
)
22-
```
22+
```

docs/enterprise/mantine/collapse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Collapse
66

77
`rxe.mantine.collapse` is a component that allows you to create collapsible sections in your application. It is useful for hiding or showing content based on user interaction, such as clicking a button or a link.
88

9-
```python demo exec toggle
9+
```python demo exec
1010
import reflex as rx
1111
import reflex_enterprise as rxe
1212

@@ -33,4 +33,4 @@ def collapse_example():
3333
on_click=lambda: CollapseState.toggle_collapse,
3434
),
3535
)
36-
```
36+
```

docs/enterprise/mantine/json-input.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: JSON Input
88

99
## Example
1010

11-
```python demo exec toggle
11+
```python demo exec
1212
import reflex as rx
1313
import reflex_enterprise as rxe
1414

@@ -28,4 +28,4 @@ def json_input_example():
2828
on_change=lambda value: JsonInputState.setvar("json_data", value),
2929
width="300px",
3030
)
31-
```
31+
```

docs/enterprise/mantine/loading-overlay.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Loading Overlay
55
# Loading Overlay component
66
`rxe.mantine.loading_overlay` is a component that displays a loading overlay on top of its children. It is useful for indicating that a process is ongoing and prevents user interaction with the underlying content.
77

8-
```python demo exec toggle
8+
```python demo exec
99
import reflex as rx
1010
import reflex_enterprise as rxe
1111

@@ -29,4 +29,4 @@ def loading_overlay_example():
2929
z_index=1000,
3030
),
3131
),rx.button("Toggle Loading", on_click=LoadingOverlayState.toggle_loading),
32-
```
32+
```

0 commit comments

Comments
 (0)