Skip to content

Commit d8f040e

Browse files
committed
Merge remote-tracking branch 'origin/main' into masenf/redis_lost+found
2 parents 07a9093 + c4254ed commit d8f040e

File tree

10 files changed

+228
-174
lines changed

10 files changed

+228
-174
lines changed

pyi_hashes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"reflex/components/base/app_wrap.pyi": "22e94feaa9fe675bcae51c412f5b67f1",
66
"reflex/components/base/body.pyi": "e8ab029a730824bab6d4211203609e6a",
77
"reflex/components/base/document.pyi": "311c53c90a60587a82e760103758a3cf",
8-
"reflex/components/base/error_boundary.pyi": "c4e5f60589ad997bfab92c83ca938b33",
8+
"reflex/components/base/error_boundary.pyi": "a678cceea014cb16048647257cd24ba6",
99
"reflex/components/base/fragment.pyi": "745f1be02c23a0b25d7c52d7423ec76a",
1010
"reflex/components/base/link.pyi": "0bc1d26ee29d8864aed14a12991bd47d",
1111
"reflex/components/base/meta.pyi": "129aecf65ab53f756c4d1cbe1d0b188d",
@@ -39,7 +39,7 @@
3939
"reflex/components/el/elements/tables.pyi": "686eb70ea7d8c4dafb0cc5c284e76184",
4040
"reflex/components/el/elements/typography.pyi": "684e83dde887dba12badd0fb75c87c04",
4141
"reflex/components/gridjs/datatable.pyi": "98a7e1b3f3b60cafcdfcd8879750ee42",
42-
"reflex/components/lucide/icon.pyi": "cc0bbb10e53b339b8c8f10c00996768c",
42+
"reflex/components/lucide/icon.pyi": "7d03a93e2b222acc4345889c74b43269",
4343
"reflex/components/markdown/markdown.pyi": "2f84254a548e908020949564fc289339",
4444
"reflex/components/moment/moment.pyi": "e1952f1c2c82cef85d91e970d1be64ab",
4545
"reflex/components/plotly/plotly.pyi": "4311a0aae2abcc9226abb6a273f96372",

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "reflex"
3-
version = "0.8.17dev1"
3+
version = "0.8.18dev1"
44
description = "Web apps in pure Python."
55
license.text = "Apache-2.0"
66
authors = [
@@ -30,8 +30,8 @@ dependencies = [
3030
"pydantic >=1.10.21,<3.0",
3131
"python-multipart >=0.0.20,<1.0",
3232
"python-socketio >=5.12.0,<6.0",
33-
"redis >=5.2.1,<7.0",
34-
"reflex-hosting-cli >=0.1.57",
33+
"redis >=5.2.1,<8.0",
34+
"reflex-hosting-cli >=0.1.58",
3535
"rich >=13,<15",
3636
"sqlmodel >=0.0.27,<0.1",
3737
"starlette >=0.47.0",
@@ -243,7 +243,7 @@ fail_fast = true
243243

244244
[[tool.pre-commit.repos]]
245245
repo = "https://github.com/astral-sh/ruff-pre-commit"
246-
rev = "v0.14.1"
246+
rev = "v0.14.2"
247247
hooks = [
248248
{ id = "ruff-format", args = [
249249
"reflex",
@@ -275,7 +275,7 @@ hooks = [
275275

276276
[[tool.pre-commit.repos]]
277277
repo = "https://github.com/RobertCraigie/pyright-python"
278-
rev = "v1.1.406"
278+
rev = "v1.1.407"
279279
hooks = [{ id = "pyright", args = ["reflex", "tests"], language = "system" }]
280280

281281
[[tool.pre-commit.repos]]

reflex/components/base/error_boundary.py

Lines changed: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from reflex.components.component import Component
66
from reflex.components.datadisplay.logo import svg_logo
7-
from reflex.components.el import a, button, details, div, h2, hr, p, pre, summary
7+
from reflex.components.el import a, button, div, h2, hr, p, pre, svg
88
from reflex.event import EventHandler, set_clipboard
99
from reflex.state import FrontendEventExceptionState
1010
from reflex.vars.base import Var
@@ -65,53 +65,67 @@ def create(cls, *children, **props):
6565
div(
6666
div(
6767
div(
68+
svg(
69+
svg.circle(cx="12", cy="12", r="10"),
70+
svg.path(d="M16 16s-1.5-2-4-2-4 2-4 2"),
71+
svg.line(x1="9", x2="9.01", y1="9", y2="9"),
72+
svg.line(x1="15", x2="15.01", y1="9", y2="9"),
73+
xmlns="http://www.w3.org/2000/svg",
74+
width="25vmin",
75+
view_box="0 0 24 24",
76+
class_name="lucide lucide-frown-icon lucide-frown",
77+
custom_attrs={
78+
"fill": "none",
79+
"stroke": "currentColor",
80+
"stroke-width": "2",
81+
"stroke-linecap": "round",
82+
"stroke-linejoin": "round",
83+
},
84+
),
6885
h2(
6986
"An error occurred while rendering this page.",
70-
font_size="1.25rem",
87+
font_size="5vmin",
7188
font_weight="bold",
7289
),
73-
p(
74-
"This is an error with the application itself.",
75-
opacity="0.75",
76-
),
77-
details(
78-
summary("Error message", padding="0.5rem"),
79-
div(
80-
div(
81-
pre(
82-
Var(_js_expr=_ERROR_DISPLAY),
83-
),
84-
padding="0.5rem",
85-
width="fit-content",
86-
),
87-
width="100%",
88-
max_height="50vh",
89-
overflow="auto",
90-
background="#000",
91-
color="#fff",
92-
border_radius="0.25rem",
93-
),
94-
button(
95-
"Copy",
96-
on_click=set_clipboard(
97-
Var(_js_expr=_ERROR_DISPLAY)
98-
),
99-
padding="0.35rem 0.75rem",
100-
margin="0.5rem",
101-
background="#fff",
102-
color="#000",
103-
border="1px solid #000",
104-
border_radius="0.25rem",
105-
font_weight="bold",
90+
opacity="0.5",
91+
display="flex",
92+
gap="4vmin",
93+
align_items="center",
94+
),
95+
p(
96+
"This is an error with the application itself. Refreshing the page might help.",
97+
opacity="0.75",
98+
margin_block="1rem",
99+
),
100+
div(
101+
div(
102+
pre(
103+
Var(_js_expr=_ERROR_DISPLAY),
106104
),
105+
padding="0.5rem",
106+
width="fit-content",
107107
),
108-
display="flex",
109-
flex_direction="column",
110-
gap="1rem",
111-
max_width="50ch",
112-
border="1px solid #888888",
113-
border_radius="0.25rem",
114-
padding="1rem",
108+
width="100%",
109+
background="color-mix(in srgb, currentColor 5%, transparent)",
110+
max_height="15rem",
111+
overflow="auto",
112+
border_radius="0.4rem",
113+
),
114+
button(
115+
"Copy",
116+
on_click=set_clipboard(Var(_js_expr=_ERROR_DISPLAY)),
117+
padding="0.35rem 1.35rem",
118+
margin_block="0.5rem",
119+
margin_inline_start="auto",
120+
background="color-mix(in srgb, currentColor 15%, transparent)",
121+
border_radius="0.4rem",
122+
width="fit-content",
123+
_hover={
124+
"background": "color-mix(in srgb, currentColor 25%, transparent)"
125+
},
126+
_active={
127+
"background": "color-mix(in srgb, currentColor 35%, transparent)"
128+
},
115129
),
116130
hr(
117131
border_color="currentColor",
@@ -131,7 +145,10 @@ def create(cls, *children, **props):
131145
),
132146
display="flex",
133147
flex_direction="column",
134-
gap="1rem",
148+
gap="0.5rem",
149+
max_width="min(80ch, 90vw)",
150+
border_radius="0.25rem",
151+
padding="1rem",
135152
),
136153
height="100%",
137154
width="100%",

reflex/components/lucide/icon.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from reflex.vars.base import LiteralVar, Var
77
from reflex.vars.sequence import LiteralStringVar, StringVar
88

9-
LUCIDE_LIBRARY = "lucide-react@0.546.0"
9+
LUCIDE_LIBRARY = "lucide-react@0.548.0"
1010

1111

1212
class LucideIconComponent(Component):
@@ -286,6 +286,7 @@ def _get_imports(self):
286286
"binoculars",
287287
"biohazard",
288288
"bird",
289+
"birdhouse",
289290
"bitcoin",
290291
"blend",
291292
"blinds",
@@ -828,6 +829,7 @@ def _get_imports(self):
828829
"gallery_vertical_end",
829830
"gallery_vertical",
830831
"gamepad_2",
832+
"gamepad_directional",
831833
"gamepad",
832834
"gantt_chart",
833835
"gauge",

reflex/constants/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Bun(SimpleNamespace):
1414
"""Bun constants."""
1515

1616
# The Bun version.
17-
VERSION = "1.3.0"
17+
VERSION = "1.3.1"
1818

1919
# Min Bun Version
2020
MIN_VERSION = "1.3.0"

reflex/plugins/tailwind_v4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Constants(SimpleNamespace):
1717
"""Tailwind constants."""
1818

1919
# The Tailwindcss version
20-
VERSION = "[email protected].15"
20+
VERSION = "[email protected].16"
2121
# The Tailwind config.
2222
CONFIG = "tailwind.config.js"
2323
# Default Tailwind content paths
@@ -156,7 +156,7 @@ def get_frontend_development_dependencies(self, **context) -> list[str]:
156156
return [
157157
*super().get_frontend_development_dependencies(**context),
158158
Constants.VERSION,
159-
"@tailwindcss/[email protected].15",
159+
"@tailwindcss/[email protected].16",
160160
]
161161

162162
def pre_compile(self, **context):

reflex/state.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,6 +2486,14 @@ class FrontendEventExceptionState(State):
24862486
),
24872487
re.compile(re.escape("TypeError: null is not an object")), # Safari
24882488
re.compile(r"TypeError: can't access property \".*\" of null"), # Firefox
2489+
# Firefox: property access is on a function that returns null.
2490+
re.compile(
2491+
re.escape("TypeError: can't access property \"")
2492+
+ r".*"
2493+
+ re.escape('", ')
2494+
+ r".*"
2495+
+ re.escape(" is null")
2496+
),
24892497
]
24902498

24912499
@event

reflex/utils/prerequisites.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import contextlib
66
import importlib
77
import importlib.metadata
8+
import inspect
89
import json
910
import random
1011
import re
@@ -435,7 +436,9 @@ async def get_redis_status() -> dict[str, bool | None]:
435436
status = True
436437
redis_client = get_redis()
437438
if redis_client is not None:
438-
await redis_client.ping()
439+
ping_command = redis_client.ping()
440+
if inspect.isawaitable(ping_command):
441+
await ping_command
439442
else:
440443
status = None
441444
except RedisError:

0 commit comments

Comments
 (0)