Commit Graph

1765 Commits

Author SHA1 Message Date
Elijah
c3dbfc0f62 minimal update of theme and language map 2024-10-02 14:38:57 +00:00
Elijah
cdad1f9432 fix pyi and annotations 2024-10-02 11:42:08 +00:00
Elijah
bee1ae15cf see if this fixes the tests 2024-10-02 11:29:31 +00:00
Elijah
8ee3fb7a8b python 3.9+ 2024-10-02 10:57:27 +00:00
Elijah
76d340a38b fix mapping 2024-10-02 10:38:58 +00:00
Elijah
1df9e69dc1 fix mapping 2024-10-02 10:38:40 +00:00
Elijah
e5875106e7 add a high-level component 2024-10-02 10:37:18 +00:00
Elijah
2c5ed89123 fix ruff 2024-10-01 16:59:49 +00:00
Elijah
b110704c41 fix components paths 2024-10-01 16:27:08 +00:00
Elijah
b1aff7147e some validations 2024-10-01 15:33:43 +00:00
Elijah
8eff3423f9 add transformers to namespace 2024-10-01 14:57:05 +00:00
Elijah
8213b04a37 remove console.log 2024-10-01 14:43:23 +00:00
Elijah
2eca3b743f update code 2024-10-01 14:42:57 +00:00
Elijah
a4cc8d5c57 refactor 2024-10-01 14:37:54 +00:00
Elijah
8725ae5619 Shiki Code block Experimental 2024-09-30 15:21:46 +00:00
Khaleel Al-Adhami
9719f5d57e
use literal var instead of serialize for toast props (#4027) 2024-09-29 12:08:56 -07:00
Thomas Brandého
23e979717f
remove all runtime asserts (#4019)
* remove all runtime asserts

* Update reflex/testing.py

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

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-09-27 17:25:22 -07:00
Khaleel Al-Adhami
62021b0b40
implement _evaluate in state (#4018)
* implement _evaluate in state

* add warning

* use typing_extension

* add integration test
2024-09-27 16:58:20 -07:00
Thomas Brandého
1b3422dab6
improve lifespan typecheck and debug (#4014)
* add lifespan debug statement

* improve some of the logic for lifespan tasks

* fix partial name with update_wrapper
2024-09-27 16:17:30 -07:00
Masen Furer
9ca5d4a095
Track backend-only vars that are declared without a default value (#4016)
* Track backend-only vars that are declared without a default value

Without this provision, declared backend vars can be accidentally shared among
all states if a mutable value is assigned to the class attribute.

* add test case for no default backend var
2024-09-27 12:04:43 -07:00
Khaleel Al-Adhami
eea5dc1918
change loglevel and fix granian on linux (#4012)
* change loglevel and fix it on linux

* run precommit

* fix that as well
2024-09-26 21:54:03 -07:00
Masen Furer
ae0f3f820e
Handle bool cast for optional NumberVar (#4010)
* Handle bool cast for optional NumberVar

If the _var_type is optional, then also check that the value is not None

* boolify the result of `and_operation`

* flip order to be more semantically pure

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-09-26 21:52:31 -07:00
Thomas Brandého
299f842756
add env var to enable using system node and bun (#4006)
* add env var to enable using system node and bun

* fix test to use env var
2024-09-26 16:12:12 -07:00
Khaleel Al-Adhami
0ab161c119
remove format_state and override behavior for bare (#3979)
* remove format_state and override behavior for bare

* pass the test cases

* only do one level of dicting dataclasses

* remove dict and replace list with set

* delete unnecessary serialize calls

* remove serialize for mutable proxy

* dang it darglint
2024-09-26 16:00:28 -07:00
Khaleel Al-Adhami
70bd88c682
serialize default value for disk state manager (#4008) 2024-09-26 13:59:17 -07:00
LeoH
60276cf1ff
EventFnArgMismatch fix to support defaults args (#4004)
* EventFnArgMismatch fix to support defaults args

* fixing type hint and docstring raises

* enforce stronger type checking

* unwrap var annotations :(

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-09-26 13:56:53 -07:00
Khaleel Al-Adhami
54c7b5a261
disable prose by default for rx.html (#4001)
* disable prose by default for rx.html

* remove styled

* put that on one line
2024-09-26 13:47:05 -07:00
Thomas Brandého
130bcf96ca
default on_submit in form set to prevent_default (#4005)
* default submit forms set to prevent_default

* fix tests
2024-09-26 11:56:59 -07:00
Masen Furer
25016f5e27
Update markdown component map to use new rx.code_block.theme enum (#3996)
* Update markdown component map to use new rx.code_block.theme enum

* change var to theme

* give the types some attention instead of ignoring them

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-09-26 11:04:35 -07:00
Thomas Brandého
3f538865b5
reorganize all tests in a single top folder (#3981)
* lift node version restraint to allow more recent version if already installed

* add node test for latest version

* change python version

* use purple for debug logs

* update workflow

* add playwright dev dependency

* update workflow

* change test

* oops

* improve test

* update test

* fix tests

* mv units tests to a subfolder

* reorganize tests

* fix install

* update test_state

* revert node changes and only keep new tests organization

* move integration tests in tests/integration

* fix integration workflow

* fix dockerfile workflow

* fix dockerfile workflow 2

* fix shared_state
2024-09-26 01:22:52 +02:00
Thomas Brandého
b07fba72e9
add missing message when running in backend_only (#4002)
* add missing message when running in backend_only

* actually pass loglevel to backend_cmd
2024-09-26 00:57:08 +02:00
Khaleel Al-Adhami
9d8b737b1a
hash the state file name (#4000)
* hash the state file name

* forgot to digest my food oop
2024-09-25 13:11:04 -07:00
Masen Furer
e1538b75f8
bump to 0.6.1 for further dev (#3995)
* bump version to 0.6.1dev1

* bump reflex-chakra requirement to 0.6.0

* update poetry file

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-09-25 11:31:45 -07:00
Khaleel Al-Adhami
74d1c47ce2
allow classname to be state vars (#3991)
* allow classname to be state vars

* simplify join with all literal string vars

* add test case and avoid concat var operation if it's not necessary

* remove silly print statement

* simplify case where there's no var

* don't automatically do class name str to literal var
2024-09-25 09:57:29 -07:00
Khaleel Al-Adhami
982c43d595
use bundled radix ui for dynamic components (#3993) 2024-09-25 09:57:16 -07:00
Thomas Brandého
3eeb0bde9c
bump nextjs version (#3992) 2024-09-25 09:56:15 -07:00
Khaleel Al-Adhami
fc5d352431
add basic integration test for dynamic components (#3990)
* add basic integration test

* fix docstrings

* dang it darglint
2024-09-25 09:55:16 -07:00
Khaleel Al-Adhami
5e738fd62b
don't camel case keys of dicts in style (#3982)
* don't camel case keys of dicts in style

* change tests to fit the code 😎

* respect objectvars as true dicts
2024-09-24 17:38:49 -07:00
Thomas Brandého
46be46d6ea
allow link as metatags (#3980)
* allow link as metatags

* remove stray print & fix nit
2024-09-24 17:38:12 -07:00
Thomas Brandého
001b8c4222
can run with granian by setting REFLEX_USE_GRANIAN var (#3919)
* can run with granian by setting REFLEX_USE_GRANIAN var

* granian also useable for prod mode

* adjust reload paths for granian

* move uvicorn / granian logic to their own function

* fix prod mode
2024-09-24 17:36:58 -07:00
Thomas Brandého
d0ad5cd15e
use svg elements instead of raw html for logo (#3978)
* use svg elements instead of raw html for logo

* avoid duplication
2024-09-24 17:34:41 -07:00
Thomas Brandého
4e4d36a867
re add removed method with better behaviour and tests (#3986) 2024-09-24 23:29:56 +02:00
Andrew Davies
2c4310d9ff
Use tailwind typography plugin by default (#3593)
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-09-23 18:18:05 -07:00
Masen Furer
2883e541a9
Bring back py3.9 support with a deprecation warning. (#3976)
* Revert "ruff formatting to unbreak `main` CI (#3964)"

This reverts commit f9be184b86.

* Revert "bump python>=3.10 for 0.6.0 (#3956)"

This reverts commit fe1833c5e1.

* drop python3.8 support

* relock dependencies

* Raise warning when < py310 is used

* Move python version check to reflex version check function

Avoid spammy deprecation warnings by only emitting warning once per project,
per reflex version, per reinit.

* Remove other references to python3.8
2024-09-23 18:15:16 -07:00
Khaleel Al-Adhami
00d995d971
[ENG-3833] handle object in is bool (#3974)
* handle object in is bool

* use if statements
2024-09-23 18:14:28 -07:00
Khaleel Al-Adhami
a5ad5203df
suggest bool() for wrong values (#3975) 2024-09-23 18:13:55 -07:00
Khaleel Al-Adhami
47c9938d95
use is true for bool var (#3973) 2024-09-23 16:36:58 -07:00
Khaleel Al-Adhami
ee3b0e614c
fix set value logix for client state (#3966) 2024-09-23 12:40:14 -07:00
Thomas Brandého
61332fdba1
add some more tests (#3965) 2024-09-22 14:44:44 -07:00
Elijah Ahianyo
afd52a87dd
Make reflex init --ai use light mode (#3963) 2024-09-22 14:44:16 -07:00