New features
,
and _
options for formatted numbers
class State(rx.State):
large_number: float = 123123213.21321312
rx.text(f"{State.large_number:,.3f}")
- add
,
and_
operations by @adhami3310 in #4950
Add raw headers to router headers
class State(rx.State):
@rx.event
def on_event(self):
print(self.router.header.raw_headers) # read only header mapping
- add raw headers to headers by @adhami3310 in #4958
Expose SVG elements at the el level
We are trying to reach parity where all acceptable HTML elements are exposed at the .el scope, now you can use text
, line
, circle
, ellipse
, rect
, polygon
, path
, stop
, linear_gradient
, radial_gradient
, defs
.
- expose svg elements at the el level by @adhami3310 in #4962
New .get var operation
Useful accessing State vars typed as dicts/dataclasses/pydantic modedls to provide a default if the key is possibly absent.
class State(rx.State):
field: rx.Field[dict[str, int]] = rx.field({"josh": 96, "john": 32})
State.field.get("joseph", 0)
Thanks for @benedikt-bartscher for the contribution!
- add Objectvar.get, Closes #4928 by @benedikt-bartscher in #4956
Bug fixes
- fix: every computed var should get it's own static deps by @benedikt-bartscher in #4914
- use noopener for window.open by @adhami3310 in #4933
- Support event_actions in Form
on_submit
by @masenf in #4912 - add typehint_issubclass for var_type in style by @adhami3310 in #4946
- be more careful with issubclass use with var_type by @adhami3310 in #4951
- Dedupe custom codes emitted by rx.memo components by @masenf in #4793
- Prepend hydrate event when connecting by @masenf in #4929
- Disconnect old websockets by @masenf in #4953
- add overload for typeddict mapping since their value type is any by @adhami3310 in #4949
- Handle setting loglevel earlier by @masenf in #4964
- remove all get_config at the global scope by @adhami3310 in #4965
- fix: allow multiple middleware postprocess update mutations by @benedikt-bartscher in #4970
Error messages
- better error message for return type of computer var by @adhami3310 in #4911
- improve error message for untyped vars by @adhami3310 in #4963
- print warning instead of error with invalid icon by @adhami3310 in #4959
Chores
We are now using uv
in the main repo. Or at least we moved off of poetry as it did not support certain features in pyproject.toml. Realistically, everything in pyproject.toml is standard and should be fine to use by any package manager.
- add .env to gitignore just in case by @adhami3310 in #4909
- @Lendemor don't use init in pyi_generator by @adhami3310 in #4910
- simplify ai init by @Lendemor in #4932
- update pyproject.toml by @adhami3310 in #4944
- migrate from poetry to uv by @adhami3310 in #4952
- bump reflex to 0.7.3.dev1 by @adhami3310 in #4957
- add template for enterprise, cloud and build issues by @Lendemor in #4961
- middleware attr should be private by @Lendemor in #4939
- prettier by @adhami3310 in #4941
- fix prettier by @benedikt-bartscher in #4971
- uv build fixes by @adhami3310 in #4968
Full Changelog: v0.7.2...v0.7.3