Skip to content

Commit 2dd4330

Browse files
Resolve merge conflict: keep URL-to-filepath conversion
- Maintains kebab-case to snake_case conversion for browser URLs - Converts /docs/getting-started/introduction/ to docs/getting_started/introduction.md - Handles both StringVar and regular string objects - Preserves double slash cleanup functionality Co-Authored-By: [email protected] <[email protected]>
2 parents 17f4b60 + 953c1a9 commit 2dd4330

14 files changed

+17
-597
lines changed

blog/2023-09-28-unlocking-new-workflows-with-background-tasks.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ continue processing UI events in the foreground. The only time the UI is
106106
blocked is during the short period of time where the response is being appended
107107
to the state.
108108

109-
For a more complete example with comparisons of the two styles, see the
110-
`random-number-range` app in the
111-
[reflex-examples](https://github.com/reflex-dev/reflex-examples/blob/main/random-number-range/random_number_range/random_number_range.py)
112-
repository.
113109

114110
```md alert warning
115111
# `@rx.event(background=True)` used to be called `@rx.background`.
@@ -148,4 +144,4 @@ release notes for all the new features and bug fixes.
148144

149145
🔧 Happy Building 🚀
150146

151-
-- Reflex Team
147+
-- Reflex Team

blog/2024-09-25-using-ag-grid-in-reflex.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pip install reflex-ag-grid
5151
```
5252

5353
**Note:** This is an initial release.
54-
Check out the [open source repo](https://github.com/reflex-dev/reflex-ag-grid) and our [docs](https://reflex.dev/docs/library/tables-and-data-grids/ag-grid/) for the latest version and any updates.
54+
Check out the [open source repo](https://github.com/reflex-dev/reflex-ag-grid) and our [docs](https://reflex.dev/docs/enterprise/ag-grid/) for the latest version and any updates.
5555

5656
## What is AG Grid?
5757

debug_url_construction.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/hosting/deploy-quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The command is by default interactive. It asks you a few questions for informati
6363

6464
That’s it! You should receive some feedback on the progress of your deployment and in a few minutes your app should be up. 🎉
6565

66-
For detailed information about the deploy command and its options, see the [Deploy API Reference](https://reflex.dev/docs/hosting/deploy/) and the [CLI Reference](https://reflex.dev/docs/api-reference/cli/).
66+
For detailed information about the deploy command and its options, see the [Deploy API Reference]({docs.cloud.deploy.path}) and the [CLI Reference](https://reflex.dev/docs/api-reference/cli/).
6767

6868

6969
```md alert info

pcweb/components/docpage/navbar/navbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def new_component_section() -> rx.Component:
515515
),
516516
underline="none",
517517
is_external=True,
518-
href=f"{REFLEX_CLOUD_URL}/?redirect_url={REFLEX_BUILD_URL}",
518+
href=f"{REFLEX_CLOUD_URL.strip('/')}/?redirect_url={REFLEX_BUILD_URL}",
519519
),
520520
class_name="desktop-only",
521521
),

pcweb/pages/gallery/apps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pcweb.pages.gallery import gallery
88
from pcweb.components.button import button, button_with_icon
99
from pcweb.components.code_card import gallery_app_card
10-
10+
import copy
1111

1212
GALLERY_APPS_PATH = "templates/"
1313

@@ -28,12 +28,12 @@ def get_route(path: str):
2828

2929
paths = flexdown.utils.get_flexdown_files(GALLERY_APPS_PATH)
3030
gallery_apps_data = get_gallery_apps(paths)
31-
gallery_apps_data_copy = gallery_apps_data.copy()
3231

3332

3433
def more_posts(current_post: dict) -> rx.Component:
3534
posts = []
36-
app_items = list(gallery_apps_data_copy.items())
35+
app_copy = copy.deepcopy(gallery_apps_data)
36+
app_items = list(app_copy.items())
3737
current_index = next(
3838
(
3939
i

pcweb/pages/hosting/views/templates.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import reflex as rx
2+
import copy
23

34

45
def gallery_app_card(app: dict) -> rx.Component:
@@ -49,8 +50,10 @@ def gallery_app_card(app: dict) -> rx.Component:
4950
def component_grid() -> rx.Component:
5051
from pcweb.pages.gallery.apps import gallery_apps_data
5152

53+
apps_copy = copy.deepcopy(gallery_apps_data)
54+
5255
posts = []
53-
for path, document in list(gallery_apps_data.items()):
56+
for path, document in list(apps_copy.items()):
5457
document.metadata["url"] = document.metadata["title"]
5558
document.metadata["title"] = templates_name_map.get(
5659
document.metadata["title"], document.metadata["title"]

pcweb/pages/page404.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111

1212
@webpage(path="/404", title="Page Not Found · Reflex.dev", add_as_page=False)
1313
def page404():
14-
return rx.center(
15-
rx.vstack(
16-
markdown_with_shiki(contents),
17-
rx.spacer(),
18-
),
19-
class_name="h-[80vh] w-full",
14+
return rx.box(
15+
markdown_with_shiki(contents),
16+
class_name="h-[80vh] w-full flex flex-col items-center justify-center",
2017
)

pcweb/templates/docpage/docpage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,13 @@ def convert_url_path_to_github_path(url_path) -> str:
282282
283283
Args:
284284
url_path: URL path like "/docs/getting-started/introduction/" (can be str or rx.Var[str])
285-
285+
286286
Returns:
287287
GitHub filesystem path like "docs/getting_started/introduction.md"
288288
"""
289289
if hasattr(url_path, '_js_expr'): # This is a Reflex Var
290290
from reflex.vars.sequence import string_replace_operation
291-
291+
292292
path_no_slashes = string_replace_operation(url_path, r"^/+|/+$", "")
293293
path_clean = string_replace_operation(path_no_slashes, r"/+", "/")
294294

@@ -336,7 +336,7 @@ def docpage_footer(path: str):
336336
),
337337
link_pill(
338338
"Edit this page",
339-
f"https://github.com/reflex-dev/reflex-web/blob/main/{convert_url_path_to_github_path(path)}",
339+
f"https://github.com/reflex-dev/reflex-web/blob/main{convert_url_path_to_github_path(path)}",
340340
),
341341
class_name="desktop-only flex-row items-center gap-2 w-auto",
342342
),

scripts/test_hyphenated_folders.py

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)