Commit Graph

2156 Commits

Author SHA1 Message Date
Khaleel Al-Adhami
8663dbcb97
improve var base typing (#4718)
* improve var base typing

* fix pyi

* dang it darglint

* drain _process in tests

* fixes #4576

* dang it darglint
2025-01-31 13:12:33 -08:00
Khaleel Al-Adhami
12a42b6c47
var_data fixes with hooks values (#4717)
* var_data fixes with hooks values

* remove the raise error
2025-01-31 13:07:51 -08:00
Khaleel Al-Adhami
335816cbf7
add backend disabled dialog (#4715)
* add backend disabled dialog

* pyi that guy

* pyi the other guy

* extend test_connection_banner to also test the cloud banner

* oops, need asyncio _inside_ the app

* Update reflex/components/core/banner.py

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

* use universal cookies

* fix pre-commit

* revert universal cookie 🍪

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-31 13:00:56 -08:00
Khaleel Al-Adhami
6231f82248
add codspeed (#4707)
* add codspeed

* add codspeed to dev deps

* poetry.lock: relock deps, no update

* add poetry run

* only compile components

* at least have something

* fix hash

* dang it darglint

* uwu

* test sorting algorithms

* test sort

* sad

* revert that guy

* add test_evaluate

* it's ruff out there

* delete test_sort

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-31 11:39:19 -08:00
Masen Furer
fc16bed7ca
Handle python range passed to rx.Var.create (#4716)
* Handle python `range` passed to rx.Var.create

Fix the range function to use Math.ceil to handle jagged steps.

Update test cases.

* Set ToVarOperation.__qualname__ for better repr
2025-01-31 11:21:51 -08:00
Thomas Brandého
87d93b33b8
followup for merge style PR (#4721) 2025-01-31 11:17:46 -08:00
Khaleel Al-Adhami
12bda1d4f5
make all triggers disable recurisve memoization (#4719) 2025-01-31 11:15:42 -08:00
Khaleel Al-Adhami
2c3257d4ea
fix tag render to be recursive (#4714) 2025-01-29 12:16:54 -08:00
Khaleel Al-Adhami
1e8e82ec0e
allow functools partial with foreach (#4709) 2025-01-28 23:03:22 -08:00
Khaleel Al-Adhami
58e63f387f
assert that .render returns jsonable values (#4708)
* assert that .render returns jsonable values

* render component default
2025-01-28 23:02:14 -08:00
Khaleel Al-Adhami
5beea25b31
improve var create typing (#4701) 2025-01-28 22:56:38 -08:00
Thomas Brandého
58f87a6aa7
only allow item inside root (#4697) 2025-01-28 22:54:23 -08:00
Thomas Brandého
96ead07606
fix padding style in textarea (#4696) 2025-01-28 22:53:40 -08:00
Thomas Brandého
b8b3f8910e
add more type annotations through the code (#4401)
* add more type annotations through the code

* add typing in reflex/utils

* misc typing

* more typings

* state typing

* keep typing

* typing init and utils

* more typing for components

* fix attempt for 3.9

* need more __future

* more typings

* type event plz

* type model

* type vars/base.py

* enable 'ANN001' for reflex folder (ignore tests and benchmarks)

* fix pyi

* add missing annotations

* use more precise error when ignoring
2025-01-29 01:12:47 +01:00
Khaleel Al-Adhami
2a922214a2
improve error message for failed compile_state (#4702) 2025-01-28 16:07:53 -08:00
Thomas Brandého
3bd2bea54d
merging two style instance should give a style instance (#4706)
* merging two style instance should give a style instance

* fix ci

* carry _var_data
2025-01-28 22:47:57 +01:00
Thomas Brandého
42e6dfa40d
enable PGH, bump pyright and fix all #type: ignore (#4699)
* enable PGH, bump pyright and fix  all #type: ignore

* relock poetry file

* ignore incompatible override

* fix varop tests

* ignore missing imports

* fix

* fix stuff

* fix tests

* rechange tests

* relock with poetry 2.0
2025-01-28 13:11:05 -08:00
Khaleel Al-Adhami
64fb78ac5e
fix subprotocol for granian (#4698)
* fix subprotocol for granian

* use scope subprotocols

* use subprotocols or headers

* separate the logic
2025-01-28 11:46:00 -08:00
Thomas Brandého
9e36efbd21
fix version in pyproject and ruff version check (#4690)
* fix version in pyproject and ruff version check

* relock deps

* relax some strict values
2025-01-28 14:20:26 +01:00
Khaleel Al-Adhami
4d08484a12
import vars are not sortable (#4700) 2025-01-27 21:31:14 -08:00
Thomas Brandého
61a6ab9bbd
fix stuff with bun_path (#4688)
* fix stuff with bun_path

* which always return Path object

* try using samefile() for file path comparison

* check for None

* fix tests, maybe

* fix more tests
2025-01-27 12:37:00 -08:00
Khaleel Al-Adhami
709c6dedf2
[ENG-4444] move states out of .web (#4689)
* move states out of .web

* create file parents if they don't exist
2025-01-24 12:38:14 -08:00
Khaleel Al-Adhami
abc9038580
return websocket protocol when asked (#4683) 2025-01-23 15:10:07 -08:00
Khaleel Al-Adhami
9dba8cd494
use older version of python for windows simple benchmarks (#4680) 2025-01-23 15:29:31 +01:00
Thomas Brandého
7f1aee6dc8
enable N rules for naming conventions (#4666)
* enable N rules for naming conventions

* fix pyi

* address comments

* remove unneeded code
2025-01-23 15:29:17 +01:00
Thomas Brandého
858a85a4dc
rename private fields with leading underscore in App (#4642)
* rename private fields with leading underscore in App

* fix constants API

* fix public API for some attributes of App()

* fix conflicts properly 🙈

* remove extra private

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-23 15:28:56 +01:00
Ahmad Hakim
c58db4d005
pie chart type annotation fix (#4681)
Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com>
2025-01-23 15:52:25 +02:00
Khaleel Al-Adhami
3aaa26c82f
attempt to upgrade windows latest python version (#4679)
* attempt to upgrade windows latest python version

* remove that silly one
2025-01-22 17:56:41 -08:00
Masen Furer
6d314d10c5
Fix setting default color mode in dev mode (#4616)
* Fix setting default color mode in dev mode

Without this, the last_compiled_timestamp local storage never gets set because
it's always `null` until it gets set.

* test_client_storage: also pop `theme` key from next-themes
2025-01-22 15:30:11 -08:00
Elijah Ahianyo
1ca36fa6c1
[ENG-1796]reflex rename- B (#4668)
* `reflex rename`- B

* add unit tests

* precommit

* dont need this comment

* move loglevel

* calm down, darglint

* add current dir to sys path
2025-01-22 15:26:12 -08:00
Masen Furer
818788da63
Do not track compile in posthog metrics (#4669) 2025-01-22 15:23:34 -08:00
Khaleel Al-Adhami
0139cab13f
refactor client state to restore prior API (#4674)
* refactor client state to restore prior API

* maybe add that
2025-01-22 15:23:06 -08:00
Khaleel Al-Adhami
8dea682781
update bun to 1.2.0 (#4678) 2025-01-22 15:19:25 -08:00
Khaleel Al-Adhami
1106aae76e
remove integration screenshots (#4677) 2025-01-22 15:18:35 -08:00
Masen Furer
109b272bc2
Bump frontend and backend deps (#4667)
* relock backend deps

* bump frontend library versions

* go back to react 18.3

* revert to react 18.3.1 (as it was before)

* reflex-web keep reflex from current revision, rather than main

* relock backend deps (again)

* don't check ag-grid version on main repo

* config_path is passed via `extra` to avoid pyright error when None

* bump next again

---------

Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
2025-01-22 15:18:05 -08:00
Thomas Brandého
4c2b2ed1c6
removing deprecated features for 0.7.0 and removing py3.9 support (#4586)
* remove deprecated features and support for py3.9

* remove other deprecated stuff

* update lock file

* fix units tests

* relock poetry

* fix _replace for computed_var

* fix some merge typo

* fix typing of deploy args

* fix benchmarks.yml versions

* console.error instead of raising Exception

* fix tests

* ignore lambdas when resolving annotations

* simplify redirect logic in event.py

* more fixes

* fix unit tests again

* give back default annotations for lambdas

* fix signature check for on_submit

* remove useless stuff

* update pyi

* readd the getattr

* raise if log_level is wrong type

* silly goose, loglevel is a subclass of str

* i don't believe this code

* add guard

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-22 11:54:37 -08:00
Khaleel Al-Adhami
db13fe65b8
reflex export environment should default to prod (#4673)
* reflex export environment should default to prod

* what

* wat

* what is this silly goose
2025-01-22 11:11:47 -08:00
Khaleel Al-Adhami
8de14d4384
Fix recharts min width/height (#4672) 2025-01-22 11:11:25 -08:00
Thomas Brandého
728607643f
attempt to fix usage when volta is installing node (#4664)
* attempt to fix usage when volta is installing node

* use absolute() instead of resolve()

* fix stuff
2025-01-22 16:58:33 +01:00
Khaleel Al-Adhami
a923f657ac
retry failed tests (#4675)
* retry failed tests

* retry even more
2025-01-22 16:27:17 +01:00
Ahmad Hakim
80966dbff0
[ENG-4406] cell component wrapper (#4670)
* cell component wrapper

* add pyi files changes

---------

Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com>
Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
2025-01-22 09:00:43 +02:00
Elijah Ahianyo
048416163d
Remove token check in reflex deploy (#4640)
This logic has been moved upstream to reflex-hosting-cli
2025-01-21 13:28:05 -08:00
Khaleel Al-Adhami
bea266b8ed
make object var handle all mapping instead of just dict (#4602)
* make object var handle all mapping instead of just dict

* unbreak ci

* get it right pyright

* create generic variable for field

* add support for typeddict (to some degree)

* import from extensions
2025-01-21 13:14:02 -08:00
Elijah Ahianyo
abaaa22adb
Allow deploy with project name and app id (#4550)
* `reflex deploy --project-name`

* add app id as well

* config file update

* Update reflex/reflex.py

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

* Update reflex/reflex.py

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

---------

Co-authored-by: simon <simon@reflex.dev>
Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-21 13:06:12 -08:00
Khaleel Al-Adhami
0c70146013
check frontend version on connect (#4611)
* check frontend version on connect

* do something a bit silly

* thanks masen

* just delete the tests you don't pass
2025-01-21 13:05:35 -08:00
Masen Furer
212b2d4af9
Skip saving page components when skipping compile output (#4653)
Obviously we still have to evaluate the pages to make sure we know about all
states, but not saving them to `App.pages` dict reduces high-line memory usage
for backend-only process from ~900Mb to ~530Mb on reflex-web.
2025-01-21 13:05:04 -08:00
Khaleel Al-Adhami
4dc106545b
add defensive checks against data being funny (#4633) 2025-01-20 14:00:08 -08:00
Thomas Brandého
2855ed4887
add some of the TRY rules (#4651) 2025-01-20 13:58:17 -08:00
Thomas Brandého
9c019a65d5
check for dict passed as children for component (#4656) 2025-01-20 13:55:53 -08:00
Elijah Ahianyo
268effe62e
[ENG-4134]Allow specifying custom app module in rxconfig (#4556)
* Allow custom app module in rxconfig

* what was that pyscopg mess?

* fix another mess

* get this working with relative imports and hot reload

* typing to named tuple

* minor refactor

* revert redis knobs positions

* fix pyright except 1

* fix pyright hopefully

* use the resolved module path

* testing workflow

* move nba-proxy job to counter job

* just cast the type

* fix tests for python 3.9

* darglint

* CR Suggestions for #4556 (#4644)

* reload_dirs: search up from app_module for last directory containing __init__

* Change custom app_module to use an import string

* preserve sys.path entries added while loading rxconfig.py

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-01-20 10:12:54 -08:00