Commit Graph

2018 Commits

Author SHA1 Message Date
Masen Furer
49caf9d507
bump to 0.6.6.post3 2024-12-09 18:25:12 -08:00
Thomas Brandého
9d9dc5291b
fix non-interactive flag in deploy command (#4498) 2024-12-09 18:25:03 -08:00
Masen Furer
7c81dcaa8b
pyproject.toml: bump to 0.6.6.post2 2024-12-05 01:18:34 -08:00
Masen Furer
5f0aa0c4e0
rename loginv2 to login (#4486)
* rename loginv2 to login

* reflex-hosting-cli bump to 0.1.29

* relock deps
2024-12-05 01:18:16 -08:00
Masen Furer
dc997786aa
pyproject: bump to 0.6.6.post1 2024-12-04 23:26:41 -08:00
Simon Young
ecbf63406a
remove v2 commands (#4478)
* remove v2 commands

* format

* remove v2

* remove v2

* little fixes friend

* add cloud

* relock poetry deps

* bump reflex-hosting-cli dep

* test_dynamic_routes: wait for token

attempt to avoid test flakiness

* relock deps

* test_dynamic_routes: increase polling timeout

---------

Co-authored-by: simon <simon@reflex.dev>
Co-authored-by: Masen Furer <m_github@0x26.net>
2024-12-04 23:22:49 -08:00
Elijah Ahianyo
da4599fdde
[HOS-373][HOS-372]Logout should not open the browser (#4475)
* Logout should not open the browser

* check user login first before deploy
2024-12-04 23:22:49 -08:00
Masen Furer
3219157476
[ENG-4149] require login to deploy named templates (#4450)
* integration_tests.yml: init masenf/rx_shout as a template

fix test

* [ENG-4149] require login to deploy template

* Send loginv2 telemetry event
2024-12-04 23:22:48 -08:00
Masen Furer
0c8192222f
rx.upload must include _var_data from props (#4463)
* rx.upload must include _var_data from props

str-casting the dropzone arguments removed any VarData they depended on, like
the state context.

update test_upload to include passing a prop from a state var

* Handle large payload delta from upload event handler

Fix update chunk chaining logic; try/catch wasn't catching errors from the
async inner function.
2024-12-02 20:57:41 -08:00
Masen Furer
9c9602363c
pyproject.toml: bump to 0.6.6 (final) 2024-12-02 20:55:13 -08:00
Masen Furer
27bad2575e
bump to 0.6.6a3 2024-12-02 10:24:37 -08:00
Thomas Brandého
3a7497c852
enable css props via wrapperStyle for recharts components (#4447) 2024-12-02 09:24:10 -08:00
Masen Furer
77594bd0ea
[HOS-333] Send a "reload" message to the frontend after state expiry (#4442)
* Unit test updates

* test_client_storage: simulate backend state expiry

* [HOS-333] Send a "reload" message to the frontend after state expiry

1. a state instance expires on the backing store
2. frontend attempts to process an event against the expired token and gets a
   fresh instance of the state without router_data set
3. backend sends a "reload" message on the websocket containing the event and
   immediately stops processing
4. in response to the "reload" message, frontend sends
   [hydrate, update client storage, on_load, <previous_event>]

This allows the frontend and backend to re-syncronize on the state of the app
before continuing to process regular events.

If the event in (2) is a special hydrate event, then it is processed normally
by the middleware and the "reload" logic is skipped since this indicates an
initial load or a browser refresh.

* unit tests working with redis
2024-12-02 09:24:09 -08:00
Elijah Ahianyo
e4ccba7aee
Remove invitation code logic from reflex logoutv2 (#4433)
* what happened there?

* we should do this for v2 instead
2024-11-25 12:59:32 -08:00
Masen Furer
09b2d92466
bump to 0.6.6a2 2024-11-25 11:32:12 -08:00
Thomas Brandého
cb087acbeb
follow up to #4426 (#4436) 2024-11-25 11:29:08 -08:00
Thomas Brandého
7129bfb513
allow for 'go.Figure | None' annotation in State (#4426) 2024-11-25 10:46:30 -08:00
Thomas Brandého
b41b1f364a
fix mutable default in EventNamespace (#4420) 2024-11-25 10:42:40 -08:00
Masen Furer
9ebf16c140
[ENG-4137] Handle generic alias passing inspect.isclass check (#4427)
On py3.9 and py3.10, `dict[str, str]` and other typing forms are kinda
considered classes, but they still fail when doing `issubclass`, so
specifically exclude generic aliases before calling issubclass.

Fix #4424

Bonus fix: support upcasting of pydantic v1 and v2 models
2024-11-25 10:42:39 -08:00
Masen Furer
6d0fae36e6
pyproject.toml: bump to 0.6.6a1 2024-11-21 19:37:07 -08:00
Simon Young
c29c6b657a
Simon/hosting cli upgrades (#4417)
* update cli version

* little change man

* thats ruff

* v bump

---------

Co-authored-by: simon <simon@reflex.dev>
2024-11-21 17:50:35 -08:00
benedikt-bartscher
a5486335a3
rx._x.asset improvements (#3624)
* wip rx._x.asset improvements

* only add symlink if it doesn't already exist

* minor improvements, add more tests

* use deprecated Generator for python3.8 support

* improve docstring

* only allow explicit shared, only validate local assets if not backend_only

* fix darglint

* allow setting backend only env to false.

* use new is_backend_only in assets

* ruffing

* Move to `rx.asset`, retain old API in `rx._x.asset`

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-21 17:16:43 -08:00
Masen Furer
a6b324bd3e
[ENG-3953] Support pydantic BaseModel (v1 and v2) as state var (#4338)
* [ENG-3953] Support pydantic BaseModel (v1 and v2) as state var

Provide serializers and mutable proxy tracking for pydantic models directly.

* conditionally define v2 serializer

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>

* Add `MutableProxy._is_mutable_value` to avoid duplicate logic

* Conditionally import BaseModel to handle older pydantic v1 versions

* pre-commit fu

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-21 17:01:14 -08:00
Elijah Ahianyo
5702a18502
[GTM-836]Rework Init workflow (#4377)
* Rework Init workflow

* minor format

* refactor

* add comments

* fix pyright alongside some improvements

* add demolink for blank template

* fix darglint

* Add more templates and keep template name in kebab case

* revert getting other templates since we'll use the submodules approach

* remove debug statement

* Improvements based on standup comments

* Add redirect logic

* changes based on new flow

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-21 16:58:12 -08:00
Elijah Ahianyo
9faa5d6fd9
Downgrade syntax highlighter to fix wrapLongLines (#4368) 2024-11-21 16:54:15 -08:00
benedikt-bartscher
c13cec3d8a
implement performance mode for existing state size check (#4392) 2024-11-21 16:33:47 -08:00
Masen Furer
b5e4b02d9c
New Event Action: temporal (#4404)
When an event/event spec is marked as "temporal", it will not be queued unless
the backend is up. This can be used to prevent periodic events (like from
`rx.moment`) from queueing up while the backend is down, and then stampeding
when the backend comes up and the queue is drained. It can be used to avoid
processing many periodic events at once when the app is only expecting to
process such an event every so often.
2024-11-21 16:32:38 -08:00
Masen Furer
bbfbc82c9d
Handle Var passed to rx.toast (#4405)
* Handle Var passed to `rx.toast`

If the user provides a `Var` for `message` then apply it as `props["title"]` to
avoid a var operations error.

* remove unnecessary parentheses

* remove weird hacks

* get it right pyright

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-11-21 16:15:01 -08:00
Thomas Brandého
d4b197b517
fix for event handlers in py3.9 (#4416) 2024-11-21 12:41:48 -08:00
benedikt-bartscher
e0984aa834
Allow bound method as event handler (#4348)
* subtract 1 arg if the method is a bound method

* fix it early in user_args

* only bound methods pls

* add test
2024-11-21 11:53:50 -08:00
benedikt-bartscher
ecb52651c3
allow to disable checking for the latest package version via env (#4407) 2024-11-21 11:06:47 -08:00
Thomas Brandého
095c1e5b7f
remove deprecation for these events (#4415) 2024-11-21 11:05:02 -08:00
Masen Furer
05956c84a7
protect sys.path manipulation with a mutex (#4408)
Compiling pages in separate threads can result in `sys.path` being cleared,
which breaks subsequent imports.
2024-11-21 10:29:40 -08:00
Masen Furer
81583d45ca
[HOS-313] state.js: when a routing error occurs, delete it (#4410)
In some cases, a routing failure can cause the failure to be cached. When the
router has a cached failure, pushing such a route will never call
routeChangeComplete, and thus on_load event will never be fired for that route.

Purposely clearing the error from the router allows the page to properly load
on subsequent attempts without refreshing the app.
2024-11-21 10:27:44 -08:00
Masen Furer
4571524e1c
[ENG-4130] Disable typer/rich integration appropriately (#4412)
The `rich` module should be set to `None`, indicating that rich should not be used.

Setting it to `False` worked before, but recently added code in typer fails
when checking `if rich is not None`.

ref: https://github.com/fastapi/typer/pull/847
2024-11-21 13:11:34 +01:00
Thomas Brandého
681b616000
fix appearance broken by #3812 (#4403)
* fix appearance broken by #3812

* fix again to pass tests
2024-11-20 11:12:52 -08:00
Khaleel Al-Adhami
229df1ce09
ignore rxconfig not in cwd (#4398)
* ignore rxconfig not in cwd

* no type ignore

* resolve paths

* Remove rxconfig module from sys.modules cache when reloading

* modify sys path

* add try except

* refactor inner function

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-19 16:46:55 -08:00
Masen Furer
67296d43c0
Don't skip serialization when Var is callable (#4399) 2024-11-19 16:33:27 -08:00
Alek Petuskey
bffff01acb
Add datetime to moment (#4381)
* Add datetime to moment

* Remove recharts update

* Support other formats

* simplify

* Precommit

* PYI

* change imports for pyi compat

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-19 09:29:11 -08:00
Khaleel Al-Adhami
bcea79cd45
add typed dict type checking (#4340)
* add typed dict type checking

* technically it has to be a mapping, not specifically a dict
2024-11-18 19:28:38 -08:00
benedikt-bartscher
1f9a17539c
fix: do not allow instantiation of State mixins (#4347)
* fix: do not allow instantiation of State mixins
Closes #4343

* improve error message for ComponentState mixins

* fix typo

Co-authored-by: Masen Furer <m_github@0x26.net>

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-18 19:15:01 -08:00
Thomas Brandého
af4fe48428
[maintenance] bump some packages versions (#4385)
* bump some versions

* update ruff to 0.7.4

* bump tailwind version

* relock deps

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-11-18 18:56:28 -08:00
Thomas Brandého
adaf49e4f9
make list suggestions work in rx.input (#4391)
* make list suggestions work

* fix pyi
2024-11-18 18:22:01 -08:00
Khaleel Al-Adhami
22329e592e
add debug statement to evaluate page (#4396) 2024-11-18 18:21:45 -08:00
Simon Young
3f58ceef95
update cli version (#4394)
Co-authored-by: simon <simon@reflex.dev>
2024-11-18 16:59:54 -08:00
Masen Furer
6494683c27
Fix ternary logic when printing template name (#4393) 2024-11-19 00:11:04 +01:00
Masen Furer
34c11fdf10
require typing_extensions >= 4.6.0 (#4373)
* require typing_extensions >= 4.6.0

TypeAliasType was added in 4.6

https://github.com/python/typing_extensions/blob/main/CHANGELOG.md#release-460-may-22-2023

* update lock file, even though nothing has changed
2024-11-18 10:31:11 -08:00
benedikt-bartscher
dc347d10b3
fix: Failed to CreateArtifact (#4339) 2024-11-15 16:27:05 -08:00
Thomas Brandého
e45b76c01e
fix noSSRComponent imports (#4386) 2024-11-15 21:43:55 +01:00
Alek Petuskey
79a5409a8e
Update bug_report.md (#4382) 2024-11-13 20:42:29 -08:00